MediaStyleNotification Extension [PAID]


#1

MediaStyleNotification Extension v1 allows you to use Play and Pause actions from a Notification including from the Lock Screen is now available for purchase.
This Extension was Developed By Ken Nichols with Help from Andres Cotes, Thank You @Andres_Cotes!
I would like to thank my Beta Testers(@Kleyber_Derick, @Fabian, @2227 and most importantly @Rey! ) and last but not least I have to thank @Taifun for the BroadcastReceiver example! found here: https://puravidaapps.com/headset.php

The MediaStyleNotification wasn’t introduced until API21 Lollipop Android OS v5.0 and the ActionButton wasn’t introduced until API16 JellyBean Android OS v4.1.
For maximum compatibility, I created the 3 different styles of notifications listed below.

Lollipop v5.0 to Current(Oreo v8.1) MediaStyleNotification:







JellyBean v4.1 to KitKat v4.4 ActionButtonNotification:
JellyBean-KitKatPlaying


JellyBean-KitKatPaused

Pre-JellyBean Notification:
PreJellyBeanPlaying


PreJellyBeanPaused

Blocks:

Usage:

Notification:




ActionButtonClick:



CancelNotification:



MoveTaskToBackground(Minimizes app):



SetLargeIcon:


Video:

Features:
PlayingNotification:
Is set to OnGoing and can’t be swiped away by the user.
Note: It must be removed by CancelNotification.

PausedNotification:
Isn’t set to OnGoing so it can be swiped away by the user.

Icon Setting:
Update:
I added the ability to display the apps Icon see pictures in post below…

This Extension uses android.R.drawable for the icon(smallIcon)
I recommend “android.R.drawable.ic_media_play” for PlayingNotification and
“android.R.drawable.ic_media_pause” for PausedNotification but you can use which icon you like.
see a full list of options here:Icons.txt (6.8 KB)




Colors:
in Lollipop and newer the Notification is automatically Colorized based on the colors of the LargeIcon.

Visibility Setting:
“VISIBILITY_PUBLIC” shows the notification’s full content.
“VISIBILITY_SECRET” doesn’t show any part of this notification on the lock screen.
“VISIBILITY_PRIVATE” shows basic information, such as the notification’s icon and the content title, but hides the notification’s full content.

Price $15 USD
PP_Acceptance_Marks_for_LogoCenter_150x94
PayPal.me
Please PM me to Order, Thank you!

Metadata: Notification Media Player Music Stream Streaming Play Pause Button Buttons Audio


#19

excelente trabajo felicitaciones


#20

Can we play music using this?


#21

I designed it to work with the Player Component.

When someone clicks on the Play or Pause ActionButton from the Notification the Event ActionButtonClick is raised.

ActionButtonClick:
bc025ff5f6dcb98d0a7dae1044ff3179dd653aa4_1_690x340


Play/Pause:


#22

Does it work in the background as well, or clicking the button takes you to the app.


#23

@Ben,
Clicking on the Non Button area of the Notification will bring the app to the front.

Clicking on the Play/Pause ActionButtons will just raise the ActionButtonClick Event and not bring the app to the front.
It also works on the LockScreen.

You can see it in action in the video above.


#24

icon Setting Update:

I added the ability to use the apps Icon for the Notification.








#25

felicitaciones , habĂ­an dicho que eso era imposible antes de la api 21


#26

Yes, I had believed it to be impossible < API23.


#27

I’ve tested it as far back as JellyBean 4.1.1 API16.




#28

according to the documentation
https://developer.android.com/reference/android/app/Notification.Builder.html#setSmallIcon(android.graphics.drawable.Icon)
to set the small icon which will be used to represent the notification in the status bar is available starting from API level 23… ???
Taifun


#29

I added the option to add Prev(Previous) and Next buttons to the notification.
Lollipop 5.0 and Newer:







JellyBean 4.1 to KitKat 4.4:
20180702_002526


20180702_002513


Blocks:
Notification:



ActionButtonClick:


#30

Can you provide APK demo to test


#31

If you press back and if the App closed, can we still have the notification bar, if App is play song


#32

Yes, See Picture below, when you press Back and Player IsPlaying we MoveTaskToBackground(aka Minimize the app)

Back


#33

Thanks for your reply, is it work (playing) if screen is off? And can we able to view/access the notification buttons (Play/Pause) on the locked screen?


#34

Yes, checkout the video above.