Android Syncadapter: Retry
I'm using an AbstractThreadedSyncAdapter to synchronize some data with my server. I'm using SyncResult to indicate if there's been an error while performing the synchronization: sy
Solution 1:
Documentation say's: (http://developer.android.com/reference/android/content/ContentResolver.html#addPeriodicSync(android.accounts.Account, java.lang.String, android.os.Bundle, long))
Periodic syncs are not allowed to have any of SYNC_EXTRAS_DO_NOT_RETRY, SYNC_EXTRAS_IGNORE_BACKOFF, SYNC_EXTRAS_IGNORE_SETTINGS, SYNC_EXTRAS_INITIALIZE, SYNC_EXTRAS_FORCE, SYNC_EXTRAS_EXPEDITED, SYNC_EXTRAS_MANUAL set to true. If any are supplied then an IllegalArgumentException will be thrown.
Maybe that's the problem. Try remove this params - may work. Write if it helps.
Or You forgot permissions:
<uses-permissionandroid:name="android.permission.READ_SYNC_STATS" /><uses-permissionandroid:name="android.permission.READ_SYNC_SETTINGS" /><uses-permissionandroid:name="android.permission.WRITE_SYNC_SETTINGS" />
Post a Comment for "Android Syncadapter: Retry"