[android-developers] Re: Should I Be Using AsyncTask?

2009-10-22 Thread Ken H

I think I solved it. While in the actual AsyncTask I can listen for
button clicks and such just like normal. So I just set up buttons and
listeners to set the direction and speed of the cursor reading method.

On Oct 21, 5:00 pm, Ken H hunt1...@gmail.com wrote:
 I have an app that stores gps data into a SQLite db. I want to 'play'
 that data back. I was having trouble getting that to work until I
 stumbled across Romain Guy's blog on painless threads -- thank you
 Romain!

 Now that I got that to work, I want to do things like stop, pause,
 backup, replay...like a little VCR. But the AsyncTask has that one-
 time-use condition (which in practice means that I *can* replay if I
 let the thread finish, leave and come back). But that's a little much
 for the users to live with.

 Question: is there a better way? Plain english answers greatly
 appreciated! :)

 Ken
--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Should I Be Using AsyncTask?

2009-10-22 Thread James Yum

Hi,

Please read this post for an alternative:

http://android-developers.blogspot.com/2007/11/stitch-in-time.html

It's a bit old, but the technique should work. Please consider if it
makes more sense for your app.

Cheers,
James

On Thu, Oct 22, 2009 at 8:19 AM, Ken H hunt1...@gmail.com wrote:

 I think I solved it. While in the actual AsyncTask I can listen for
 button clicks and such just like normal. So I just set up buttons and
 listeners to set the direction and speed of the cursor reading method.

 On Oct 21, 5:00 pm, Ken H hunt1...@gmail.com wrote:
 I have an app that stores gps data into a SQLite db. I want to 'play'
 that data back. I was having trouble getting that to work until I
 stumbled across Romain Guy's blog on painless threads -- thank you
 Romain!

 Now that I got that to work, I want to do things like stop, pause,
 backup, replay...like a little VCR. But the AsyncTask has that one-
 time-use condition (which in practice means that I *can* replay if I
 let the thread finish, leave and come back). But that's a little much
 for the users to live with.

 Question: is there a better way? Plain english answers greatly
 appreciated! :)

 Ken
 


--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---