Geofence transition PendingIntent blocked by the OS on Android Oreo

后端 未结 2 1055
鱼传尺愫
鱼传尺愫 2021-02-03 16:40

This only happens on Android Oreo. I\'m using Play Services 11.4.2. I\'m registering geofences using the GeofencingClient and the addGeofences method with a pendingIntent to an

2条回答
  •  遇见更好的自我
    2021-02-03 17:02

    This is caused by the new Android Oreo background service limitations.

    You have to change the PendingIntent from using a Service to using a BroadcastReceiver.

    See this CodeLab for further information and example code.

提交回复
热议问题