What is the preferred method of data handling?

Put problem concerning Views, Layouts and other XML-Resources (like AndroidManifest) here.

What is the preferred method of data handling?

Postby mad_coder » Mon Dec 15, 2008 6:47 pm

It seems there are a multitude of ways to get data from one activity to the next. I'm curious what the android 'preferred' way is of passing/getting that data (and/or your preferred way).

Some examples of different ways to transfer data:
-putExtra() // primitives, serialized objects, ...?
-saving the data to a database and retrieving it
-saving the data to a file and loading it
-I'm sure there's others...

For example, Data classes A, B, & C all contain data relative to the app. Sometimes passing one of these will do, but sometimes passing two, or all three is required.

The only good option I see is to save all the data to files, then load what is needed in the new activity. This seems like it could produce some significant delay in an activity transition.

What would you do to get data objects form one activity to the next (without using the database option)?

:?:
mad_coder
Freshman
Freshman
 
Posts: 8
Joined: Mon Dec 15, 2008 8:28 am
Location: Bangkok, Thailand

Top

Postby mad_coder » Sat Dec 27, 2008 4:42 am

So I downloaded the anddev PDF, and it answered most of my question!

Thanks for the great document, I'm looking forward to future versions.
mad_coder
Freshman
Freshman
 
Posts: 8
Joined: Mon Dec 15, 2008 8:28 am
Location: Bangkok, Thailand

Top

Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: No registered users and 11 guests