Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8244501
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T21:52:22+00:00 2026-06-07T21:52:22+00:00

I am using the syncadaptor extensively in my application for its core functionality. I

  • 0

I am using the syncadaptor extensively in my application for its core functionality. I also use the periodic refresh provided by the syncadaptor. Hence it the “Accounts and sync” is disabled on a phone my application will be pretty much useless. Is it considered a bad practice or rude to do a ContentResolver.setMasterSyncAutomatically(true) to turn the sync on. By just doing a ContentResolver.setIsSyncable doesnt help since if the main account and sync is disabled then periodic syncs dont work.
What is the common way of handling this scenario?

Thanks in advance,

-v-

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T21:52:23+00:00Added an answer on June 7, 2026 at 9:52 pm

    I would call this bad practice.

    There are two different enable flags for sync which serve different functions.

    Master Sync is a single enable flag for ALL syncrhonization regardless of account type or content type. This setting is “Auto-Sync” on the Accounts & Sync page and a user typically turns it off to save battery. Some users might (ab)use it to go into a sort of “do not disturb” mode. Programatically, this is checked and unchecked through ContentResolver.setMasterSyncAutomatically()

    Secondly, your Account/Authority pair has an enable flag. So, say a google account. You click on the google account and then you get a subpage… Sync drive, sync google play music, sync contacts, sync gmail… etc. Each of those is an Account(com.google) and an Authority(com.android.contacts), paired together. They are individually controllable, so I can have a google account that syncs contacts but not my calendar. Further, even the available items in the list can vary — I might have one account that has google music installed but another that does not — so the list of things in that subpage can vary, and what’s checked or unchecked can vary. Note that the account shows a green sync circle if there is an authority attached that is syncable, but the account itself is not sycable in isolation. Programatically, this is checked and unchecked through ContentResolver.setSyncAutomatically(), and is enabled/disabled (greyed out) through ContentResolver.setIsSyncable(). You would grey it out when it’s not configured.

    Your app is well within its rights to turn sync on and off for its own account/authority pair (Though you should respect the user’s wishes.) Think like a “sync enabled” checkbox on your app’s sync settings page that reflects state to/from the A&S subpage through (get/set)SyncAutomatically()

    Yes, your app can change the master sync flag — But in doing so, you really need to consider whether you’re going over the user’s head to make decisions about how their phone works. This can help users who don’t know how to work their phones, and will seriously piss off users who do. I would instantly uninstall an app that changed my phone-wide sync settings without my permission. The furthest I personally would go is to perhaps popup a dialog to the user when they configure sync — “Sync is configured, but will not be performed until Auto-Sync is turned on in the Accounts & Sync page. Would you like to turn Auto-Sync on?” and then fire an intent to take them them to the A&S page to turn it on if they say yes. That helps a user understand how their phone works, rather than just changing things behind their back and making it even more a mystery.

    Overall, you should never reconfigure the phone without getting consent from the user.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using Android TelephonyManager an application can obtain the state of data activity over the
Using Core Data, I have a fetch request to fetch the minimum of a
I was using cancelRequest() from within my SyncAdapter, just before it exits its thread,
Using PyObjC , you can use Python to write Cocoa applications for OS X.
Using Rails 3 and ActiveModel, I am unable to use the self. syntax to
Using IOS, I am trying to integrate the LinkedIn into the application. The integration
I am creating a new Android app using SyncAdapter to handle db sync. I
Using a CSS image sprite, I'm creating an 'interactive' image where hovering over certain
Using a populated Table Type as the source for a TSQL-Merge. I want to
using this http://bl.ocks.org/950642 we can see how to add images to nodes, the question

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.