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

Android MediaControl button doesn't appear in the notification mediaplayer #401

Closed
eAvio opened this issue Jul 16, 2020 · 8 comments
Closed
Assignees
Labels
1 backlog bug Something isn't working

Comments

@eAvio
Copy link

eAvio commented Jul 16, 2020

Which API doesn't behave as documented, and how does it misbehave?
In the notification mediaplayer on android the media control buttons aren't drawn, but still can be pressed. This only happens on a release build made with "flutter build apk".

Minimal reproduction project
Unfortunately I don't know what causes this. Cloned example project from github works. I have the appropriate assets defined in the res folder too.

To Reproduce (i.e. user steps, not code)
I don't know.

Error messages
No error messages

Expected behavior
A notification media player with clearly visible buttons.

Screenshots
If applicable, add screenshots to help explain your problem.

Runtime Environment (please complete the following information if relevant):

  • Device: Huawei P Smart Z
  • OS: Android 10.0.0

Flutter SDK version
Flutter 1.18.0-13.0.pre

[✓] Flutter (Channel unknown, 1.18.0-13.0.pre, on Mac OS X 10.14.6 18G103, locale en-SI)
 
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
[✓] Xcode - develop for iOS and macOS (Xcode 11.3.1)
[✓] Android Studio (version 3.5)
[✓] VS Code (version 1.47.1)
[✓] Connected device (1 available)

• No issues found! ```
@eAvio eAvio added 1 backlog bug Something isn't working labels Jul 16, 2020
@eAvio
Copy link
Author

eAvio commented Jul 16, 2020

fixed it. In case someone else is having this problem, this is what helped me: https://stackoverflow.com/questions/61005254/android-drawables-work-in-debug-but-become-black-squares-in-release

@ryanheise
Copy link
Owner

This is interesting. Didn't the instructions on shrinking that I provided in the README work? Let me know if not and I'll need to update them.

@eAvio
Copy link
Author

eAvio commented Jul 16, 2020

what happened was that i forgot what that line in app/build.gradle did, and i threw it out when i was modifying the file for production build. My bad. Thank you for your response though :)

@eAvio eAvio closed this as completed Jul 17, 2020
@girish54321
Copy link

@eAvio Hey can you help me with this im all so having same problem

See This Here #503

@eAvio
Copy link
Author

eAvio commented Oct 20, 2020

@girish54321 For me the problem was that I accidentally removed "shrinkResources false" line app/build.gradle when i was preparing my app for production. Check if you have it.

android {
    compileSdkVersion 28
    ...
    buildTypes {
        release {
            signingConfig ...
            shrinkResources false // ADD THIS LINE
        }
    }
}

Check out the 2. step in the "Android setup" section of the README of this package. Hope this works for you.

@girish54321
Copy link

girish54321 commented Oct 20, 2020

@eAvio thanks i will check this

@girish54321
Copy link

@eAvio hey it works thank you so much 👍👍

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs, or use StackOverflow if you need help with audio_service.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
1 backlog bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants