Open 1Androider opened 7 years ago
y don u try job schedulers ?
@kasim1011 what permission that would be? What's the line to be added to AndroidManifest.xml?
@flocsy
At authenticator.xml
<account-authenticator xmlns:android="http://schemas.android.com/apk/res/android"
android:accountType="com.odoo.auth"
android:icon="@drawable/ic_odoo"
android:label="@string/label_accounts_settings"
android:smallIcon="@drawable/ic_odoo">
</account-authenticator>
Change accounttype
attribute to your.package.name.auth
public class OdooAccountManager {
public static final String TAG = OdooAccountManager.class.getSimpleName();
public static final String KEY_ACCOUNT_TYPE = "com.odoo.auth";
public static final String KEY_USER_ACCOUNT_VERSION = "key_user_account_version";
...
Change KEY_ACCOUNT_TYPE
variable to your.package.name.auth
.
Make above changes than tell me whether app is running properly or not?
so it has nothing to do with permissions does it?
@flocsy The Error stack trace put by @1Androider has nothing to do with permissions.
Tell me, after doing above changes, app is working or not?
while executing this line
accountManager.addAccountExplicitly(account, String.valueOf(user.getPassword()), user.getAsBundle()))
getting error like Caused by: java.lang.SecurityException: uid 10328 cannot explicitly add accounts of type: com.odoo.auth at android.os.Parcel.readException(Parcel.java:1683) at android.os.Parcel.readException(Parcel.java:1636) at android.accounts.IAccountManager$Stub$Proxy.addAccountExplicitly(IAccountManager.java:995) at android.accounts.AccountManager.addAccountExplicitly(AccountManager.java:733) at com.odoo.core.auth.OdooAccountManager.createAccount(OdooAccountManager.java:111) at com.odoo.core.account.OdooLogin$AccountCreator.doInBackground(OdooLogin.java:441) at com.odoo.core.account.OdooLogin$AccountCreator.doInBackground(OdooLogin.java:428)Thanks in advance