0
public static void syncImmediately(Context context) {
    Bundle bundle = new Bundle();
    bundle.putBoolean(ContentResolver.SYNC_EXTRAS_EXPEDITED, true);
    bundle.putBoolean(ContentResolver.SYNC_EXTRAS_MANUAL, true);
    ContentResolver.requestSync(getSyncAccount(context), context.getString(R.string.content_authority), bundle);
}


 SyncRequest request = new SyncRequest.Builder().syncPeriodic(syncInterval, flexTime).setSyncAdapter(account, authority).setExtras(new Bundle()).build();
 ContentResolver.requestSync(request);

when i call request sync immediately it works but with a delay of a time interval it dosen't

Nikhil Soni
  • 1,011
  • 1
  • 11
  • 23
  • So what is the result when you use it on a time interval? What different methods have you tried to resolve the issue? Please see [How do I ask a good question](http://stackoverflow.com/help/how-to-ask) and if possible try to revise your question to help others understand the desired output. – CmdrSharp Nov 05 '16 at 05:12
  • I want to database to sync periodically with the server on calling syncImmediately its syncs but on adding a syncInterval its dosenot sync in the background – Nikhil Soni Nov 05 '16 at 09:00

0 Answers0