package com.b2lmobitech.spottest.service;

import android.preference.PreferenceManager;

import com.google.firebase.iid.FirebaseInstanceId;
import com.google.firebase.iid.FirebaseInstanceIdService;

public class Myfirebaseinstanceidservice  extends FirebaseInstanceIdService {

    @Override
    public void onTokenRefresh() {
        super.onTokenRefresh();

        try {
            String refreshedToken = FirebaseInstanceId.getInstance().getToken();
            PreferenceManager.getDefaultSharedPreferences(getApplicationContext()).edit().putString("firebaseid",refreshedToken).apply();
        }catch (Exception ignored){

        }
    }


}