I'm hoping someone can shed some light on this for me as I am a bit confused as to the "why" of it all. I am using a WebView in my application but I am finding that it is not always correctly syncing my cookies. I have looked at multiple code examples for the CookieSyncManager and they all say to call CookieSyncManager.getInstance().stopSync(); from within onResume(). My question is, if my application is being resumed why would I want to stop syncing cookies? Shouldn't I be calling CookieSyncManager.getInstance().stopSync(); in onPause() since my application is losing focus and there won't be anything to sync? Am I just not understanding the way this works properly?
Here is one of the code examples I'm speaking of. It seems like most other examples I see use the same or similar code.
http://developer.android.com/reference/android/webkit/CookieSyncManager.html