AccountUpdate PermissionDenied even with account.write = allow
AccountUpdate PermissionDenied even with account.write = allow
BY 13 Nov 2019Tizen .NET
I have written an app for my Galaxy Watch and everything seems to be working except account.write is throwing an exception when I am trying to update the account. I have the privilege in the manifest and if I do not have it turned on the app does successfully request it. I am able to read the account that was created once, but it no longer seems to function. Anyone have any idea what I am doing wrong? I have tried turning it on and off manually in settings and uninstalling and reinstalling the app. I also see this behavior in 2 different apps I have, both had a write succeed once, but after that it fails.
AccountUpdate PermissionDenied even with account.write = allow
I have written an app for my Galaxy Watch and everything seems to be working except account.write is throwing an exception when I am trying to update the account. I have the privilege in the manifest and if I do not have it turned on the app does successfully request it. I am able to read the account that was created once, but it no longer seems to function. Anyone have any idea what I am doing wrong? I have tried turning it on and off manually in settings and uninstalling and reinstalling the app. I also see this behavior in 2 different apps I have, both had a write succeed once, but after that it fails.
private bool EnsureAccountPermissions() { var privilege = "http://tizen.org/privilege/account.write"; var result = PrivacyPrivilegeManager.CheckPermission(privilege); if (result != CheckResult.Allow) { PrivacyPrivilegeManager.RequestPermission(privilege); return false; } privilege = "http://tizen.org/privilege/account.read"; result = PrivacyPrivilegeManager.CheckPermission(privilege); if (result != CheckResult.Allow) { PrivacyPrivilegeManager.RequestPermission(privilege); return false; } return true; }if (Account == null) Account = Account.CreateAccount(); Account.PackageName = "MyDemoApp"; Account.DisplayName = "MyDemoApp"; Account.UserName = UserName; Account.AccessToken = AccessToken; Account.SetCustomValue("VehicleName", VehicleName); Account.SecrecyState = AccountSecrecyState.Invisible; if (Account.AccountId == 0) { try { AccountService.AddAccount(Account); } catch (Exception e) { Log.Error("MyDemoApp", "MyDemoApp " + e.Message); } } else { try { AccountService.UpdateAccount(Account); } catch (Exception e) { Log.Error("MyDemoApp", e.Message); Log.Error("MyDemoApp", "MyDemoApp " + e.Message); } }BY
16 Apr 2025
Tizen Studio
BY
04 Nov 2024
Tizen Studio
BY
02 Apr 2024
Tizen Studio