requirement
product need to research backup contacts/bookmark/events function with device can switch multiple users.
two schemes
- search developer.android.com with key words: multiple users backup
- create demon project and test when switch to different users
progress
- searched key words in google and developer.android.com for a half day and failed
- get the key code and test for half day.
key code
- get contacts
ContentResolver resolver = ctx.getContentResolver();
Cursor c = resolver.query(ContactsContract.Contacts.CONTENT_URI, null,null, null, null);
ContentResolver resolver = ctx.getContentResolver();
Cursor c = resolver.query(ContactsContract.Contacts.CONTENT_URI, null,null, null, null);
-
get Bookmarks
<span style="font-weight: normal;">ContentResolver resolver = ctx.getContentResolver(); Cursor cursor = resolver.query(Browser.BOOKMARKS_URI, null, null, null, null);</span>
-
get Events
<span style="font-weight: normal;">ContentResolver cr = ctx.getContentResolver(); cur = cr.query(CalendarContract.Events.CONTENT_URI, null, null, null, null);</span>