Skip to content
This repository has been archived by the owner on May 21, 2022. It is now read-only.

SDK Transition #476

Closed
a-r-db opened this issue Aug 11, 2019 · 3 comments
Closed

SDK Transition #476

a-r-db opened this issue Aug 11, 2019 · 3 comments
Assignees
Labels
critical Requires New Build Release Immediately! serious Functionality is broken. Large number of people.

Comments

@a-r-db
Copy link
Contributor

a-r-db commented Aug 11, 2019

Updating to sls 1.5.6 broke scrobbling on my Pixel running Android 8.1 stable.

In logcat I found the following message:

BroadcastQueue: Background execution not allowed: receiving Intent { act=com.spotify.music.playbackstatechanged flg=0x10 (has extras) } to com.adam.aslfms/.receiver.SpotifyReceiver

This is due to changes in Androids background execution limits, which affects all apps targeting sdk 26 and higher.

Apps cannot use their manifests to register for most implicit broadcasts (that is, broadcasts that are not targeted specifically at the app).

Here are some details and information how to deal with the changes: Android O and the Implicit Broadcast Ban

So atm the only way I see is to stuck with targetSDK 25.

The problem: Starting with November 2018 it won't be possible to release updates targeting SKD <26. So if we want to be able to release updates on Google Play Store we properly need to rewrite the receiver logic (if there will be any way to fetch the media intents on Android 8+ at all).

Beside switching to SDK 25 I took the liberty to update the changelog and give myself credits.😅 I hope you're okay with that.

Fixes #414

I'm going to do as many updates as possible and do a release for F-Droid users.
I might need to leave a legacy build going.
I certainly will need to look into notification reading like all the other apps are using now.

@a-r-db a-r-db self-assigned this Aug 11, 2019
@a-r-db a-r-db added critical Requires New Build Release Immediately! serious Functionality is broken. Large number of people. labels Aug 11, 2019
@a-r-db
Copy link
Contributor Author

a-r-db commented Aug 22, 2019

  1. Legacy Implicit Broadcast reading is essentially dead.
  2. API 18 JELLY_BEAN_MR2, allows for notification reading, although will likely require a great deal of effort to implement.
  3. API 19 KitKat allows for RemoteController an older version of MediaSessionManager which is implemented in apps like QuickLyrics for example.
  4. API 21 LOLLIPOP, allows for direct information reading from the MediaSessionManager.

Chronological

  • API 18, raw notification reading.
  • API 19, deprecated RemoteController used by QuickLyric.
  • API 21, amazing new MediaSessionManager used by "android-media-controller" & PanoScrobbler.
  • API 26, classic Implicit Broadcasts ban

@a-r-db
Copy link
Contributor Author

a-r-db commented Aug 26, 2019

I am settling on using the QuickLyrics style method due to the preferable code base.

Change of plans, PanoScrobbler must have noticed this and implemented the best case scenario.
RemoteController requires api 21 anyways for access to Music Notifications.

@a-r-db
Copy link
Contributor Author

a-r-db commented Aug 27, 2019

#478

@a-r-db a-r-db closed this as completed Aug 27, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
critical Requires New Build Release Immediately! serious Functionality is broken. Large number of people.
Projects
None yet
Development

No branches or pull requests

1 participant