Johnson Samuel Member Licensed User Longtime User Oct 16, 2019 #1 1. I could not find b4A Library for firebase notification. Where is this library hiding.? 2. I would like to send individual notification, not group. how this can be done? any working example please... I am using b4A v7.8 Help will be highly appreciated.
1. I could not find b4A Library for firebase notification. Where is this library hiding.? 2. I would like to send individual notification, not group. how this can be done? any working example please... I am using b4A v7.8 Help will be highly appreciated.
Erel B4X founder Staff member Licensed User Longtime User Oct 16, 2019 #2 1. The library is FirebaseNotifications and it is an internal library included in the IDE. I don't remember whether it was included with v7.80 (and whether it supports that version). 2. You will need to send the tokens to your server and then send the messages to specific tokens. Another option is to register the devices with unique topics. Check @DonManfred's example: https://www.b4x.com/android/forum/threads/firebase-store-token.85773/#post-543473 Upvote 0
1. The library is FirebaseNotifications and it is an internal library included in the IDE. I don't remember whether it was included with v7.80 (and whether it supports that version). 2. You will need to send the tokens to your server and then send the messages to specific tokens. Another option is to register the devices with unique topics. Check @DonManfred's example: https://www.b4x.com/android/forum/threads/firebase-store-token.85773/#post-543473
Johnson Samuel Member Licensed User Longtime User Oct 16, 2019 #3 Can I get the firebaseMessaging library in the forum.? Upvote 0
Erel B4X founder Staff member Licensed User Longtime User Oct 16, 2019 #4 You can download the trial version. It should be included. It will be difficult to get Firebase working with B4A v7.80. Upvote 0
You can download the trial version. It should be included. It will be difficult to get Firebase working with B4A v7.80.
Johnson Samuel Member Licensed User Longtime User Oct 17, 2019 #5 Thanks Erel. I will try with the trial version. If that succeeds , I will buy the latest version. Upvote 0
Johnson Samuel Member Licensed User Longtime User Oct 18, 2019 #6 I have purchased the latest b4A v9.5 yesterday. But there is a problem as below : Public Sub SubscribeToTopics Log("SubscribeToTopics") fm.SubscribeToTopic(Starter.Phone.GetSettings("android_id")) 'you can subscribe to more topics fm.SubscribeToTopic("general") 'you can subscribe to more topics CheckToken End Sub Error shows unkown member: Phone. Althought the phone library is added. This problem does not show up in b4A-trial (v9.5). Can u pl. help. Upvote 0
I have purchased the latest b4A v9.5 yesterday. But there is a problem as below : Public Sub SubscribeToTopics Log("SubscribeToTopics") fm.SubscribeToTopic(Starter.Phone.GetSettings("android_id")) 'you can subscribe to more topics fm.SubscribeToTopic("general") 'you can subscribe to more topics CheckToken End Sub Error shows unkown member: Phone. Althought the phone library is added. This problem does not show up in b4A-trial (v9.5). Can u pl. help.
Erel B4X founder Staff member Licensed User Longtime User Oct 18, 2019 #7 Please use [code]code here...[/code] tags when posting code. Johnson Samuel said: fm.SubscribeToTopic(Starter.Phone.GetSettings("android_id")) 'you can subscribe to more topics Click to expand... Looks like a mistake as this will return a fake and non-unique id on new devices. Add to Process_Globals of the starter service: Code: Public Phone As Phone A better solution is to get the push token and use it to send to specific devices. https://www.b4x.com/android/forum/threads/firebase-store-token.85773/#post-543473 Upvote 0
Please use [code]code here...[/code] tags when posting code. Johnson Samuel said: fm.SubscribeToTopic(Starter.Phone.GetSettings("android_id")) 'you can subscribe to more topics Click to expand... Looks like a mistake as this will return a fake and non-unique id on new devices. Add to Process_Globals of the starter service: Code: Public Phone As Phone A better solution is to get the push token and use it to send to specific devices. https://www.b4x.com/android/forum/threads/firebase-store-token.85773/#post-543473
Johnson Samuel Member Licensed User Longtime User Oct 18, 2019 #8 I am using the same solution as you have suggested earlier also. By @DonManfred Upvote 0
Johnson Samuel Member Licensed User Longtime User Oct 18, 2019 #9 Thanks Erel. I succeeded in sending Firebase notification after a hard workout. I Just wanted to know , how to change the icon image in the notification.? Upvote 0
Thanks Erel. I succeeded in sending Firebase notification after a hard workout. I Just wanted to know , how to change the icon image in the notification.?
Erel B4X founder Staff member Licensed User Longtime User Oct 18, 2019 #10 Johnson Samuel said: I Just wanted to know , how to change the icon image in the notification.? Click to expand... It is better to start a new thread for this question as it is not strictly related to push notifications. You have two options: 1. Use NB6. 2. Put a readonly image in Objects\res\drawable and change Notification.Icon = "icon" with the new file name (without extension). Upvote 0
Johnson Samuel said: I Just wanted to know , how to change the icon image in the notification.? Click to expand... It is better to start a new thread for this question as it is not strictly related to push notifications. You have two options: 1. Use NB6. 2. Put a readonly image in Objects\res\drawable and change Notification.Icon = "icon" with the new file name (without extension).