You can set up a custom notification and add more useful information to the user.
When mounting your notification, if you want to put your own layout (and with that more information pro usuario) you would need to add the "Builder.setStyle function()".
An example would be like this:
NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(this)
.setSmallIcon(R.drawable.notification_icon)
.setContentTitle("Event tracker")
.setContentText("Events received")
NotificationCompat.InboxStyle inboxStyle =
new NotificationCompat.InboxStyle();
String[] events = new String[6];
// Sets a title for the Inbox in expanded layout
inboxStyle.setBigContentTitle("Event tracker details:");
...
// Moves events into the expanded layout
for (int i=0; i < events.length; i++) {
inboxStyle.addLine(events[i]);
}
// Moves the expanded layout object into the notification object.
mBuilder.setStyle(inBoxStyle);
...
// Issue the notification here.
Google has good documentation for this:
https://developer.android.com/guide/topics/ui/notifiers/notifications.html?hl=pt-br
I strongly suggest you read: When to put the language name in the title?
– emanuelsn
I edited the question, because the problem is totally oriented to the phonegap and should avoid using irrelevant tags, something else removed the link because it does not help anything with doubt. A doubt Pedro, Voce want to put the player where the notifications are? Because if it is, then pushs do not seem to be part of the problem (despite staying in the same location), could explain better?
– Guilherme Nascimento
Guilherme Nascimento, simply wanted that when the person minimize the radio APP appear a cixa like that of Play Música only with the pause and play button and the radio icon.. Sacks??
– Pedro Quezado
That’s why I asked, the title talks about pushs, but you understand that you want to create a widget in the notification list. In other words, the only thing I asked him friend is "what notifications have to do with the problem", I did not ask for ill is that I wanted to try to improve the title of your question so that more people can be interested and try to answer your question :)
– Guilherme Nascimento
Solved your problem?
– durtto
Take a look at this example on Github. It has what you’re looking for. https://github.com/iammert/RadioPlayerService
– CristianCotrena