Firebase Push notification

Vuyiswa Maseko 351 Reputation points
2022-04-19T17:25:28.23+00:00

Good Day

As you know a lot of HUAWEI phones don't support Firebase Push notification . Is there a way i can check in Xamarin forms if a phone support Firebase push so that i implement a different Push for that phone programmatically ?

Thanks

Developer technologies | .NET | Xamarin

Answer accepted by question author

Wenyan Zhang (Shanghai Wicresoft Co,.Ltd.) 36,456 Reputation points Microsoft External Staff
2022-04-20T07:05:21.7+00:00

Hello,

GoogleApiAvailability in Xamarin.GooglePlayServices.Base nugget packages is used to check for the presence of Google Play Services:

Verify Google Play Services in OnCreate method of MainActivity class

int resultCode = GoogleApiAvailability.Instance.IsGooglePlayServicesAvailable (this);  

Refer to https://learn.microsoft.com/en-us/xamarin/android/data-cloud/google-messaging/remote-notifications-with-fcm?tabs=windows#check-for-google-play-services-and-create-a-notification-channel

More details : https://developers.google.com/android/reference/com/google/android/gms/common/GoogleApiAvailability

Best Regards,
Wenyan Zhang


If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

Was this answer helpful?


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.