Android Question Firebase notification vibration?

QtechLab

Active Member
Licensed User
Longtime User
Hi,

I've implemented the Firebase notification service as described in Erel tutorial.
I can't found a way to make the phone vibrating and make sound.

Thanks in advance,
Marcello
 

MarcoRome

Expert
Licensed User
Longtime User
B4X:
Sub fm_MessageArrived (Message As RemoteMessage)
   Log("Message arrived")
   Log($"Message data: ${Message.GetData}"$)
   Dim n As Notification
   n.Initialize
   n.Icon = "icon"
   n.Sound = True   '<--- Enabled Sound
   n.Vibrate = True '<---- Enabled Vibrate
   n.SetInfo(Message.GetData.Get("title"), Message.GetData.Get("body"), Main)
   n.Notify(1)
End Sub
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…