-
Notifications
You must be signed in to change notification settings - Fork 764
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FCM Token Listener application (#660)
Sometimes we need to use the FCM token, sync with server and more. Today the token is sent to the JS, that prevents us from making custom native logic that deals with FCM token. Changes done as small as possible, it is optional, Instance of Application class can implement the interface in order to receive the token itself to the native side.
- Loading branch information
Showing
2 changed files
with
14 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
.../app/src/main/java/com/wix/reactnativenotifications/fcm/IFcmTokenListenerApplication.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package com.wix.reactnativenotifications.fcm; | ||
|
||
/** | ||
* API for Applications that want to listen new FCM tokens | ||
* whenever its ready. | ||
*/ | ||
public interface IFcmTokenListenerApplication { | ||
void onNewFCMToken(String token); | ||
} |