i’m making an app that has a syncAdapter.
i wish to be able to do a requestSync together with some parameters that will be sent via its bundle . the reason is that i wish to choose what the syncAdapter instance would do .
for some reason , both putSerializable and putIntArray causes the ContentResolver to throw an exception :
08-16 14:34:49.080: E/AndroidRuntime(10318): java.lang.IllegalArgumentException: unexpected value type: java.util.MiniEnumSet
08-16 14:34:49.080: E/AndroidRuntime(10318): at android.content.ContentResolver.validateSyncExtrasBundle(ContentResolver.java:1144)
08-16 14:34:49.080: E/AndroidRuntime(10318): at android.content.ContentResolver.requestSync(ContentResolver.java:1111)
08-16 14:34:49.080: E/AndroidRuntime(10318): at com.sciatis.syncer.syncing.SyncAdapter.requestSync(SyncAdapter.java:100)
08-16 14:34:49.080: E/AndroidRuntime(10318): at
...
why does it happen? is there a way to overcome this ? putting an integer worked fine yet those operations didn’t.
am i doing something wrong ? is there a better way to achieve sending parameters to the syncAdapter from an activity ?
ContentResolver.requestSync says:
in that case you could try:
and then read those values in SyncAdapter: