Skip to content

Commit

Permalink
bug fix for building
Browse files Browse the repository at this point in the history
see *react-native-fcm* repo bug issue. basically a change to their source may be needed.
[evollu#1111](evollu#1111)
  • Loading branch information
temitope authored Feb 2, 2020
1 parent 41014d8 commit ec6c18a
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@
import com.facebook.react.ReactInstanceManager;
import com.facebook.react.bridge.ReactContext;
import com.google.firebase.iid.FirebaseInstanceId;
import com.google.firebase.iid.FirebaseInstanceIdService;
//import com.google.firebase.iid.FirebaseInstanceIdService; //Commented FirebaseInstanceIdService
import com.google.firebase.messaging.FirebaseMessagingService; //ADD FirebaseMessagingService

public class InstanceIdService extends FirebaseInstanceIdService {
public class InstanceIdService extends FirebaseMessagingService {

private static final String TAG = "InstanceIdService";

Expand All @@ -24,7 +25,7 @@ public class InstanceIdService extends FirebaseInstanceIdService {
*/
// [START refresh_token]
@Override
public void onTokenRefresh() {
public void onNewToken(String token) { //Added onNewToken method
// Get updated InstanceID token.
String refreshedToken = FirebaseInstanceId.getInstance().getToken();
Log.d(TAG, "Refreshed token: " + refreshedToken);
Expand Down Expand Up @@ -62,3 +63,4 @@ public void onReactContextInitialized(ReactContext context) {
});
}
}

0 comments on commit ec6c18a

Please sign in to comment.