[英]Getting location updates both foreground and background in android google maps
我正在開發一個Android應用程序,它將跟蹤用戶位置跟蹤(GPS提供程序)並顯示折線。 我已經實現了
locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER,0,0,監聽器);
在我的活動中。 但是現在,當用戶從堆棧中關閉活動時,我無法獲取位置更新。 即使活動關閉,是否可以獲取位置更新?
https://github.com/googlesamples/android-play-location/tree/master/LocationUpdates
這是用於獲取位置更新的android開發人員源代碼。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.