For an app I need to develop, I need to be able to sync with both gmail and facebook data using a SyncAdapter. I'm hoping to sync with the local facebook and gmail apps (if available) instead their remote servers. Syncing with the local apps would mean less battery usage, less network usage, faster syncing, etc. Of course, if needed, I will set the correct permissions.
My questions:
- If any of the apps (gmail/facebook) are available, is it possible to query them for data (messages, events, etc.)?
- If not, is it possible to get an authentication token (or any kind of credential) from them that will allow me to query the server without the user needing to put in a username and password of each of them again?
- If that's possible, is it also possible to automatically sync immediately after either of the facebook or gmail apps sync, so that I get new data as soon as they do?
If none of these are available, I guess I'll need to fetch the data myself, so that's not relevant for this question.