I am looking for a way to take the users device notification FCM token and upload it to firebase. I know how to do an API call to firebase to save the data to Firebase Realtime Database, but I am not sure where/how to get the token.
Ultimate what we want to do is be able to send push notifications to devices from either a cloud function or the Firebase console. We understand push notifications can be sent within Kodika, but that is not feasible once we go into production. If you could show me what is needed to upload the device id/token. Also, this needs to work on both iOS and Android (I believe your program allows publishing to both platforms)
Hi,
To manually handle the FCM Token in your Kodika application, you first need to create a Model.
In our example we named it Model To Handle Push Notifications.
Then you need to open the newly created Model, go to Protocols and select the Handle Push Notifications Protocol
Proceed and add the Handle Push Notification Registration Tokenfunction.
In this function you can write the Logic needed to handle the passed parameter Token
Finally, you need to go to the Push Notifications menu
and at the bottom select the Model that you just created
Now, every time a new FCM Token is fetched, it will be used in your Model and you can send it to your database through the Handle Push Notification Registration Tokenfunction.
Note: During development the token will be from your relevant Kodika Server, so you will not be able to send notifications to it.
Thank you for this, I will construct this today. How do I get my app up to testflight to have my other partners test it, and test real notifications? Can I use Kodika notifications while developing?
Yes, I would like to write a function in the app to handle both test and production notifications. I assume while in development, I cannot send a push notification from a cloud function?
This is still not working for me, the token is not uploading, and I have no way to see if its an issue with my API call or I did the function wrong. You know how XCODE has a black window you can see everything processing with the app, does Kodika have that?
I need to set up a time with you for the empty arrays, so I’d also like to get some help with this, this is huge.