This is for #264 - support for Set objects in SharedPreferences.
#264 - using Apache ObjectSerializer.
Merge remote-tracking branch 'upstream/develop' into 264_sharedpref_s…
Merge & move things in the right place again.
Ensure the stringset files will generated as well.
Ensure to use canonical name constants
Merge branch 'develop' of https://github.com/excilys/androidannotations…
… into 264_sharedpref_string_set
Merged latest upstream/develop changes. Would be good to know whether it will be merged or not?
Sorry for the late reply. I don't have time to check this PR until next week. Maybe @JoanZapata @pyricau @mathieuboniface could take a look ? :)
Just to answer quickly, I'm not a big fan of binary encoding... I'd prefer encoding like json which keep some readability.
But I don't really know which is the best for this case. Any thought ?
Yes, serializing with JSON is another option. Android supports this using the org.json (http://developer.android.com/reference/org/json/package-summary.html) package. Will re-implement using that if we have a decision about it.
I believe android encodes StringSet as XML in recent releases, so my opinion is that AA should do the same.
This PR needs to be updated
This feature could really be interesting. @JoanZapata was right : SharedPreferences are stored using XML, so we should de it the same way.
@ened Sorry Do you have any more time to work on this ?
@DayS should have, but not too soon. Could someone point me to the part in the AOSP which handles (de-)serialization? Would certainly save some time.
I'll check that
Merge https://github.com/excilys/androidannotations into 264_sharedpr…
Update to latest AA code changes.
PR is updated, will now look into using the XML solution as outlined in http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/4.2.2_r1/android/app/SharedPreferencesImpl.java#596 above.
@DayS one a side note: I found it would be useful to have support for additional types as well, like Set<Integer>. Do you think this is something AA could/should include? It's not part of the standard Android API though. Same as adding support for short preferences.
Thanks for the update :) I'll take a look at this today.
Yeah, it could be a good idea. But I think we should add a note in javadoc to warn user that this is not natively supported by Android.
I can't find your new serialization implementation. Am I crazy or is it just a mistake ? :)
@DayS new implementation is the next task (for this week). Just updated the PR to be valid again.
@ened Is this still something you're working on?
@ened are you still working on this?
@ened i can take over if you do not have the time to finish this.
@WonderCsabo > It'll be great :)
@WonderCsabo yes please & thanks for helping out.
This one has been merged through #962