| Apr | MAY | Jun |
| 30 | ||
| 2020 | 2021 | 2022 |
COLLECTED BY
Collection: Save Page Now
android.hardware.touchscreenfeature will also work on Chrome OS devices that support the android.hardware.faketouchfeature. However, to ensure your app works on all Chromebooks, go to your manifest file and adjust the settings so that the android.hardware.touchscreenfeature is not required, as shown in the following example. Removing the requirement for touch input means you should also review your app's support for mouse and keyboard interactions.
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
... >
<!-- Some Chromebooks don't support touch. Although not essential,
it's a good idea to explicitly include this declaration. -->
<uses-feature android:name="android.hardware.touchscreen"
android:required="false" />
</manifest>
Different hardware devices come equipped with different sets of sensors. Although Android handheld devices often have GPS and accelerometers, these sensors are not guaranteed to be available in every Chromebook. However, there are cases where the functionality of a sensor is provided in another way. For example, Chromebooks may not have GPS sensors, but they still provide location data based on Wi-Fi connections. See the Sensors overview document for an overview of all of the sensors that the Android platform supports. If you want your app to run on Chromebooks regardless of sensor availability, you should update your manifest file so that none of the sensors are required.
ticular sensor for your app but still use measurements from the sensor when it's available, make sure you dynamically check for the sensor's availability before trying to gather information from it in your app.
Some software features are unsupported on Chromebooks. For example, apps that provide custom IMEs, app widgets, live wallpapers, and app launchers aren't supported and won't be available for installation on Chromebooks. For a complete list of software features that aren't currently supported on Chromebooks, see incompatible software features.
targetSdkVersionattribute to the latest API level available, your app can take advantage of all the improvements in the Android platform. For example, Android 7.0 (API level 24) brings enhancements to multi-window support. It allows you to resize activities with free-form resizing, making them feel more natural. You can also access APIs for drag-and-drop operations across apps and custom mouse cursors.
screenOrientationunspecifiedis best. If you specify the orientation as landscape, consider using sensorLandscapeinstead to make sure that the experience on a tablet is optimal. If you have special size or orientation requests you should also consider adding the new meta tags as size or orientation hints—which only affects desktop environments. If you also want to change it on phones, you should specify layout defaultHeight, defaultWidth, or minHeightinstead.
If you are interested in specific input device handling for specific device categories, you should specify android.hardware.type.pcto disable the input compatibility mode.
If you are using any kind of networking, make sure that the app is able to reconnect to the network after a connection problem is resolved or the device wakes from sleep mode.
Google recommends checking the Test cases for Android apps on Chrome OS, which you can use in your own test plan. The test cases cover a wide array of common scenarios that Android apps should be prepared for if they are expected to run on Chrome OS devices.
ViewModelto save and restore your state when appropriate.
To test state persistence you should minimize your app for some time, start another resource intensive process and then restore your app to validate that it returns to the state in which you left it.
Test window resizing by pressing the full screen key (F4), maximizing, and restoring. Test free resizing by enabling it in the developer options and checking that your app smoothly resizes without crashing.
If your Chrome OS device supports it, change from laptop into tablet mode to see that everything works as expected. Rotate the device once in tablet mode to test orientation changes. Transition back into laptop mode. Repeat this step a few times.
Make sure that the top bar is not breaking your app by offsetting UI elements or location-based touch input. For Chrome OS devices, make sure that your app does not place important information in the status bar area.
If you are using the camera or other hardware features—like the pen—make sure that it behaves properly when performing the window and device changes as outlined above.