Test Harness Mode If device implementations support the shell command cmd testharness and run cmd testharness enable , they:. If device implementations report the support of Vulkan 1. If a device includes a particular hardware component that has a corresponding API for third-party developers:. If an API in the SDK interacts with a hardware component that is stated to be optional and the device implementation does not possess that component:. A typical example of a scenario where these requirements apply is the telephony API: Even on non-phone devices, these APIs must be implemented as reasonable no-ops.
Android includes facilities that automatically adjust application assets and UI layouts appropriately for the device to ensure that third-party applications run well on a variety of hardware configurations.
On the Android-compatible display s where all third-party Android-compatible applications can run, device implementations MUST properly implement these APIs and behaviors, as detailed in this section. The Android UI framework supports a variety of different logical screen layout sizes, and allows applications to query the current configuration's screen layout size via Configuration. Specifically, device implementations MUST report the correct logical density-independent pixel dp screen dimensions as below:.
If device implementations include an Android-compatible display s that is foldable, or includes a folding hinge between multiple display panels and makes such display s available to render third-party apps, they:. If device implementations include an Android-compatible display s that is foldable, or includes a folding hinge between multiple display panels and if the hinge or fold crosses a fullscreen application window, they:.
For details on correctly implementing the sidecar or extension APIs refer to the public documentation of Window Manager Jetpack. While there is no restriction to the aspect ratio of the physical display for the Android-compatible display s , the aspect ratio of the logical display where third-party apps are rendered, which can be derived from the height and width values reported through the view.
The Android UI framework defines a set of standard logical densities to help application developers target application resources. Device implementations SHOULD define the standard Android framework density that is numerically closest to the physical density of the screen, unless that logical density pushes the reported screen size below the minimum supported.
If the standard Android framework density that is numerically closest to the physical density results in a screen size that is smaller than the smallest supported compatible screen size dp width , device implementations SHOULD report the next lowest standard Android framework density. If device implementations include the Android-compatible display s or video output to the Android-compatible display screen s , they:.
Android includes support for Vulkan , a low-overhead, cross-platform API for high-performance 3D graphics. A device that supports Vulkan at a self-reported level indicates that it can pass the dEQP tests in all test lists from this level and earlier. If device implementations include support for Vulkan 1. Android includes a mechanism for applications to declare that they want to enable hardware acceleration for 2D graphics at the Application, Activity, Window, or View level through the use of a manifest tag android:hardwareAccelerated or direct API calls.
If device implementations claim support for wide-gamut displays through Configuration. The Android platform includes APIs that allow applications to render rich graphics to an Android-compatible display. Android includes support for secondary Android-compatible displays to enable media sharing capabilities and developer APIs for accessing external displays.
If device implementations support an external display either via a wired, wireless, or an embedded additional display connection, they:. The Home , Recents , and Back functions typically provided via an interaction with a dedicated physical button or a distinct portion of the touch screen, are essential to the Android navigation paradigm and therefore, device implementations:. This Menu function should be accessible unless hidden together with other navigation functions.
If device implementations provide the Assist function , they:. If device implementations use a distinct portion of the screen to display the navigation keys, they:. If a navigation function is provided from anywhere on the left and right edges of the current orientation of the screen:. Android includes support for a variety of pointer input systems, such as touchscreens, touch pads, and fake touch input devices.
Touchscreen-based device implementations are associated with a display such that the user has the impression of directly manipulating items on screen. Since the user is directly touching the screen, the system does not require any additional affordances to indicate the objects being manipulated.
If device implementations include a touchscreen single-touch or better on a primary Android-compatible display, they:. If device implementations include a touchscreen that can track more than a single touch on a primary Android-compatible display, they:. If device implementations rely on an external input device such as mouse or trackball i.
Fake touch interface provides a user input system that approximates a subset of touchscreen capabilities. For example, a mouse or remote control that drives an on-screen cursor approximates touch, but requires the user to first point or focus then click. Numerous input devices like the mouse, trackpad, gyro-based air mouse, gyro-pointer, joystick, and multi-touch trackpad can support fake touch interactions.
Android includes the feature constant android. If device implementations do not include a touchscreen but include another pointer input system which they want to make available, they:. If device implementations declare support for android.
If device implementations embed a controller or ship with a separate controller in the box that would provide means to input all the events listed in the below tables, they:. The logical value is defined to be the clockwise rotation away from the vertical axis; for example, a logical value of 0 represents no rotation and the up button being pressed, while a logical value of 1 represents a rotation of 45 degrees and both the up and left keys being pressed.
If device implementations include a particular sensor type that has a corresponding API for third-party developers, they:. The list above is not comprehensive; the documented behavior of the Android SDK and the Android Open Source Documentations on sensors is to be considered authoritative. Some sensor types are composite, meaning they can be derived from data provided by one or more other sensors.
Examples include the orientation sensor and the linear acceleration sensor. If device implementations include a particular sensor type that has a corresponding API for third-party developers and the sensor only reports one value, then device implementations:. If device implementations include a combination of 3-axis accelerometer, a 3-axis gyroscope sensor, or a magnetometer sensor, they are:.
If device implementations include a 3-axis accelerometer, a 3-axis gyroscope sensor, and a magnetometer sensor, they:. If device implementations include a 3-axis magnetometer, an accelerometer sensor, and a 3-axis gyroscope sensor, they:.
In open sky conditions after determining the location, while stationary or moving with less than 1 meter per second squared of acceleration:. If device implementations include a 3-axis gyroscope, an accelerometer sensor and a magnetometer sensor, they:.
If device implementations include a thermometer sensor that measures a temperature other than ambient temperature, such as CPU temperature, they:. If device implementations include a set of higher quality sensors as defined in this section, and make available them to third-party apps, they:. Note that all power consumption requirements in this section do not include the power consumption of the Application Processor.
It is inclusive of the power drawn by the entire sensor chain—the sensor, any supporting circuitry, any dedicated sensor processing system, etc. Biometric sensors can be classified as Class 3 formerly Strong , Class 2 formerly Weak , or Class 1 formerly Convenience based on their spoof and imposter acceptance rates, and on the security of the biometric pipeline.
This classification determines the capabilities the biometric sensor has to interface with the platform and with third-party applications. Sensors are classified as Class 1 by default, and need to meet additional requirements as detailed below if they wish to be classified as either Class 2 or Class 3.
Both Class 2 and Class 3 biometrics get additional capabilities as detailed below. If device implementations make a biometric sensor available to third-party applications via android.
BiometricManager , android. BiometricPrompt , and android. In order for device implementations to allow access to keystore keys to third-party applications, they:. If device implementations wish to treat a biometric sensor as Class 1 formerly Convenience , they:. If device implementations wish to treat a biometric sensor as Class 2 formerly Weak , they:. If device implementations are already launched on an earlier Android version and cannot meet the requirement C through a system software update, they MAY be exempted from the requirement.
If device implementations wish to treat a biometric sensor as Class 3 formerly Strong , they:. While these voice calls may or may not be packet-switched, they are for the purposes of Android considered independent of any data connectivity that may be implemented using the same network. If device implementations report the android.
The AOSP implementation meets these requirements by a heads-up notification which indicates to the user that answering an incoming call will cause the other call to be dropped. If device implementations include support for If device implementations include support for Wi-Fi Aware and expose the functionality to third-party apps, then they:. If device implementations include support for Wi-Fi Location and expose the functionality to third-party apps, then they:.
If device implementations include support for Wi-Fi keepalive offload and expose the functionality to third-party apps, they:.
If the Wi-Fi server certificate is not validated or the Wi-Fi server domain name is not set, device implementations:. Android includes support for Bluetooth and Bluetooth Low Energy. If device implementations include support for Bluetooth or Bluetooth Low Energy and the app manifest does not include a declaration from the developer stating that they are not deriving location from Bluetooth, then, they:.
If device implementations include NFC hardware and plan to make it available to third-party apps, they:. These standards are optional in this version but will be required in future versions. Existing and new devices that run this version of Android are very strongly encouraged to meet these requirements now so they will be able to upgrade to the future platform releases. The required level of IPv6 support depends on the network type, as shown in the following requirements.
If device implementations support more than one network type e. Webview API , they:. If device implementations support Open Mobile API -capable secure elements and make them available to third-party apps, they:.
A rear-facing camera is a camera located on the side of the device opposite the display; that is, it images scenes on the far side of the device, like a traditional camera. A front-facing camera is a camera located on the same side of the device as the display; that is, a camera typically used to image the user, such as for video conferencing and similar applications. If device implementations are capable of being rotated by user such as automatically via an accelerometer or manually via user input :.
Android includes two API packages to access the camera, the newer android. The older API package, android. Camera , is marked as deprecated in Android 5. All features that are common between the deprecated android. Camera class and the newer android. For example, with equivalent settings, autofocus speed and accuracy must be identical, and the quality of captured images must be the same.
Device implementations:. If device implementations use a portion of the non-removable storage to satisfy the above requirements, they:.
If the removable storage device port is in a long-term stable location, such as within the battery compartment or other protective cover, device implementations are:. For the purposes of this section, an "output port" is a physical interface such as a 3. Support for audio output over radio-based protocols such as Bluetooth, WiFi, or cellular network does not qualify as including an "output port". In order to be compatible with the headsets and other audio accessories using the 3.
If device implementations have a 4 conductor 3. The test requires an audio loopback dongle , used directly in a 3. Android includes support for VR Mode , a feature which handles stereoscopic rendering of notifications and disables monocular system UI components while a VR application has user focus. The media performance class of the device implementation can be obtained from the android.
Requirements for media performance class are defined for each Android version starting with R version The special value of 0 designates that the device is not of a media performance class. If device implementations return non-zero value for android. Some minimum performance and power criteria are critical to the user experience and impact the baseline assumptions developers would have when developing an app. A smooth user interface can be provided to the end user if there are certain minimum requirements to ensure a consistent frame rate and response times for applications and games.
Device implementations, depending on the device type, MAY have measurable requirements for the user interface latency and task switching as described in section 2. Device implementations, depending on the device type, MAY have certain requirements described in section 2 for the following read and write operations:.
If device implementations include features to improve device power management that are included in AOSP e. If device implementations extend power management features that are included in AOSP and that extension applies more stringent restrictions than the Rare App Standby Bucket , refer to section 3.
Conversely, at a time when a task that third-party apps implement through JobScheduler is triggered or Firebase Cloud Messaging is delivered to third-party apps, the device MUST exit the S3 state unless the user has put the device in an inactive state. These are not comprehensive examples and AOSP implements extensive wake-up signals that trigger a wakeup from this state.
A more accurate accounting and reporting of the power consumption provides the app developer both the incentives and the tools to optimize the power usage pattern of the application. Performance can fluctuate dramatically for high-performance long-running apps, either because of the other apps running in the background or the CPU throttling due to temperature limits.
Android includes programmatic interfaces so that when the device is capable, the top foreground application can request that the system optimize the allocation of the resources to address such fluctuations. If device implementations support reserving one exclusive core for the top foreground application, they:.
Specifically, they MUST enforce each permission and role defined as described in the SDK documentation; no permissions and no roles may be omitted, altered, or ignored.
MAY add additional permissions, provided the new permission ID strings are not in the android. Permissions with a protection level of dangerous are runtime permissions. Such data includes but not limited to:. TelephonyManager getServiceState requires android.
The only exceptions to the Android location permission properties above are for apps not accessing Location to derive or identify user location; specifically:. Main Repair Portal Page.
Repair Status Lookup. Zebra Certified Printer Supplies labels, media. Printer Supply Selector Tool. Printer Parts. About Zebra OneCare Services. Declaration of Conformity. RoHS Declarations. Zebra Open Source Usage. LifeGuard for Android Updates. Security Alerts. Product Recalls. VisibilityIQ Foresight Support. Developer Portal. Zebra TechDocs. Training and Certification. Android 4. Android 5. Bars denote different states for the thread:. To see what woke it, click the blue section.
The UI thread wakes, renders a frame, and enqueues it for SurfaceFlinger to consume. Figure 4 shows that, at 15, You can also see queueBuffer on both sides of the binder transaction.
During the queueBuffer on the SurfaceFlinger side, the number of pending frames from TouchLatency goes from 1 to 2. Figure 5 shows triple buffering, where there are two completed frames and the app is about to start rendering a third. This is because we've already dropped some frames, so the app keeps two pending frames instead of one to try to avoid further dropped frames.
Soon after, SurfaceFlinger's main thread is woken by a second EventThread so it can output the older pending frame to the display:. SurfaceFlinger first latches the older pending buffer, which causes the pending buffer count to decrease from 2 to 1. After latching the buffer, SurfaceFlinger sets up composition and submits the final frame to the display.
Some of these sections are enabled as part of the mdss tracepoint, so they may not be included on your SoC. When looking for jank, check the FrameMissed row under SurfaceFlinger. FrameMissed is a quality-of-life improvement provided by HWC2. When viewing systrace for other devices, the FrameMissed row may not be present if the device doesn't use HWC2. In either case, FrameMissed is correlated with SurfaceFlinger missing one of its extremely regular runtimes and an unchanged pending-buffer count for the app com.
Figure 11 shows a missed frame at SurfaceFlinger woke briefly at the vsync interval and went back to sleep without doing any work, which means SurfaceFlinger determined it wasn't worth trying to send a frame to the display again. To understand how the pipeline broke down for this frame, first review the working frame example above to see how a normal UI pipeline appears in systrace.
When ready, return to the missed frame and work backward. Notice that SurfaceFlinger wakes and immediately goes to sleep. When viewing the number of pending frames from TouchLatency, there are two frames a good clue to help figure out what's going on. Because we have frames in SurfaceFlinger, it's not an app issue.
In addition, SurfaceFlinger is waking at the correct time, so it's not a SurfaceFlinger issue. If SurfaceFlinger and the app both look normal, it's probably a driver issue. Because the mdss and sync tracepoints are enabled, we can get information about the fences shared between the display driver and SurfaceFlinger that control when frames are submitted to the display. These fences are provided as part of the sync trace category. Which fences correspond to particular events in SurfaceFlinger depends on your SOC and driver stack, so work with your SOC vendor to understand the meaning of the fence categories in your traces.
Figure 13 shows a frame that was displayed for 33 ms, not Halfway through that slice, that frame should have been replaced by a new one but wasn't. View the previous frame and look for anything. Figure 14 shows The broken two-frame segment was But Looking through the kernel source, you can see that it's part of the display driver.
It appears to be on the critical path for the display pipeline, so it must run as quickly as possible. If a given notification action causes an app to launch an activity or send a direct reply, users must unlock the device before the app can invoke that notification action.
On Android 12 API level 31 and higher, you can configure a notification action such that the device must be unlocked in order for your app to invoke that action, no matter what workflow the action launches. This option helps add an extra layer of security to notifications on locked devices. To require a device to be unlocked before your app invokes a given notification action, pass true into setAuthenticationRequired when creating your notification action, as shown in the following code snippet:.
By default, the notification's text content is truncated to fit on one line. If you want your notification to be longer, you can enable a larger text area that's expandable by applying an additional template, as shown in figure 8. Figure 8. An expandable notification for large text. You can also create an expandable notification with an image, in inbox style, a chat conversation, or media playback controls. For more information, read Create an Expandable Notification. To avoid bombarding your users with multiple or redundant notifications when you have additional updates, you should consider updating an existing notification rather than issuing a new one, or consider using the inbox-style notification to show conversation updates.
However, if it's necessary to deliver multiple notifications, you should consider grouping those separate notifications into a group available on Android 7. A notification group allows you to collapse multiple notifications into just one post in the notification drawer, with a summary. The user can then expand the notification to reveal the details for each individual notification. The user can progressively expand the notification group and each notification within it for more details.
Figure A collapsed and expanded notification group. To learn how to add notifications to a group, see Create a Group of Notifications. Starting in Android 8. By categorizing notifications into channels, users can disable specific notification channels for your app instead of disabling all your notifications , and users can control the visual and auditory options for each channel—all from the Android system settings figure Users can also long-press a notification to change behaviors for the associated channel.
On devices running Android 7. Notification settings for Clock app and one of its channels. One app can have multiple notification channels—a separate channel for each type of notification the app issues. An app can also create notification channels in response to choices made by users of your app. For example, you may set up separate notification channels for each conversation group created by a user in a messaging app.
The channel is also where you specify the importance level for your notifications on Android 8. So all notifications posted to the same notification channel have the same behavior. For more information, see Create and Manage Notification Channels. Android uses the importance of a notification to determine how much the notification should interrupt the user visually and audibly.
The higher the importance of a notification, the more interruptive the notification will be. On Android 8. Users can change the importance of a notification channel in the system settings figure On Android 7. Users can change the importance of each channel on Android 8. All notifications, regardless of importance, appear in non-interruptive system UI locations, such as in the notification drawer and as a badge on the launcher icon though you can modify the appearance of the notification badge.
For more information, see how to set the importance. Starting in Android 5. Notifications still appear in the system UI as normal, unless the user specifies otherwise.
Users can can allow notifications through based on system-wide categories left and based on who sent a message or who is calling right. For example, a payment app might have channels for notifications related to withdrawals and deposits. The user can then choose to allow either withdrawal notifications, deposit notifications, or both when in priority mode.
To properly configure your notifications for these user settings, you must set a system-wide category and channel. A notification is required when your app is running a "foreground service"—a Service running in the background that's long living and noticeable to the user, such as a media player. This notification cannot be dismissed like other notifications.
To remove the notification, the service must be either stopped or removed from the "foreground" state. For more information read Running a service in the foreground. And if you are building a media player, also read Using MediaStyle notifications with a foreground service. Beginning with Android 8. If your app posts multiple notifications in one second, they all appear as expected, but only the first notification per second makes a sound.
However, Android also applies a rate limit when updating a notification. If you post updates to a single notification too frequently many in less than one second , the system might drop some updates. Since Android 1. NotificationCompat is updated as the platform evolves to include the latest methods. It is important to note that the availability of a method in NotificationCompat does not guarantee that the corresponding feature will be provided on older devices.
In some cases calling a newly-introduced API results in a no-op on older devices. For example, NotificationCompat. Content and code samples on this page are subject to the licenses described in the Content License. App Basics. Build your first app. App resources. Resource types. App manifest file.
Device compatibility. Multiple APK support. Tablets, large screens, and foldables. Build responsive UIs. Build for foldables. Getting started. Handling data. User input. Watch Face Studio. Health services. Creating watch faces. Android TV.
0コメント