Reputation: 61
Azure Mobile Engagement: Device Id received from RegisteredForRemoteNotifications method is different than what it is show in portal. I'm able to send notifications via DeviceId from Portal but this is not accessible in app.
public override void RegisteredForRemoteNotifications (UIApplication application, NSData deviceToken)
{
// Register device token on Engagement
EngagementAgent.RegisterDeviceToken(deviceToken);
}
Notification is not sent to the to device id with the deviceToken. Also if tried to addDevice on portal for testing then this deviceToken is not completely added, it gets trimmed. e.g.
Device Id on Portal is - 9dfe6c8f70e8541e233d247475940558
Device Id from App is - 39955dbcf85ac8dc3f39c8f6302c5438cfe22711864314f4fe83951211c013c6
If I call REST API to get all device Ids from Engagement I get following where both Ids are present.
{
"value": [
{
"meta": {
"lastSeen": 1490598143383,
"firstSeen": 1490597807881,
"lastLocation": 1490597810680,
"lastInfo": 1490597808834,
"nativePushEnabled": true
},
"appInfo": {
"apsEnabledNotifications": "7",
"DeviceID": "39955dbcf85ac8dc3f39c8f6302c5438cfe22711864314f4fe83951211c013c6"
},
"deviceId": "9dfe6c8f70e8541e233d247475940558"
}
]
}
My Question is how to get the correct device Id (shown in portal) from iOS App?
Upvotes: 0
Views: 489
Reputation: 502
Just for your information, be aware that Microsoft just announced that they will shut down Azure Mobile Engagement next year. SDK won't be updated to support iOS 10 (from last September) or future version. You should consider to switch from AzME and look for alternatives.
https://azure.microsoft.com/en-us/services/mobile-engagement/
I'm the Co-founder of https://batch.com, we develop a solution for mobile engagement through push notifications and in-app messaging. And we do support Custom user or device identifiers if that's a requirement for you.
Upvotes: 1