Questions tagged [android-notification.mediastyle]

Notification style for media playback notifications. They are used to display previews of the media playing, i.e. music, videos, etc.

Notification style for media playback notifications. In the expanded form, Notification#bigContentView, up to 5 Notification.Actions specified with Notification.Builder#addAction(Action) will be shown as icon-only pushbuttons, suitable for transport controls.

More info about it:

https://developer.android.com/reference/android/app/Notification.MediaStyle

27 questions
1
vote
0 answers

Change color of notification icon like actual color of mediastyle notification bar

I created mediaStyle Notification in my app. This notification is colored depending on the actual playing song. I set .setColor(color) in NotificationCompat.Builderso that I get also a colored program Icon while drawing the notification bar. This…
1
vote
1 answer

how to change notification background color in nougat?

How do i change notification background in android? I am using androidx.core.app.NotificationCompat and below code work for Oreo and above Oreo device but not working for below Oreo devices. builder = new NotificationCompat.Builder(this,…
1
vote
1 answer

Media Style Notification action buttons not working with PendingIntent.getBroadcast()

I am creating a music player with notification style by using NotificationCompat.MediaStyle(). I implemented my code to send a broadcast when the action buttons are clicked in my notification. But my code doesn't seems to work. Here's my code as…
0
votes
0 answers

How to create android notification styled like Whatsapp or Telegream using Notification.setStyle

How to create android notification styled like Whatsapp or Telegream chat notification using Notification.setStyle(Notification.MessagingStyle) or any other without using remoteviews i could get that using Notification.CallStyle but i see hangup…
0
votes
0 answers

How can i add Button in MediaStyle Notification?

val mediaSession = MediaSessionCompat(baseContext, "my_media_session") mediaSession.setFlags( MediaSessionCompat.FLAG_HANDLES_MEDIA_BUTTONS or MediaSessionCompat.FLAG_HANDLES_TRANSPORT_CONTROLS ) val mediaSessionConnector =…
0
votes
0 answers

media notification not showing properly

buttons are not showing this are the minSdk 29 and targetSdk 33 **This is the method for creating the notification. Am I missing any method that needed to be called? ** fun showNotification() { val prevIntent = …
0
votes
0 answers

how to disable seeking on MediaStyle notification?

I working on a audio player like app and show audio progress and info on notification using media3. I want to show only progress on mediaStyle notification and the user does not able to change progress. I think I must set some value to the media…
0
votes
1 answer

Restrict media routing for MediaStyle notification

When I create a MediaStyle notification, it exposes a button to choose media routing, like this one: see screenshot. How do I get rid of this button? Or at least, how can I restrict playback to only local device (phone speaker)? Here's how I create…
0
votes
1 answer

Strange NPE deep inside MediaSessionCompat

I have seen similar questions posted about MediaSessionCompat but they are all pretty old, in fact most predate AndroidX and they point at it being fixed in newer versions. This crash is happening with androidx.media:media:1.2.1 on various phones…
casolorz
  • 8,486
  • 19
  • 93
  • 200
0
votes
1 answer

MediaStyle Notification progress bar keeps advancing when track is paused API 30

When I pause from the notification, the progress bar keeps advancing as it was still playing. If I press play again, the progress bar goes back to the position it was originally paused and resumes correctly. The problem comes when I pause: the…
0
votes
1 answer

Custom Notification Flutter

(sleeping sound). How to implement this type of notification in flutter. Such as leading icon , title , subtitle, trailing with play and pause button and background color? image attached in below link. Image Link
0
votes
1 answer

Why we cannot override Android Notification Channels Sound

I need to update the sound of the Android Notification Channel. I did research on this and concluded that we cannot update the properties of channel except name and description. I need to update the sound and i don't want to create as many channels…
1
2