I usually get the token with this method, but with the arrival of the huawei p40 series I can't get the token with those
FirebaseInstanceId.getInstance().getInstanceId().addOnSuccessListener( this, new OnSuccessListener<InstanceIdResult>() {
@Override
public void onSuccess(InstanceIdResult instanceIdResult) {
final String token = instanceIdResult.getToken(); // i can't get this
}
});
P40 contains Huawei Mobile Services. These devices don't have Google Mobile Services so Firebase won't work. There is alternative called Push Kit - https://developer.huawei.com/consumer/en/doc/development/HMS-Guides/push-introduction
If you want to make it all working on a one platform, you can try:
They are working with Google and Huawei.