marcick Well-Known Member Licensed User Longtime User Jan 14, 2018 #1 Prior to switch to Firebase, I was sending notifications using the string (token) obtained in Application_Pushtoken as identifier. Switching to Firebase I followed the same method. But something was not working: i was able to send notifications to ios_general, but not to a specific address. Of course in Fm_FCMConnected I was subscribing to topic "ios_general" and to the string (token) too. But looks like the token string is too long and is not accepted because notifications to that address never arrives. So I have changed method and for each user I don't register its token but another DeviceID obtained in this way: Code: Copy IOSDeviceId=MySub.Right(no.GetField("identifierForVendor").AsString, 32) With a 32 chars string everything works now. Perhaps I'm doing some confusion, but the question in my mind is: what is the token intended for ? Can I forget it ?
Prior to switch to Firebase, I was sending notifications using the string (token) obtained in Application_Pushtoken as identifier. Switching to Firebase I followed the same method. But something was not working: i was able to send notifications to ios_general, but not to a specific address. Of course in Fm_FCMConnected I was subscribing to topic "ios_general" and to the string (token) too. But looks like the token string is too long and is not accepted because notifications to that address never arrives. So I have changed method and for each user I don't register its token but another DeviceID obtained in this way: Code: Copy IOSDeviceId=MySub.Right(no.GetField("identifierForVendor").AsString, 32) With a 32 chars string everything works now. Perhaps I'm doing some confusion, but the question in my mind is: what is the token intended for ? Can I forget it ?
Erel B4X founder Staff member Licensed User Longtime User Jan 14, 2018 #2 You don't need to subscribe to any token. Sending to a token: https://www.b4x.com/android/forum/t...-cloud-messaging-fcm.67716/page-3#post-433583 Upvote 0
You don't need to subscribe to any token. Sending to a token: https://www.b4x.com/android/forum/t...-cloud-messaging-fcm.67716/page-3#post-433583