Info to display in a list in Android

I will try to make this as clear as I can. Please let me know if there is anything I can clarify.

I am downloading information from an SQL table in a database online to the phone. In the LogCat, I have been able to go through the table and see all the information I want. I am wondering about how best to save the information on the phone. I do not think that is necessary to create a new local database. Should I create a cursor with the information from the online database or store it in some kind of structure?

  1. The data does not need to be stored for a long time and when the application is closed it is ok to lose it.
  2. I want to be able to see information from one of the columns from the SQL table in a list format and then click on it and see all the information from the row of that item in another activity. I have done this in another part of the app but it is using data from a local database on the phone.

Here is some code to help clarify:

Log.d("Provider Tester", "Result printed is: " + result);     

    JSONArray jArray = new JSONArray(result);
       for(int i=0;i<jArray.length();i++){

                JSONObject json_data = jArray.getJSONObject(i);
                Log.i("log_tag","Name: "+json_data.getString("Name")+
                        ", DateTime: "+json_data.getString("DateTime")
                );

I want to be able to show a list of names and then click on a name and see the corresponding date.

Answers


If you are ok with loosing the data, you can keep it in memory as long as it is not too big.

As for the ListActivity, you would use an ArrayAdapter if your data is in memory.


Need Your Help

Combining noSQL and ORM in an MVC framework for a real-case application

django model-view-controller orm nosql playframework

I've been trying for some time to put some 'cool' things I've been reading about noSQL (couchDB, mongoDB, Redis...) in the past years into practical use.

XCode - Same classe name, two targets

xcode class xcode4 targets

I'm trying to regroup several applications I have in the same XCode project. So I created a new XCode project and added two targets, and import the source code of my two apps in one of the targets....

Alternatives to Windows Phone 8 Emulator

windows-8 visual-studio-2012 windows-phone-8 windows-phone-8-emulator

I have a computer with Windows 8 Enterprise (Evaluation) and an Intel Q8300 CPU (which does not support SLAT as far as I know).