Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to store data from my app

Tags:

android

Actually i want to know how to store data from my app in the device so that i can review the store data when i run the application again..

means in simple terms i want to say that suppose i have text box where i write some information..now when i click the submit button, this information will be save,so that when i open the application the stored data should be appear in the text box..

In all terms i want to say that i just want to stored data in the way that we are using database for storing data..so please anyone suggest me how that can be done in android.

if possible show with an example

Regards Anshuman

like image 909
AndroidDev Avatar asked Jun 28 '11 05:06

AndroidDev


People also ask

Where should I store my app data?

Every application in the device has some private storage in the internal memory and you can find this in android/data/your_package_name directory. Apart from this internal storage, the rest of the storage is called the Shared Storage i.e. every application with the storage permission can access this part of the memory.

Can you get data from an app?

Just as an app can send data to other apps, it can also receive data from other apps as well. Think about how users interact with your application and what data types you want to receive from other applications.

What apps can store data?

Dropbox: This app is available both on Android and on iOS. Users can use it to store documents, videos and other files.


1 Answers

If you have to store small amount of data, you can use SharedPreferences in Android.

If the data that you have to store is big/complex enough, try using SQLite database.

Still need help?

UPDATE: There's a tutorial that I wrote to demonstrate how to use SQLite database. check it out here. Although it copies existing database into device's memory, but other versions of it, which create database through code can also be devised from it.

A better tutorial is here : http://www.vogella.com/tutorials/AndroidSQLite/article.html

like image 61
Aman Alam Avatar answered Sep 23 '22 12:09

Aman Alam