Notification via APP center...

MarcoSalvatoriMarcoSalvatori USMember ✭✭✭

I have a doubt about how to send notifications to IOS and Android.
I implemented notifications with APP center in xamarin.forms android and it works. Now I want to extend them to the IOS solution. But, when I send notifications to specific users via API, I have to send them to both APPs registered in Appcenter because I don't know if a user is using iphone or android, right?

Answers

  • jezhjezh Member, Xamarin Team Xamurai

    No, you don't need to this.
    When we check this document: App Center Push,we will find :

    The Visual Studio App Center Push (ACP) service is a notification aggregation service, it manages the process of sending notifications to devices using Push Notification Services (PNS) from Apple, Google, and Microsoft. You could easily build your own application that does this for you:

    • Managing the device registration process for each PNS
    • Tracking device registration data (so you know how to send notifications to devices later)
    • Building an application to send notifications through each PNS
    • Tracking success (or failure) for notifications

    App Center Push takes care of all that for you. Add the App Center SDK to an app, and on app start the SDK automatically registers the device for push notifications (with the appropriate PNS for the target device). With that in place, use the App Center Portal or its REST API to define audiences targeting app users, create campaigns, and send notifications to devices (and eventually users).

    So, once a user use the app , the App Center sdk will get the appropriate PNS for the target device.
    For more details, you can check: https://docs.microsoft.com/en-us/appcenter/push/send-notification#target

  • MarcoSalvatoriMarcoSalvatori USMember ✭✭✭

    maybe I expressed myself badly. as also indicated here https://stackoverflow.com/questions/56089324/appcenter-push-notifications-not-received-by-xamarin-forms-on-ios-platform, I have different services for each platform. not knowing which of the 3 the user is using, I have to send the notification command to each service as they have different tokens ...

Sign In or Register to comment.