# Input for Android devices

> Understand how to detect and handle user input on different types of Android devices.

Mobile devices are the primary target for Android applications. Unity provides an [Input System package](https://docs.unity3d.com/Packages/com.unity.inputsystem@latest) to handle user input on Android devices. This input solution is enabled by default for new projects.

> **Note:**
>
> Unity also supports the legacy [Input Manager](/engine/6000.6/manual/input/legacy/class-input-manager.md) for existing projects. You can choose between the two input solutions through **Android Player settings** > **Other Settings** > **Configuration** > [**Active Input Handling**](/engine/6000.6/manual/platform-specific/android/getting-started/class-player-settings.md#AndroidApplicationConfiguration).

The Input System package supports a variety of input devices on the Android platform, including mouse, keyboard, pen, touchscreen, sensors, joystick, and gamepads. For more information, refer to [Supported input devices](https://docs.unity3d.com/Packages/com.unity.inputsystem@latest?subfolder=/manual/supported-devices-reference.html) in the Input System package documentation.

For additional input features on Android, refer to the following sections:

## On-screen keyboard support

Android devices automatically display an on-screen touchscreen keyboard when users select editable UI elements, such as Input Fields created using [UGUI](https://docs.unity3d.com/Packages/com.unity.ugui@latest?subfolder=/manual/script-InputField.html), or TextField controls created using [UI Toolkit](/engine/6000.6/manual/uitoolkits/uielements/uie-element-ref/uie-uxml-element-text-field.md), or [IMGUI](/engine/6000.6/manual/uitoolkits/ui-imgui/gui-controls.md). Unity automatically activates the Android keyboard and handles input from it. If you want to manually activate and configure the Android touchscreen keyboard behavior, refer to [Mobile Keyboard](/engine/6000.6/manual/input/mobile-keyboard.md).

## Gamepad and rumble support

Unity provides gamepad support allowing users to use physical controllers when playing your Android games. You can configure the level of gamepad support in the **Android Player settings** > **Other Settings** > **Configuration** > [**Android Gamepad Support Level**](/engine/6000.6/manual/platform-specific/android/getting-started/class-player-settings.md#AndroidApplicationConfiguration). To handle gamepad input, use the [Input System package APIs](https://docs.unity3d.com/Packages/com.unity.inputsystem@latest?subfolder=/manual/query-gamepads.html).

Unity also supports rumble with gamepad controllers on Android devices, allowing controller vibration in response to in-game events and improving the overall gameplay experience. To implement rumble support, use the [Input System package APIs](https://docs.unity3d.com/Packages/com.unity.inputsystem@latest?subfolder=/manual/gamepad-haptics.html).

**Notes**:

* Rumble support varies depending on the Android OS version.
* The Input System package APIs support rumble with gamepad controllers. If you want to trigger vibration of the Android device itself, use the [`Handheld.Vibrate`](/engine/6000.6/script-reference/unityengine/handheld/vibrate.md) API.

## Additional resources

* [Introduction to Input](/engine/6000.6/manual/input/introduction.md)
* [`gamepadSupportLevel` API](/engine/6000.6/script-reference/unityeditor/playersettings/android/gamepadsupportlevel.md)
