Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API 26 migration Master Issue #7604

Closed
11 tasks done
mzorz opened this issue Apr 6, 2018 · 1 comment
Closed
11 tasks done

API 26 migration Master Issue #7604

mzorz opened this issue Apr 6, 2018 · 1 comment
Assignees

Comments

@mzorz
Copy link
Contributor

mzorz commented Apr 6, 2018

comes from #7506, master migration branch

Previous PRs that are base to the changes below:

Here'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)

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.
  • 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

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:

Here'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)

Affected (implicit, not white-listed receivers)

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

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>
@mzorz
Copy link
Contributor Author

mzorz commented Apr 12, 2018

Closing via #7506

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant