Sanal V
Sanal V

Reputation: 281

How developer can force an application to move to sd card

I am doing a Android application. When the users download the application, i want the application to be installed in sd card. Can i set any permission in manifest from the developer side so that when the user download the application, it either move automatically to sd card or ask the user for permission to move the app to sd card.Any suggestion in this case is helpful and highly appreciable

Thanks inAdvance

Upvotes: 0

Views: 1558

Answers (4)

Zala Janaksinh
Zala Janaksinh

Reputation: 2927

android:installLocation="preferExternal" in AndroidManifest.xml.
Try this it successfully worked for me.

Upvotes: 1

Anu
Anu

Reputation: 551

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
            package="string"
            android:sharedUserId="string"
            android:sharedUserLabel="string resource" 
            android:versionCode="integer"
            android:versionName="string"
            android:installLocation=["auto" | "internalOnly" | "preferExternal"] >
. . </manifest>

use preferExternal to move to sdcard Here there are other options also for future use..

Upvotes: 1

Sreedev
Sreedev

Reputation: 6653

    android:installLocation="preferExternal"

Youc an add thjis in your manifest.You will having more options.This link will help you.

Upvotes: 10

Paresh Mayani
Paresh Mayani

Reputation: 128428

You can set android:installLocation="preferExternal" in AndroidManifest.xml.

Check Android documentation for this attribute.

"preferExternal" => The application prefers to be installed on the external storage (SD card). There is no guarantee that the system will honor this request. The application might be installed on internal storage if the external media is unavailable or full, or if the application uses the forward-locking mechanism (not supported on external storage). Once installed, the user can move the application to either internal or external storage through the system settings.

Upvotes: 2

Related Questions