在手机重启或应用程序强制关闭后,我在 locationManger.requestLocationUpdates 中设置的监听器不会被调用。我是否必须跟踪我的位置广播接收器并在应用程序打开时和收到启动广播时再次注册?
最佳答案
do i have to to keep track of my location broadcast receiver and register it again when the app is open and when i get boot broadcast ?
不确定您的意思是“再次注册”...您编写一次代码,它会在您的应用程序启动时注册。当然,当您的应用进程终止时,您实例化的 locationManager 将消失...
关于android - 为什么 requestLocationUpdates 监听器在重启或强制关闭后不被调用?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8994426/