我使用requestLocationUpdates監聽器接收數據。 我如何確定工程requestLocationUpdates?需要一種方法,將帶來真實 - 如果requestLocationUpdates啓用或假如果我關掉它(removeUpdates)我如何確定工程requestLocationUpdates?
0
A
回答
1
沒有這樣的方法。對於LocationListener
風味requestLocationUpdates()
,這是很容易爲你自己跟蹤它:
第1步:數據成員添加到某個類,boolean
型,命名爲areLocationUpdatesEnabled
,最初設置爲false
的。
步驟#2:當您撥打requestLocationUpdates()
時,請將areLocationUpdatesEnabled
設置爲true
。
步驟#3:當您撥打removeUpdates()
時,請將areLocationUpdatesEnabled
設置爲false
。
步驟#4(可選):執行areLocationUpdatesEnabled()
作爲返回值areLocationUpdatesEnabled
的方法。
相關問題
- 1. 它是如何工作的 - requestLocationUpdates()+ LocationRequest/Listener
- 2. LocationManager requestLocationUpdates不工作
- 3. 如何在線程中調用requestLocationUpdates?
- 4. 如何requestLocationUpdates()的作品
- 5. 如何從AsyncTask調用「requestLocationUpdates」
- 6. 我們如何確定線程池已完成所有工作?
- 7. requestLocationUpdates何時調用?
- 8. 我們如何確定Go中「最後」工作進程/線程何時完成?
- 9. 與requestLocationUpdates
- 10. Android中的LocationManager的requestLocationUpdates是如何工作的?
- 11. 我如何確定platform.release()
- 12. 如何以編程方式確定ASP.Net工作進程帳戶
- 13. 如何確定我的應用程序配置正確?
- 14. 我如何正確編程?
- 15. 如何決定requestLocationUpdates使用的時間間隔?
- 16. requestLocationUpdates權限
- 17. android locationManager requestLocationUpdates
- 18. error gps requestLocationUpdates android
- 19. 安卓:requestLocationUpdates
- 20. requestLocationUpdates MinDistance單位
- 21. requestLocationUpdates參數
- 22. requestLocationUpdates崩潰
- 23. 我如何確定爲什麼我的進程終止
- 24. requestLocationUpdates不是從一個線程
- 25. 如何讓工作Ajax.BeginForm,當我點擊確定按鈕
- 26. 我如何指定工具提示的正確位置?
- 27. 如何測試我的工廠是否正確綁定?
- 28. 我如何確定一天是Rails的一個工作日?
- 29. 如何確定線程UI線程
- 30. RequestLocationUpdates拋出java.lang.Exception的