Bug 30309 - Azure Messaging Unified component doesn't register device correctly
Summary: Azure Messaging Unified component doesn't register device correctly
Status: RESOLVED ANSWERED
Alias: None
Product: Components
Classification: Xamarin
Component: Xamarin Components ()
Version: Production (addons.xamarin.com)
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: ---
Assignee: Jon Dick
URL:
Depends on:
Blocks:
 
Reported: 2015-05-21 12:04 UTC by David Ortinau [MSFT]
Modified: 2015-12-22 21:59 UTC (History)
2 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
Email details of code and alernative bits tried. (939.11 KB, application/pdf)
2015-05-21 12:04 UTC, David Ortinau [MSFT]
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED ANSWERED

Description David Ortinau [MSFT] 2015-05-21 12:04:34 UTC
Created attachment 11281 [details]
Email details of code and alernative bits tried.

This same code works still in the 32bit version. We've branched and updated to Unified.

Now when we call RegisterNativeAsync, the device token is passed, but the callback is never made. And in the Azure portal, the device token is missing, which means push notifications sent are not received.

We have also tried to non-async method.

Attached is a PDF with details and images of code snippets etc. from Ben Bishop who is lead dev on this.
Comment 1 Jon Dick 2015-06-04 11:49:40 UTC
It turns out based on Ben's analysis that RegisterNativeAsync needs to be called on the UI Thread.  This solves the issue of the non-async method never issuing a callback.

Unfortunately since this is a Microsoft maintained component, we can't do much about the binding to this, but we can update our documentation to specify this.

To make matters more complicated, Microsoft now has a version 2.x of their mobile services which appears to merge messaging into the main component itself.

More analysis is needed on the best route forward, but for now the work around is to call the method on the UI Thread.
Comment 2 David Humphreys 2015-12-22 21:59:50 UTC
This is an issue with a microsoft component and the design of the API that they expose.

An new version of this components is available