


That way, the logic in your app gets the expected input in landscape mode. You need to translate the sensor data so that it makes sense for the current display rotation. The reference orientation for the Fire tablets is portrait mode, and the accelerometer readings are relative to a fixed coordinate system based on portrait orientation. When your app is in landscape orientation on a Fire tablet, for example in a game, use Display.getRotation() to check the display rotation when using raw accelerometer readings. SetRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE) Accelerometer Include the following in your AndroidManifest.xml file to specify that you want to use sensor-based landscape orientation:Īlternatively, in your code, you can use the following constant: Android API level 9 and later supports the attribute for sensor-based orientation. With sensor-based orientation, the system chooses landscape orientation or reverse landscape orientation based on the physical orientation of the tablet.

When creating an app for the Fire tablets that runs only in landscape mode, you should specify sensor-based landscape orientation in your AndroidManifest.xml. The following table shows orientation codes for the Fire tablets. To help ensure a good user experience, your app needs to account for changes in device orientation.
#Sidplay amazon fire install
