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

Media controls not shown on Android API level 33+ #7

Closed
NorthFred opened this issue Mar 22, 2023 · 6 comments
Closed

Media controls not shown on Android API level 33+ #7

NorthFred opened this issue Mar 22, 2023 · 6 comments

Comments

@NorthFred
Copy link

NorthFred commented Mar 22, 2023

When targeting and compiling the app with Android SDK version 33 (Android 13), the Media Controls are no longer shown for the app. The emulator does not show error messages related to this.

In contrast, when targeting the app to SDK 32, but compiling with SDK version 33, a confirmation dialog is shown "Allow xAPPx to send you notifications?" (see screenshot) when the app wants to show the Media Controls. When allowing this, the Media Controls are shown. (Note that there is also a "Notifications" setting under App info, where these can be switched on or off).

kuva

kuva

When targeting and compiling with Android SDK 33, there is no such option to enable the Notifications. They are disabled by default, hence resulting in the Media Controls not being shown on Android 14.

kuva

Note that by end of August 2023, new apps and app updates will require to target SDK API level 33.

@NorthFred
Copy link
Author

NorthFred commented Apr 13, 2023

@ingageco Any ideas on this? The notification is completely missing from API 33/34 builds (Android 13+). The background service however appears to be working, because the music is not interrupted when e.g. locking the device (tested on emulator).

@NorthFred NorthFred changed the title Media controls not shown on Android API level 33 Media controls not shown on Android API level 33+ Apr 13, 2023
@ingageco
Copy link
Owner

@NorthFred I've got to go through the Capacitor docs and see what they say about these new permissions.

@ingageco
Copy link
Owner

@NorthFred Just browsing the cordova version and reading some of the Android 13 docs, it seems that media playback is no longer considered a notification. therefore, registering it in the old method requires notification permissions, but registering it in the new way does not.

i am a little confused on how this can be backwards compatible, and im hoping this doesn't mean i have to do a lot of check "if < api level 33", etc. normally i wouldn't complain, but remember, i'm not a java developer.

@ingageco
Copy link
Owner

@NorthFred please test the android-13-style branch and let me know what is working/isnt. it catches most of the differences up that exist between this and the cordova version.

@NorthFred
Copy link
Author

@ingageco Great! I'll have a look this evening!

@NorthFred
Copy link
Author

@ingageco I'll close this one, since it's being handled in this issue: #11

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

2 participants