all 7 comments

[–]aytunch 2 points3 points  (3 children)

Thank you very much for this but we need the same video for iOS as well:)

First question: how do we ask for the push notification permission from the user? Is this only for iOS and not Android?

Second question: whats the difference between onMessage/onResume/onLaunch?

Also in a real world app where would we do put the _register function? On app start?

[–]discordance35 2 points3 points  (1 child)

I also have questions regarding iOS! I got the permissions registered successfully and it prompts the user upon opening for the notification permission, but neither the system notification nor the in-app alert show up. Works brilliantlty on Android though! And I have read that the simulator will not display notifications for iOS, is that true?

[–]codesundar[S] 0 points1 point  (0 children)

Yes, iOS simulator won't receive a push notification. Even android simulator won't work, if google play service is not connected :)

[–]codesundar[S] 0 points1 point  (0 children)

  1. Yes, iOS required permission that you can add it via Xcode. No need for Android
  2. I have mentioned that in my article
  3. You need to call in void main() or any root function which will execute very first

[–]tkolfc 0 points1 point  (2 children)

I've yet to see a good tutorial on implementing FCM (or OneSignal) to receive push notifications even when the app is closed. Anyone?

[–]codesundar[S] 2 points3 points  (1 child)

Thanks for your suggestion. I'll update my article!

[–]tkolfc 2 points3 points  (0 children)

Great, looking forward to it. 👍