java - SyncAdapter is not considering static variables set by Main thread -


The Android Syncadapter is not considering static variable values ​​defined by the main thread. Since the stable variable continues through the application, it is likely to be shared in threads. But SyncAdapter is not considering the main values ​​that are fixed by the main thread and are taking default values. Help me find a solution for this. I need to use my constant values ​​to sync the cameras.

Android can stop your process at any time and you are not guaranteed that when your SyncAdapter starts So, the process will go live, therefore, you should use other options to store your values ​​for SyncAdapter:

  • You pass your values ​​with the bundle when you are using ContentResolver. Request sync with requestSync ()
  • Share references and syncAdapter to them Read
  • Save values ​​to SQL databases and query them SyncAdapter.

Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -