Android Question How to customize icons, color and sounds on PUSH notifications?

omarruben

Active Member
Licensed User
Longtime User
based on the excellent tutorial:


I have everything working, but I don't have any idea where to start on customizing the icons or colors o others features, can anyone direct me please. Thank you.
 

asales

Expert
Licensed User
Longtime User
to start on customizing the icons or colors o others features
Check this:
 
Upvote 1

omarruben

Active Member
Licensed User
Longtime User
NB6 is awesome,on the samples of NB6 the notification appears when the user click on the list,
but how to link it to the Firebase Message (when it arrives)?
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
but how to link it to the Firebase Message (when it arrives
See the code in the example. Add them whereever you need them.

Also note the todo on the NBuilder-Thread

 
Upvote 0

asales

Expert
Licensed User
Longtime User
NB6 is awesome,on the samples of NB6 the notification appears when the user click on the list,
but how to link it to the Firebase Message (when it arrives)?
Is different things.
You will send the message from Firebase and get the message in the FirebaseMessaging receiver.
When the message is arrived, you can show a NB6 notification.

Check the push client example, change the "Dim n2 As Notification" to "Dim n2 As NB6" and made the necessary modifications.
 
Upvote 0

omarruben

Active Member
Licensed User
Longtime User
just for future fast reference ... change inside the FireBaseMessaging module from the sample:

B4X:
'Dim n2 As Notification
    'n2.Initialize2(n2.IMPORTANCE_HIGH)
    'n2.Icon = "icon"
    'n2.SetInfo(Message.GetData.Get("title"), Message.GetData.Get("body"), Main)
    'n2.Notify(1)

   
   
    Dim n As NB6
    n.Initialize("default", Application.LabelName, "DEFAULT").AutoCancel(True).SmallIcon(iconKantutaTV)
    n.Build(Message.GetData.Get("title"), Message.GetData.Get("body"), "tag1", Main).Notify(4) 'It will be Main (or any other activity) instead of Me if called from a service.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…