user1374520
user1374520

Reputation: 71

Is it possible to store all the application's data in sdcard?

We need to create our own file structure on sdcard for storing preference files,database files and files ?

Is this possible ? I know we can store files anywhere on sdcard but not sure about SQLiteDatabase files and Shared Preference files .

Please provide me suggestions on this.

Thanks in Advance.

Upvotes: 1

Views: 581

Answers (1)

Sreedev
Sreedev

Reputation: 6653

Ya its possible while developing an application.in manifest just give

android:installLocation="preferExternal" 

then the application and the file of the application will be dierectly written to the external storage of the device that is to the SD card.You will be having two more options "auto" and "intenalOnly" just like this

<manifest xmlns:android="*******************"
package="*************"
android:versionCode="1"
android:installLocation="auto"
android:versionName="1.0" >

<uses-sdk android:minSdkVersion="8" />

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.INTERNET"/>

Upvotes: 3

Related Questions