0

I am implementing a sync functinality for my app , it is executing the sync code after specified amount of time i.e. after 15 mins (for now), but the code in my custom SyncAdapter doesn't get executed.

I have defined my service in AndroidManifest.xml as follows:

 <service
            android:name="packagename.SyncService"
            android:exported="true"
            android:process=":sync" >
            <intent-filter>
                <action android:name="android.content.SyncAdapter" />
            </intent-filter>

            <meta-data
                android:name="android.content.SyncAdapter"
                android:resource="@xml/syncadapter" />
        </service>

and I have implemented onPerformSync() in custom SyncAdapter , but this code never gets executed,

also onCreate() or onStartCommand() of SyncService is never invoked, any pointers with respect to this might be helpful,

P.S :Have read many similar questions on this forum,but none have helped my cause,

Vihar
  • 3,626
  • 2
  • 24
  • 47

1 Answers1

0

Debugging sync adapter

Use logging instead of putting debugging breakpoints as your code executed by a different process.

Normally breakpoints will work only for main process running your app which is not the case for your sync adapter code; it is run by a different process.


Also check debugging service.

Community
  • 1
  • 1
dsharew
  • 10,377
  • 6
  • 49
  • 75