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 IntentService that is handling geofence transitions. It looks like the intent sent by the play services is blocked by the OS in certain conditions.
The system logs the following:
Background start not allowed: service Intent { cmp=my.app.id/my.package.struct.GeofenceTransIntentService (has extras) } to my.app.id/my.package.struct.GeofenceTransIntentService from pid=-1 uid=10154 pkg=my.app.id
as soon as I add a geofence in the following situations:
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.