You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bound services are not affected
These rules do not affect bound services in any way. If your app defines a bound service, other components can bind to that service whether or not your app is in the foreground.
Under certain circumstances, a background app is placed on a temporary whitelist for several minutes. While an app is on the whitelist, it can launch services without limitation, and its background services are permitted to run. An app is placed on the whitelist when it handles a task that's visible to the user, such as:
[…]
- Executing a PendingIntent from a notification.
[…]
NotificationsProcessingService
Started services (either Service or IntentService) that don’t need be re-written given how they’re being used:
PlanUpdateService (Service, uses network connection, but is tied to PlansActivity's onStart() and onStop() methods)
ReaderCommentService (Service, uses network connection). Only used in NotificationsDetailListFragment, and started/stopped in onStart()/onPause().
Other
GCMMessageService: extends Google Play Services’ GcmListenerService so it shouldn’t need any changes (need double check, updated in bumped play services lib version #7595)
InstanceIDService: extends Google Play Services’ InstanceIDListenerService, same as above
Candidate started services (either Service or IntentService) that need be re-written as JobIntentService or something else:
Api26/jobschedule stats service #7617StatsService (Service, uses network connection, this might be the most complex, definitely needs to be a Job as is used by the StatsWidgetProvider as well)
Api26/jobschedule reader post service #7607ReaderPostService (Service, uses network connection. Used in ReaderPostPagerActivity and ReaderPostListFragment to fetch and populate the screen; connected through EventBus, wondering if we need an AsyncTask here rather than anything else?)
Api26/jobschedule reader search service #7608ReaderSearchService (Service, uses network connection, same as ReaderPostService the cycle is handled through EventBus, started from ReaderPostListFragment). It’s easier code wise to frame this as a JobIntentService (fewer changes), although this is probably a candidate for AsyncTask give it’s only used in this fragment alone.
Api26/jobschedule notifications update #7610NotificationsUpdateService (Service, uses network connection, same as ReaderUpdateService it is started i.e. when Login ends, so needs to run in the background as a Job
On devices running Android 8.0 (API level 26) and higher, the launchers that allow you to create pinned shortcuts also allow you to pin app widgets onto the launcher. Similar to pinned shortcuts, these pinned widgets give users access to specific tasks in your app.
In your app, you can create a request for the system to pin a widget onto a supported launcher by completing the following sequence of steps:
Create the widget in your app's manifest file, as shown in the following snippet:
<manifest>
...
<application>
...
<receiver android:name="MyAppWidgetProvider">
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
</intent-filter>
<meta-data android:name="android.appwidget.provider"
android:resource="@xml/my_appwidget_info" />
</receiver>
</application>
</manifest>
The text was updated successfully, but these errors were encountered:
comes from #7506, master migration branch
Previous PRs that are base to the changes below:
JobIntentService
Api26/jobschedule token refresh #7598Here's the ToDo list re: services
Services that are already prepared for Android O (using foreground notifications)
UploadService
LoginWpComService
SiteCreationService
Services that are not affected by new background execution limits
(https://developer.android.com/about/versions/oreo/background.html)
MediaDeleteService
SuggestionService
Services triggered from a Notification Action are not subject to background limits as well.
https://developer.android.com/about/versions/oreo/background.html#services
NotificationsProcessingService
Started services (either Service or IntentService) that don’t need be re-written given how they’re being used:
PlanUpdateService
(Service, uses network connection, but is tied toPlansActivity
'sonStart()
andonStop()
methods)ReaderCommentService
(Service, uses network connection). Only used inNotificationsDetailListFragment
, and started/stopped inonStart()/onPause()
.Other
GCMMessageService
: extends Google Play Services’ GcmListenerService so it shouldn’t need any changes (need double check, updated in bumped play services lib version #7595)InstanceIDService
: extends Google Play Services’ InstanceIDListenerService, same as aboveCandidate started services (either Service or IntentService) that need be re-written as
JobIntentService
or something else:StatsService
(Service, uses network connection, this might be the most complex, definitely needs to be a Job as is used by the StatsWidgetProvider as well)ReaderUpdateService
(Service, uses network connection, it is started i.e. when Login ends, so needs to run in the background as a Job)ReaderPostService
(Service, uses network connection. Used in ReaderPostPagerActivity and ReaderPostListFragment to fetch and populate the screen; connected through EventBus, wondering if we need an AsyncTask here rather than anything else?)ReaderSearchService
(Service, uses network connection, same as ReaderPostService the cycle is handled through EventBus, started from ReaderPostListFragment). It’s easier code wise to frame this as a JobIntentService (fewer changes), although this is probably a candidate for AsyncTask give it’s only used in this fragment alone.PublicizeUpdateService
(IntentService, called in PublicizeListActivity, uses network connection)NotificationsUpdateService
(Service, uses network connection, same as ReaderUpdateService it is started i.e. when Login ends, so needs to run in the background as a JobHere's the ToDo list re: broadcast receivers
Broadcast Receivers
https://developer.android.com/about/versions/oreo/background.html#broadcasts
The app can no longer register for implicit broadcasts.
The list of broadcast receivers registered in the Manifest follows.
Unaffected (explicit receivers, or implicit but whitelisted receivers)
NotificationDismissBroadcastReceiver
is only used in aPendingIntent
for Notifications, so these also shouldn’t be a problem.ShareAndDismissNotificationReceiver
same as above, explicit intent.NotificationsPendingDraftsReceiver
has the implicit broadcast filterandroid.intent.action.BOOT_COMPLETED
, but it’s in the exception list https://developer.android.com/guide/components/broadcast-exceptions.htmlcom.google.android.gms.gcm.GcmReceiver
probably has been taken care of in bumped play services lib version #7595Affected (implicit, not white-listed receivers)
.ui.stats.StatsWidgetProvider
has intent-filterandroid.appwidget.action.APPWIDGET_UPDATE
, which is NOT white listed (https://developer.android.com/guide/components/broadcast-exceptions.html)We will probably have to register this one programmatically when the app wakes up.
EDIT: apparently app widgets receivers don't have a problem on API level 26, as per what can be read here: https://developer.android.com/guide/topics/appwidgets/index.html
The text was updated successfully, but these errors were encountered: