Sunday, August 5, 2012

[android-developers] provider, thread and async

Hi, you may look into the code of the AndStatus application ( https://github.com/andstatus/andstatus/wiki ). It does background work in the service (MyService). In particular it downloads data into a database.
Activities send messages to the MyService and get responses back using broadcasts, see MyServiceConnector.

BTW, global variables will not work in this scenario, because there are TWO copies of the code instanciated in two processes. See MyPreferences class.

The code has a lot of debug logging ...

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate