Question

I have GoogleAccountCredential object from google api that i create in my activity and i need it in my sync adapter.How can i send it to there?I suppose synchronization take place in another process ,so it is possible to have object from activity in sync adapter's onperfromsync method?

Was it helpful?

Solution

You can use 3rd param of ContentResolver.requestSync to pass arguments to your SyncAdapter. They will be available in extras Bundle in onPerformSync callback in your sync adapter.

You cannot pass any object using this method (see requestSync docs), but it migth be good enough for your use case (for example you can pass Account objects).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top