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

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,326 questions
{count} votes

Accepted answer
  1. Wenyan Zhang (Shanghai Wicresoft Co,.Ltd.) 29,381 Reputation points Microsoft Vendor
    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.


0 additional answers

Sort by: Most helpful