我在requestLocationUpdates(provider,minTime,minDistance,PendingIntent)中注册了PendingIntent.但是当我的广播接收器收到此打算时,如何使用removeUpdates(PendingIntent)删除此请求?接收方不保留对原始PendingIntent的引用.
你创建一个等价物PendingIntent
.换句话说,创建一个Intent
与您最初使用的匹配项(尽管您可以跳过任何其他内容),将其包装在PendingIntent
您最初使用的那种PendingIntent
中,并在removeUpdates()
调用中使用它.
归档时间: |
|
查看次数: |
2535 次 |
最近记录: |