Passing query result into new activity.

Problems with WiFi, SQLite ,Bluetooth, WiMax, Proxies, etc...

Passing query result into new activity.

Postby GabeRC » Thu Oct 01, 2009 11:03 pm

Hello everyone,

Here is the problem that I am facing: in one activity I have a worker thread that queries a database, if results are found I want to start a new activity that displays the results. Everything is working perfectly except I cannot figure out how to send the Cursor object that I have that contains the query results to the new activity, it doesn't seem to be possible to put it into a Bundle and put it in the Intent. What is the proper way to do what I am trying to do? Thanks.
GabeRC
Once Poster
Once Poster
 
Posts: 1
Joined: Thu Oct 01, 2009 11:00 pm

Top

Postby umair » Mon Oct 05, 2009 6:47 am

Well...one simple way is:

1- Extract results from cursor
2- Put them in a list or an object
3- Pass the new object to next activity
4- In next activity, use the extracted results the object contains
Muhammad Umair
User avatar
umair
Developer
Developer
 
Posts: 28
Joined: Thu Feb 26, 2009 1:00 pm
Location: Lahore, Pakistan

Top

Return to Networking & Database Problems

Who is online

Users browsing this forum: No registered users and 4 guests