New features and APP adaptation concerns for Android P

While most users are still waiting to get their hands on the taste of Android Oreos, Google released a developer preview of Android P in the spring, which already supports manual reader packs and emulators for Pixel, Pixel XL, Pixel2, and Pixel2 XL devices. Android

P introduces a series of changes to the Android system. Most of these changes affect all apps, regardless of which Android version they are targeting; However, some of the changes only affect apps developed for Android P. Here are 7 updates and improvements that are most relevant to the test students.

Bear the brunt, is the official optimization of abnormal bangs!





Android P supports the latest full-screen and bangs (not to mention ugly, the look of the phone needs a breakthrough now). Google has added the DisplayCutout class to manage identified non-functional areas. And add the new window layout attribute layoutInDisplayCutoutMode to layout for the content of the fringe area.

There is no doubt that there is an urgent need for a significant update in compatibility testing, as there are currently three types of bangs available in developer mode.





At present, Huawei, OPPO and Xiaomi have launched several bang-screen models, covering high school users. Bang-screen support and testing of applications in different sizes and specifications are important test points for improving user satisfaction in the future. You can download the Android P Preview emulator in Android Studio to test how your app looks in different bangs.

Wi-fi RTT support

Android P adds support for the IEEE 802.11 MC Wi-Fi protocol (also known as Wi-Fi)

Round-trip-time (RTT)) platform support, and provides RTT

API to assist in measuring distance from WIFI access points that support RTT protocol. This function can be applied to indoor positioning, navigation, Internet of things interaction, greatly improving the accuracy of indoor positioning, shopping and shopping has a new weapon.





Notice again notice

Notification has been the focus of Google’s updates in recent years, with Android P adding text-message images and quick replies. From notification groups and notification channels in 8.0 to notification updates released in 9.0, we are gradually getting rid of annoying ads and countless piles of notifications, which Android has been ahead of the iPhone.













Screen rotation optimization

Are you still bothered by the meaningless vertical and horizontal switching when watching videos or chatting on wechat? Android P has added a mode to avoid this dilemma by adding a spin button in the navigation bar that can be manually triggered if necessary.





This update is a challenge for application adaptation and testing, especially for video applications. The original portrait mode has been upgraded to rotation lock mode, which is enabled when auto rotation is turned off. At this point, the APP cannot simply be locked for vertical display. The following points need to be paid attention to during the test

1. Pay attention to the compatibility of the physical navigation button and whether it supports the latest Features of Google

2. Pay attention to whether the corresponding interface of the app displays in landscape or portrait mode. If the screenOrientation attribute is set for development, this new feature can be ignored and the behavior is consistent with Android O

3. This mode involves a concept of rotation suggestion, that is, the rotation preference suggested to the user in the navigation bar above. When the mobile phone is 90 degrees clockwise, the rotation suggestion will be displayed. Google has come up with a chart summarizing common rotation behaviors





In the current use process, I feel that this function is a little complicated for users to understand, and it may be optimized in the subsequent preview version.

Privacy privacy!! Take another swipe at background apps! Limit input and sensor data for background application access.

After the APP runs in the background, the APP shall not access the microphone or camera, and the sensor will not receive events. If you want to use these data in the background, you need to declare the foreground service to inform the user that the APP is running in the background.

When the APP under test has the function of background navigation, step counting and other functions using sensors, the tester should pay attention to the scene in time.

Apply compatibility changes

Android P displays the use of some non-SDK functions and fields, which are not accessible either directly or through reflection or JNI calls. At present, In the developer preview version of P, Google has not fully implemented this restriction. When the APP calls the restricted SDK, it will print a prompt in the log, for example:




Testers can use automated filters to verify compatibility with new versions of their applications.

Upgrading security Features

To highlight! Android P does not allow multiple processes to share a single WebView data directory, which typically stores cookies, HTTP caches, and other persistent and temporary storage related to web browsing. Google provides an adaptation scheme for multi-process applications using WebView. The test students need to pay more attention to the adaptation of this directory when testing browser, video and information applications.







According to Google’s release schedule, there will be five developer preview releases before AOSP and Oems release the final Android P, with the first 9.0 release expected in the fall. October and November will be another competitive period for the early release of new phones. Oneplus, Huawei, Samsung and Xiaomi will certainly follow up the latest version at the first time, and the test tasks and work of compatibility and adaptation will be quite heavy at that time. As a tester, it’s essential to do your homework ahead of time, to be prepared, and to be able to adapt to rapid version iterations better than developing ahead of the technical details. Hope this article can provide some help to test partners.

By the way, you can guess the official version of Android P in the comments. Marshmallow, Nougat, Oreo have eaten, what will the next generation be called?


The resources

https://developer.android.com/preview/index.html#compatibility