It appears that some of the best learning experiences about microsoft/xamarin mobile coding strategies come from building the test applications distributed, in source code, with the azure mobile site’s client SDK source.
On attempting to build the mobile SDK from source – when augmented with the xamarin.auth library (sources) – one runs into an initial problem:
Like good little non-exceptionals we might choose to bow and beg for the same information available to Americans (whose exceptionalism is set to be induced mostly because they get to use local networking and context setting that unhinders access to “ahem” things that are gotchas for the rest of us). Nothing like a bit of covert, denied and of course rather negative bias – to define exceptionalism. But we don’t.
So we use visual studio’s git client to download a repository for the xamarin auth library – having noted that the microsoft open source code expects it to be placed in
(on my system).
So we do this:
On a build host onto which xamarin studio and its visual studio integration kits have been installed and proved working when building and deploying android apps, then the android test build goes as this:
To this, we modify the provider so we can invoke our AAD tenant:
private async void OnClickLogin(object sender, EventArgs eventArgs)
var client = new MobileServiceClient(this.uriText.Text, this.keyText.Text);
var user = await client.LoginAsync(this, MobileServiceAuthenticationProvider.WindowsAzureActiveDirectory);
<?xml version=”1.0″ encoding=”utf-8″?>
<uses-permission android:name=”android.permission.INTERNET” />
<uses-permission android:name=”android.permission.ACCESS_NETWORK_STATE” />
<uses-permission android:name=”android.permission.GET_ACCOUNTS” />
<uses-permission android:name=”android.permission.MANAGE_ACCOUNTS” />
<uses-permission android:name=”android.permission.USE_CREDENTIALS” />
<uses-sdk android:minSdkVersion=”8″ android:targetSdkVersion=”8″ />