Android Sync Adapter Service not calling onCreate

473 views Asked by At

I am having trouble getting the service started for Sync Adapter and Accounts. The framework doesn't call onCreate methods.

For Sync Adapter,

I have create following components:

  1. Sync Service (class that extends Service)
  2. Sync Adapter (class that extends AbstractThreadedSyncAdapter)
  3. Sync_Adapter.xml
  4. AuthenticatorService (class that extends Service)
  5. Authenticator (extends AbstractAccountAuthenticator)
  6. account_authenticator.xml

And updated the entry in the manifest.xml

And that's it.

I don't see any logs reported from onCreate from either services. Do I have to manually start them?

Please help.

Cheers, Raj

I have followed the documents to create

The documents I have followed to write sync adapter are: https://developer.android.com/training/sync-adapters/creating-sync-adapter.html http://blog.udinic.com/2013/04/24/write-your-own-android-authenticator/ https://github.com/Udinic/SyncAdapter/tree/master/SyncAdapterExample

1

There are 1 answers

0
mimi On

I recommend you first download and run the Sample SyncAdapter app from android team.