Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I enable the sync option by default when false in app?

Tags:

I use odoo mobile framework. How can I enable the sync option on app startup? (The option is disabled by default.)

enter image description here

like image 453
Naitik Avatar asked Sep 16 '16 07:09

Naitik


People also ask

Should Auto Sync be on or off?

If you leave auto-sync on, you may find your Android device running low on battery power much quicker than you want. So it's best to turn it off unless you really need it.

What is sync in Mobile?

Sync essentially syncs your contacts and other things with Google and other services. You may see all accounts on your phone by visiting Settings > Accounts and Sync. The Sync part of Android syncs things such as Documents, Contacts, and other things to services such as Facebook, Google, Ubuntu One...

What happens if I make changes to the default sync rules?

The default out-of-box sync rules have a thumbprint. If you make a change to these rules, the thumbprint is no longer matching. You might have problems in the future when you try to apply a new release of Azure AD Connect. Only make changes the way it is described in this article.

How do I Turn on sync settings?

1 Open Settings, and click/tap on the Accounts icon. 3 If you have not already, you will need to turn on sync settings in step 4 of Option One above first. By default, all individual sync settings are turned on. 5 When finished, you can close Settings if you like.

How do I enable/disable the do not sync browser settings policy?

In the right pane of Sync your settings in Local Group Policy Editor, double click/tap on the Do not sync browser settings policy to edit it. (see screenshot above) 4. Do step 5 (enable) or step 6 (disable) below for what you want.

How to turn off syncing on or off by default?

If you want syncing turned off by default but not disabled, select the Allow users to turn “browser” syncing on option. 7. You can close the Local Group Policy Editor if you like.


1 Answers

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 contentAuthority & 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.

like image 59
Martin Zeitler Avatar answered Oct 16 '22 19:10

Martin Zeitler