# AndroidPreferredInstallLocation

> Options for preferred storage location for the application installation on Android devices.

## Definition

* **Type:** Enum
* **Namespace:** [UnityEditor](/engine/6000.5/script-reference/unityeditor.md)
* **Assembly:** UnityEditor.CoreModule

```csharp
public enum AndroidPreferredInstallLocation
```

## Remarks

These options indicate whether the application should be installed on an internal or external storage of the Android device. You can pass a value from this enum to [\_preferredInstallLocation](/engine/6000.5/script-reference/unityeditor/playersettings/android/preferredinstalllocation.md).

## Examples

```csharp
using UnityEngine;
using UnityEditor;
using UnityEditor.Build;

public class PreferredInstallLocationSample : MonoBehaviour
{
    [MenuItem("Build/Preferred Install Location Sample")]
    static void BuildPreferredInstallLocationSample()
    {
        PlayerSettings.SetScriptingBackend(NamedBuildTarget.Android, ScriptingImplementation.IL2CPP);
        PlayerSettings.Android.targetArchitectures = AndroidArchitecture.ARM64;

        // Set preferredInstallLocation to PreferExternal
        // This allows your app to be installed on external storage (SD card)
        PlayerSettings.Android.preferredInstallLocation = AndroidPreferredInstallLocation.PreferExternal;

        var options = new BuildPlayerOptions();
        options.scenes = new[] { "Assets/Scenes/SampleScene.unity" };
        options.locationPathName = "Build/AndroidBuild.apk";
        options.target = BuildTarget.Android;
        options.targetGroup = BuildTargetGroup.Android;
        BuildPipeline.BuildPlayer(options);
    }
}
```

## Fields

| Value                                                                                                           | Description                                                                                   |
| --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- |
| [Auto](/engine/6000.5/script-reference/unityeditor/androidpreferredinstalllocation/auto.md)                     | The Android OS determines the install location. The application doesn't have any preferences. |
| [ForceInternal](/engine/6000.5/script-reference/unityeditor/androidpreferredinstalllocation/forceinternal.md)   | Forces the application to install into internal memory.                                       |
| [PreferExternal](/engine/6000.5/script-reference/unityeditor/androidpreferredinstalllocation/preferexternal.md) | Prefers application installation on external storage, if available.                           |
