pawan pathak
pawan pathak

Reputation: 1

storing user defined object in some where in android

HELLO FREINDS ,

I am developing one android application i want to store user defind objects for fututre so how i can achieve this can anyone help me because for this small thing i dont want to use database.

plz help me Thanks &Regards pawan pathak

Upvotes: 0

Views: 85

Answers (3)

amukhachov
amukhachov

Reputation: 5900

You may serealize it and save as text file. Then when you need this object you have just to read file and deserealize it in you object. For primitive data types it's better to use Shared Preferences.

Upvotes: 0

Gabriel Negut
Gabriel Negut

Reputation: 13960

Check out SQLite or SharedPreferences (the latter works if you know in advance how many objects you will store, e.g. a configuration class).

Upvotes: 1

Haphazard
Haphazard

Reputation: 10948

If you don't want to use the database, you can Serialize them to the SD Card or the app data location.

Upvotes: 0

Related Questions