0

I'm using a syncadapter in my app. I've noticed that the app syncs properly when the wifi icon is green, but fails to sync when it is white, even though there is internet connection available in both cases.

How can I request sync when the wifi is white?

siamii
  • 23,374
  • 28
  • 93
  • 143
  • Does your application make use of Google services in the sync? The green WiFi icon on 2.3+ indicates a connection with Google services, the white icon indicates internet connection but no connection with Google services. – Joseph Earl Sep 25 '11 at 00:28
  • No. It only implements a SyncAdapter. It has its own account, unrelated to the Google account on the phone. – siamii Sep 25 '11 at 00:50
  • How often is the icon white? Have you tried checking the network (WiFi) connection state and logging that (LogCat)? – Joseph Earl Sep 25 '11 at 00:52
  • I can browse the internet without problems. It is sometimes white, sometimes green, changing about every two hours. When it's white for a long time, my app stops syncing. :( I haven't logged the wifi state, coz that's supposed to be managed by the sync adapter – siamii Sep 25 '11 at 00:57
  • Then perhaps the sync service does not bother running any SyncAdapters when the icon is white - primarily because the component was originally designed for syncing Google services? – Joseph Earl Sep 25 '11 at 01:04
  • I've been using this guide to implement it http://stackoverflow.com/questions/5146272/sync-adapter-without-account In the youtube video, they say that syncadapter is the recommended syncing pattern for all apps... – siamii Sep 25 '11 at 01:36

0 Answers0