1

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 .

Community
  • 1
  • 1
Mithun Sarker Shuvro
  • 3,902
  • 6
  • 32
  • 64

1 Answers1

1

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.

OJunker
  • 62
  • 8
  • And almost 3 years later somebody is having the same issue. How can i debug the sync adapter process? I tried to debug only by a filter in logcat (Just Log message: "My Message", for example), but i am having no luck. – Juan Ignacio Avendaño Huergo Jun 29 '18 at 17:18