Answers for "corodva cannot find symbol import com.google.firebase.iid.FirebaseInstanceIdService;"

2

cordova cannot find symbol import com.google.firebase.iid.FirebaseMessagingService;

// override the file:
// platforms/android/app/src/main/java/com/adobe/phonegap/push/PushInstanceIDListenerService.java
// by this content
package com.adobe.phonegap.push;

import android.content.Intent;
import android.content.Context;
import android.content.SharedPreferences;
import android.util.Log;

import com.google.firebase.iid.FirebaseInstanceId;
import com.google.firebase.messaging.FirebaseMessagingService;

import org.json.JSONException;

import java.io.IOException;

public class PushInstanceIDListenerService extends FirebaseMessagingService implements PushConstants {
    public static final String LOG_TAG = "Push_InsIdService";

    @Override
    public void onNewToken(String token) {
        // Get updated InstanceID token.
        String refreshedToken = FirebaseInstanceId.getInstance().getToken();
        Log.d(LOG_TAG, "Refreshed token: " + refreshedToken);
        // TODO: Implement this method to send any registration to your app's servers.
        //sendRegistrationToServer(refreshedToken);
    }
}
Posted by: Guest on June-18-2020

Code answers related to "corodva cannot find symbol import com.google.firebase.iid.FirebaseInstanceIdService;"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language