Mithun Sarker
Mithun Sarker

Reputation: 4023

Running simple syncdapter with stub authenticator and stub provider

I am trying to implement a simple sync adapter with stub provider (which I got from answer of this question) and stub authenticator . And for authentication I used basic sync adapter example provided by google . On perform sync I just want to print a msg on log cat

   public void onPerformSync(Account account, Bundle bundle, String s, ContentProviderClient contentProviderClient, SyncResult syncResult) {
        Log.i("SyncAdapter", "Sync adapter testing");
    }

and from main activity I just called the sync adapter like this

 mAccount = GenericAccountService.GetAccount();
    mResolver.addPeriodicSync(
            mAccount,
            AUTHORITY,
            Bundle.EMPTY,
            10);

But it doesn't working though it creates a authenticator account , but the log messages are not showing .

Upvotes: 2

Views: 340

Answers (1)

OJunker
OJunker

Reputation: 62

make sure you are checking the right logs, the logs sync adapter creates are not posted under your application, but under the sync adapter it self.

Upvotes: 1

Related Questions