Using a backend API to do notifications. We are sending the operation system and token ID to it using the store item in storage and retrieve item from storage to create a record in the api (screen shot attached)
On iOS when the application is installed you are prompted to except notifications and when you say Yes the API is called and passed this information. The issue is though on Android the API is not called when the application is launched.
Hi! Are you still experiencing this problem? What version of the preview app are you using for Android?
Yes, I am. It’s actually on a live app not the preview.
What I’ve found out so far is that Android apparently has by default notifications enabled without need to request them, so it might be that your logic needs to be adjusted to take that into account.
I believe with my logic it should still request the token… Can you take a look at the screenshot and let me know what you think?
Alright then, it’s time to get debugging. Since the push notifications require a separate build to test, I recommend trying to put all the info in at once. The goal here is to find out what parts of the logic are run and what are not run. You can use either alerts or toasts. First round, attach an alert to each of the error outputs in your logic, with the description of which part of the logic the alert is coming from and the error it received. If none of these fire, start adding toasts/alerts to the success outputs as well until you find which part the android does, and where exactly it fails and with what error.
I mentioned this before in another thread that I’ve never gotten that Request Notification Permissions function work (on Android anyway). I even explicitly Disabled Notifications manually through Settings just to see if it would work then, and it still didn’t, nothing ever appeared on the screen to let me turn Notifications On.
The only thing I could get to work is the Open Settings flow function and just direct the user to enable/disable notifications from there.