Android LocationManager注册的持久性是什么

Android LocationManager注册的持久性是什么,android,android-intent,android-location,android-pendingintent,Android,Android Intent,Android Location,Android Pendingintent,假设我有一个应用程序,在其活动中,我将向LocationManager注册PendingEvent,每10分钟触发一次 如本例所示: 如果用户关闭应用程序,LocationManager是否仍会继续启动PendingEvent 因此,当我的应用程序未运行时,我可以从我的应用程序的BroadcastReceiver manifest中为此挂起内容调用通知 如果是,那么当位置管理器实际上被清理后,在电话重启之后, < P>如果在应用程序退出之后要进行可靠的位置更新,请考虑使用ALARMMANER来

假设我有一个应用程序,在其活动中,我将向LocationManager注册PendingEvent,每10分钟触发一次

如本例所示:

如果用户关闭应用程序,LocationManager是否仍会继续启动PendingEvent

因此,当我的应用程序未运行时,我可以从我的应用程序的BroadcastReceiver manifest中为此挂起内容调用通知


如果是,那么当位置管理器实际上被清理后,在电话重启之后,

< P>如果在应用程序退出之后要进行可靠的位置更新,请考虑使用ALARMMANER来每隔10分钟唤醒设备。每次警报响起时,注册和注销您的位置侦听器,以便GPS可以闲置

您可能还希望使用WakefulIntentService see之类的工具,以便在应用程序等待位置更新时设备保持清醒。如果BroadcastReceive方法花费的时间太长且未持有WakeLock,Android将中断该方法