private async Task registerDeviceAsync() { // register the device with the backend string device_id = "a-" + CrossDeviceInfo.Current.Id; DatabaseAPI dbase = new DatabaseAPI(); var response = await dbase.GetRegistrationInfo(device_id); if (response != null && (string)response["status"] == "error") { // device was not found in DB, so register as a new user var reg_response = await dbase.RegisterNewDevice(device_id, "Android", Android.OS.Build.VERSION.Sdk); if (reg_response != null && (string)reg_response["status"] != "ok") { Console.WriteLine("registerNewDevice Error: " + (string)reg_response["message"]); } } }