I use odoo mobile framework. How can I enable the sync option on app startup? (The option is disabled by default.)
odoo has a customer_sync_adapter.xml and a CustomersSyncProvider.java; when looking at the referenced ResPartner.java, it says that,
String AUTHORITY = BuildConfig.APPLICATION_ID + ".core.provider.content.sync.res_partner";. An
Account of type
com.odoo.auth is expected, while assigning the proper content authority is important, else it will resolve nothing.
ContentResolver.setSyncAutomatically(account, ResPartner.AUTHORITY, true);
for the other one
sync-adapter, the respective
accountType are required.
would only enable it on first run, or just ask the user. when always enabling it, it is difficult to disable it.