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

Blazor Maui : "<audio />" tag doesn't show screen lock notification on Android #7895

Closed
jfversluis opened this issue Mar 18, 2023 · 8 comments
Labels
needs-triage Issues that need to be assigned.

Comments

@jfversluis
Copy link
Member


Issue moved from dotnet/maui#11675


From @abdu292 on Saturday, November 26, 2022 4:11:43 PM

Description

It appears that the lock screen notification is not displayed on Android when audio is played. However, playing an audio on a web browser using audio tag will give you the notification on Android. Should this be default to Maui Blazor app as the framework uses a web browser to play the audio?

Steps to Reproduce

Repro:

ReproPlaybackNot.zip

On windows it shows a media playback notification bar, but not on Android.

Link to public reproduction project repository

https://github.com/dotnet/maui/files/10096587/ReproPlaybackNot.zip

Version with bug

7.0 (current)

Last version that worked well

Unknown/Other

Affected platforms

Android

Affected platform versions

Tested on Android 12 Emulator

Did you find any workaround?

Not really.

Relevant log output

N/A
@jfversluis
Copy link
Member Author


Issue moved from dotnet/maui#11675


From @javiercn on Monday, November 28, 2022 9:35:34 AM

@abdu292 thanks for contacting us.

Does the same behavior happen when you try to do this on a regular webview control? (No Blazor involved).

@jfversluis
Copy link
Member Author


Issue moved from dotnet/maui#11675

  • Please respond to @msftbot[bot].

From @msftbot[bot] on Monday, November 28, 2022 9:35:46 AM

Hi @abdu292. We have added the "s/needs-info" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.

@jfversluis
Copy link
Member Author


Issue moved from dotnet/maui#11675


From @abdu292 on Monday, November 28, 2022 11:36:10 AM

@javiercn Thanks for the response. Yes the behavior is the same even on the regular WebView control on a standard Maui project.

If I navigate to the below link on a chrome browser, it shows the notification (expected behavior) as the audio plays. However on a standard Maui project with a regular WebViewControl it doesn't work and says "Media Session API is not yet available". Does this mean maui uses an older version of browser? Is there any way I can use the latest chrome on Maui/Blazor project?
Thanks a bunch!

https://googlechrome.github.io/samples/media-session/audio.html

image

@jfversluis
Copy link
Member Author


Issue moved from dotnet/maui#11675

  • Please respond to @msftbot[bot].

From @msftbot[bot] on Wednesday, November 30, 2022 7:27:31 PM

We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process.

@ghost ghost added the needs-triage Issues that need to be assigned. label Mar 18, 2023
@jfversluis
Copy link
Member Author


Issue moved from dotnet/maui#11675


From @drasticactions on Thursday, December 1, 2022 6:23:45 AM

@abdu292 Can you repro this on a Android app that doesn't use MAUI? (ex dotnet new android). AFAIK, the MAUI WebView for Android is the Android System WebView (https://play.google.com/store/apps/details?id=com.google.android.webview&hl=en_US&gl=US), which is the standard webview for Android. My guess is that if you build a straight Android app using the webview you would end up with the same state.

@jfversluis
Copy link
Member Author


Issue moved from dotnet/maui#11675


From @abdu292 on Friday, December 2, 2022 9:16:14 AM

Thanks @drasticactions for the response. I tried on a dotnet android project and the behavior appears to be the same.
Here is the repro.

WebViewAndroid.zip

@jpobst
Copy link
Contributor

jpobst commented Jan 9, 2024

Ultimately, all .NET for Android does is provide generated wrappers that allow you to call Google’s Android API. We do not have much expertise in how to use those API’s properly.

You will likely need to use the Android API documentation and relevant forums to determine how to write code for your desired outcome.

@jpobst jpobst closed this as not planned Won't fix, can't repro, duplicate, stale Jan 9, 2024
@abdu292
Copy link

abdu292 commented Jan 10, 2024

@jpobst @jfversluis Thank you for looking at this & no worries at all. I moved to flutter a while ago when I had several issues with Maui (after Xamarin to Maui upgrade). I feared I'd lost my client and was forced to move to Flutter leaving my favorite C#.
However, this was one of the greatest decisions I've ever made. Currently I'm on my third flutter project.
I use dotnet for everything except mobile & desktop app development (for those who are interested to know).

Thanks again for closing this.

@github-actions github-actions bot locked and limited conversation to collaborators Feb 9, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
needs-triage Issues that need to be assigned.
Projects
None yet
Development

No branches or pull requests

3 participants