-
-
Notifications
You must be signed in to change notification settings - Fork 735
Closed
Labels
type:bugImpaired feature or lacking behavior that is likely assumedImpaired feature or lacking behavior that is likely assumed
Description
Documentation says that onNewToken is called upon the first app start, but that's not true.
It's called only when a new token is needed, so if you add ParsePush on an application that already implemented firebase cloud messaging, this method will not be called so ParseFCM.register(token); in ParseFirebaseMessagingService it's not called too.
To fix this we can simply add this on application onCreate:
FirebaseMessaging.getInstance().getToken().addOnCompleteListener(task -> { if (!task.isSuccessful()) { return; } String token = task.getResult(); ParseFCM.register(token); });
Can be this implemented some where in Parse Push library?
Metadata
Metadata
Assignees
Labels
type:bugImpaired feature or lacking behavior that is likely assumedImpaired feature or lacking behavior that is likely assumed