Pass cursor to new Activity

by GabeRC » Mon, 05 Oct 2009 11:34:12 GMT


Sponsored Links
 I'm working on an app, and one activity has a worker thread that
initiates a database query, and if there are results once it has
returned I would like to send these results to a new activity that
will display them. Unfortunately I don't see a way to pack the Cursor
object into the Intent object that I am using to start the new
activity. When I was doing Windows Mobile development in the past all
I would do is edit the constructor for the window to pass in the data,
I've searched around but I can't find a similar solution for Android.
What is the best way to pass my database results into the new activity?

--~--~---------~--~----~------------~-------~--~----~



Pass cursor to new Activity

by Mark Murphy » Mon, 05 Oct 2009 11:37:57 GMT


 > What is the best way to pass my database results into the new activity?

Have the new activity do the database work in the first place.

-- 
Mark Murphy (a Commons Guy)
 http://commonsware.com 
Android App Developer Books:  http://commonsware.com/books.html 



--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


Pass cursor to new Activity

by Agus » Mon, 05 Oct 2009 11:38:06 GMT


 Can't you do a db query again in the destined activity?





--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. Emulator clock app are not the same time with the display on top bar

Has anyone noticed that the time on the clock application and the time
on the top bar is not the same? It is the same when they first started
out. But then after that the one on the top bar stop updating. Is it
me?

Cheers,

--~--~---------~--~----~------------~-------~--~----~

2. Req Info abt DDMS tool

Hello Friends,

Can u plz tell me how to use the DDMS tool, I never get my application
in the left pane. How can i use DDMS for getting information about my
application.

Is there any documentation available for DDMS tool other than the one
provided in android documentation.

If i dont use the DDMS tool, instead use the DDMS perspective inside
eclipse, i get my application in the left pane, but dont get
Allocation Tracker Tab in the right pane, is there any option/setting
to get this tab in DDMS perspective.

Also, tell me if there is any other way to get application level
details like memory usage and timing information.

Any help appreciated.

Thanks & Regards
Amit

--~--~---------~--~----~------------~-------~--~----~

3. Marketplace details now available

4. J2ME apps for Android

5. any demo code for speech recognizer part

6. Intent for sending email

7. GPRS configuration