Netmera Push Notification

1- Register for push notifications

Registering for push notifications with tags and custom fields (async method)
NetmeraClient.RegisterForPushNotifications(new NetmeraDeviceDetails()
            {
                CustomFields = new List() { new NetmeraKeyValue() { Key = "key1", Value = "2" } },
                RegistrationId = await GetPushUri(),
                Tags = new List() { "tag1","tag2" }
            });

2- Process push notifications

var notification = NetmeraClient.OnPushNotificationReceived(args)

3- Get registered device details

Getting registered device details (async method)
var r = await NetmeraClient.GetRegisteredDeviceDetails();

4- Get Tags

Getting tags, that were used for registering for push notifications (async method)
var r = await NetmeraClient.GetTags(10, 0);

5- Unregister from push notifications

Unregistering from push notifications with tags (async method)
NetmeraClient.UnregisterFromPushNotifications(new NetmeraDeviceDetails()
           {
                RegistrationId = await GetPushUri(),
                Tags = new List() { "tag1", "tag2" }
            });

6- Get notification details

Getting notification details by notification id (async method)
var response = await NetmeraClient.GetNotification(pushId);

7- Get registration id

Getting registration push id that was used for registering for push notifications
var r = NetmeraClient.GetRegistrationId();

June 17, 2015 / Netmera

Recent Blog Posts
ROI based app marketing for your business
App Indexing: some insights
Categories