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

Problem with NotificationCompat.MediaStyle() for API Level 26 (Oreo) and beyond #19

Open
ambageo opened this issue Jun 2, 2018 · 2 comments

Comments

@ambageo
Copy link

ambageo commented Jun 2, 2018

I noticed that the MediaStyle notification isn't working when selecting the compileSdkVersion to 27. As I found in the following link, we must add the following import:
import android.support.v4.media.app.NotificationCompat.MediaStyle;
Additionally, in the showNotification() method, were we set the Style of the builder, we must do it in the following way:
setStyle(new android.support.v4.media.app.NotificationCompat.MediaStyle()

@ambageo
Copy link
Author

ambageo commented Jun 2, 2018

#Edit: it seems that importing the android.support.v4.media.app.NotificationCompat.MediaStyle isn't necessary, so we only have to change the setStyle part.
However, although the notification is shown, the notifications actions are not working.

@LuisVargasVic
Copy link

This won't work in Android 26+ you must create channel

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