Reputation: 363
I am using vivo v9 android 8.1.0 oreo. i cant find device id
my config:
implementation 'com.google.firebase:firebase-messaging:17.3.0'
implementation 'com.google.firebase:firebase-core:16.0.3'
class path :
classpath 'com.google.gms:google-services:4.0.0'
Upvotes: 2
Views: 1409
Reputation: 691
In Latest Firebase they change the method to get the Device Token.
Kindly follow the code where you want the ID
FirebaseInstanceId.getInstance().getInstanceId().addOnSuccessListener(LoginPageActivity.this, new OnSuccessListener<InstanceIdResult>() {
@Override
public void onSuccess(InstanceIdResult instanceIdResult) {
Log.e("Device Token",instanceIdResult.getToken());
}
});
Upvotes: 1
Reputation: 363
Manually we need to this dependencies
implementation 'com.google.android.gms:play-services:11.0.4'
And We need to create a Channel in FCM messaging class.
Upvotes: 1