//protected override void AttachBaseContext(Context newBase) //{ // base.AttachBaseContext(CalligraphyContextWrapper.Wrap(newBase)); //} private void ShowLoginView() { SetContentView(Resource.Layout.MainParadiset); loginButton = FindViewById <Button>(Resource.Id.loginButton); registerButton = FindViewById <Button>(Resource.Id.RegisterButton); forgotButton = FindViewById <Button>(Resource.Id.ForgotButton); buttonwMainViewVersion = FindViewById <Button>(Resource.Id.buttonwMainViewVersion); #if DEBUG buttonwMainViewVersion.Text = "Version " + AndroidHelper.GetAppVersion() + "_dev"; #else buttonwMainViewVersion.Text = "Version " + AndroidHelper.GetAppVersion(); #endif //Anropar GCM Service if (IsPlayServicesAvailable()) { var intent = new Intent(this, typeof(RegistrationIntentService)); StartService(intent); } HandleEvents(); setCurrentClientTheme(); }
async public void SendRegistrationToAppServer(string sDeviceToken) { //Skicka en token tillsammans uniqe UUID till Relevate try { string sUserToken = Joyces.Helpers.Settings.AccessToken; if (!string.IsNullOrEmpty(sUserToken)) { string sUUID = Android.Provider.Settings.Secure.GetString(ContentResolver, Android.Provider.Settings.Secure.AndroidId); string sSystemOSVersion = System.Environment.OSVersion.Version.ToString(); string sAppID = Application.Context.PackageName + ".android"; string sAppVersion = AndroidHelper.GetAppVersion(); string sCustomerName = Joyces.Platform.AppContext.Instance.Platform.CustomerList.name; string sCustomerId = Joyces.Platform.AppContext.Instance.Platform.CustomerList.accountNumber; string sPlatform = "Android"; var result = await RestAPI.PostDeviceInformation(sAppID, sAppVersion, sSystemOSVersion, sUUID, sCustomerName, sPlatform, sDeviceToken, sUserToken, sCustomerId); } } catch (Exception ex) { } }