Android P Beta gives developers a rich way to use these new, smart features and improve user engagement.
You can participate in Android P Beta right away on Your Pixel device. In addition, thanks to Project Treble, you can also experience this new version on high-end models from our partners like Essential, Nokia, Oppo, SONY, Vivo and Xiaomi, with more coming soon.
Please visit this website to learn all the devices that support this experience and how to install Android P Beta on them. To develop an app for Android P Beta, visit this website.
Please click on the blue font to go to the “Android Developers Official Documentation” for details
Build a “smarter” smartphone with machine learning at its core
Android P makes “smart” smarter by allowing smartphones to learn from and adapt to users. Now your application can leverage machine learning on native hardware to reach a larger audience and provide an experience they’ve never had before.
· Adaptive Battery
No matter what kind of phone users have, battery life is always a top concern. In Android P, we have partnered with DeepMind to launch a new feature called Adaptive Battery to optimise the power usage of individual apps.
These groups have different restrictions on system resource calls
If your App has been optimized for Doze, App Standby, and background running limits, it should already work well with dynamic battery management. We recommend that you test your app in each of the four app standby groups. Please read the relevant documentation for details.
The App, the Actions
When a user wants to do an action, App Actions recommends apps that can help them do that action, and the recommended features cover important interactions throughout the operating system, Such as Launcher, smart text selection, Google Play, the Google Search app, and Assistant.
App Actions uses machine learning to analyze users’ recent behaviors or usage scenarios to screen out apps that need to be recommended. Because these recommendations are highly relevant to what users currently want to do, this mechanism is very good for expanding new users and engaging existing users.
intentions
Conversational voice action
App Actions will be available to developers soon, and if you want to be notified about this, please click here to find the link to subscribe.
Slices,
New features coming with App Actions are Slices, which allow your applications to be plugged into multiple usage scenarios, such as Google Search and Assistant, in a modular, interactive way. Interactions supported by Slices include actions, switches, sliders, sliding content, and so on.
Started guide
SliceViewer tools
· Smart Reply in Notifications
Machine intelligence can lead to a very positive evolution in the user experience, as demonstrated successfully by the smart reply feature in Gmail and the Inbox. In Android P, smart replies have been added to notification messages, and we’ve prepared aN API to make you feel better about yourself. The ML Kit to help you more easily generate responses in notifications is coming soon, please visit this website for more details.
· Text recognition (Text Classifier)
In Android P, we extended the text-recognition machine learning model to recognize information such as dates or flight numbers, and made these improvements available to developers through the TextClassifier API. We also updated the Linkify API to take advantage of the results of text recognition to generate links and give users more clickable options so they can move faster to the next step. Of course, developers will also have more options when linking to text-recognized information. Intelligent Linkify has significantly improved recognition accuracy and speed.
The model is now being updated through Google Play, so your application can take advantage of the changes with the existing API. After installing the updated model, the device can directly identify the various information in the text, and the identified information is only saved on your phone, not spread across the network.
Please click on the blue font to go to the “Android Developers Official Documentation” for details
Concise (Simplicity)
With Android P, we’ve put a lot of emphasis on simplicity and improved Android’s UI to help users do things more smoothly and efficiently. For developers, a clean system makes it easier for users to find, use, and manage your applications.
· New System Navigation
We’ve designed a new navigation system for Android P that makes it easier to access the home screen, the Overview page, and Assistant by using the small button shown in the image below, which can be seen in all screens. The new navigation system also makes it easier to switch tasks and discover related applications. On the overview page, users can have a wider view of their previously interrupted actions, which naturally makes it easier for them to find and return to the previous application. The overview page also provides search, predictive recommendation apps, and the aforementioned App Actions, and it only takes one more swipe to get to the list of all apps.
· Text Magnifier
In Android P, we’ve added a new Magnifier widget that makes it easier to select text and adjust cursor position. By default, all classes that inherit from TextView automatically support a magnifying glass, but you can also use the Magnifying glass API to add it to any custom view for a more varied experience.
· Background Restrictions
Users can more easily find and manage apps that consume power in the background. With Android Vitals’ accumulated work, Android can identify behaviors that consume too much power, such as wakelock abuse. In Android P, the battery Settings page lists these apps directly, and users can limit their activity in the background with a single click.
Android Vitals Control panel
Background restrictions can effectively protect system resources from malicious consumption, thus ensuring that developers can have a basic and reasonable operating environment for their applications on different devices from different manufacturers. While manufacturers can add additional applications of restrictions to the list of restrictions, they must also give users control over those restrictions on the battery Settings page.
We added a standard API to help apps know if they are restricted, and an ADB command to help developers manually restrict apps for testing. Please refer to the relevant documentation for details. Next we plan to add a statistic to the Android Vitals control panel on the Play Console to show how restricted the app is.
· Enhanced Audio with Dynamics Processing
Android P adds Dynamic Processing effects to the audio framework to help developers improve sound quality. With dynamic processing, you can isolate specific frequencies of sound, reduce the volume that is too high, or enhance the volume that is too low. For example, even if the speaker is far away from the microphone and in a noisy or harsh environment, your application can effectively isolate and enhance his or her whisper.
The dynamic processing API provides multi-field, multi-band dynamic processing effects, including a pre-equalizer, a multi-band compressor, a post-equalizer, and a series volume limiter. This allows you to control the sound output of your Android device based on user preferences or changes in the environment. The number of frequency bands and the switch of each sound field are completely controllable. Most parameters support real-time control, such as gain, attack/release duration of signal, threshold value and so on.
Safety (Security)
· Biometric prompt for user identification
Android P provides a unified experience at the system level for the various user recognition mechanisms that have emerged on the market. Apps no longer need to provide their own user recognition interface, but use a unified BiometricPrompt API. The new API replaces the DP1 Version of the FingerprintDialog API and supports fingerprint recognition (including off-screen fingerprint recognition), face recognition, and iris recognition, all in one USE_BIOMETRIC permission. FingerprintManager and the corresponding USE_FINGERPRINT permission have been deprecated. Please switch to BiometricPrompt as soon as possible.
· Protected Confirmation
Android P added Android Protected Confirmation, This feature uses the Trusted Execution Environment (TEE) to ensure that a displayed prompt text is confirmed by a real user. TEE releases the text and can be verified by the application only after the user confirms it.
· Stronger protection for private keys
We added a new KeyStore type, StrongBox. Apis are provided to support devices that provide intrusion-proof hardware measures, such as separate cpus, memory, and secure storage. You can decide in KeyGenParameterSpec whether your key should be stored on the StrongBox security chip.
Android P Beta
Bringing a new version of Android to users will require a concerted effort from Google, chip suppliers, device makers and carriers. The process was full of technical challenges and didn’t happen overnight — to make the process smoother, we launched Project Treble last year and included it in Android Oreo. We have been working hard on this project with our partners and have seen the opportunities that Treble can bring.
We are announcing that the following six top partners will join us to bring Android P Beta to users around the world, including: SONY Xperia XZ2, Xiaomi Mi Mix 2S, Nokia 7 Plus, Oppo R15 Pro, Vivo X21UD and X21, and Essential PH‑1. Plus the Pixel 2, Pixel 2 XL, Pixel, and Pixel XL, we expect early adopters and developers from around the world to experience Android P Beta on these devices.
Check out today’s post for a list of beta partners and Pixel devices, as well as detailed configuration instructions for each device. If you use a Pixel device, you can now join the Android Beta Program and automatically get the latest Android P Beta.
Start playing Android P Beta on your favorite device and let us know your feedback! And stay tuned for the latest updates on Project Treble.
Ensure app compatibility
As more and more users get to play with Android P Beta, it’s time to start testing your app for compatibility so that you can fix the problems found during testing and release updates as soon as possible. See the migration manual for instructions and a timeline for Android P.
Download your app from Google Play and test the user flow on a device or emulator running Android P Beta. Make sure your app has a good experience and handles Android P behavior changes correctly. Pay particular attention to dynamic power management, changes in Wi-Fi permissions, restrictions on background calls to cameras and sensors, SELinux policies for application data, changes to default TLS enabled, and build.Serial restrictions.
· Compatibility through public APIs
Testing against non-SDK interfaces is important. As we’ve highlighted before, with Android P we’re gradually tightening up the use of non-SDK interfaces, which requires developers, including Google’s internal app team, to use public apis.
If your application is using a proprietary Android API or library, you need to use the API exposed by the Android SDK or NDK instead. In DP1 we have issued a warning to developers using proprietary interfaces. Starting with Android P Beta, calls to non-SDK interfaces (except for some of the proprietary apis that have been exempted) will result in an error — that is, your application will experience an exception, not just a warning.
To help you pinpoint the use of non-SDK apis, we’ve added two new methods to StrictMode. You can use detectNonSdkApiUsage() to get alerts when your application calls non-SDK apis through reflection or JNI, and you can also use permitNonSdkApiUsage() to prevent StrictMode from reporting errors for those calls. These methods can help you understand when your app is calling non-SDK apis, but be aware that even if the invoked apis are temporarily exempted, the safest thing to do is to give up using them as soon as possible.
If you do encounter situations where the public API does not meet your requirements, please let us know immediately. Please refer to the related documentation for more details.
· Test with display cutout
It is also important to test your application against notched screens. Now you can test on a partner running Android P Beta to make sure your app performs well on a notch screen. You can also test your app by opening the notch screen simulation in the Developer options for Android P devices.
Experience the Android P
Once you’re ready to develop, dig into Android P and learn about the new features and apis you can use in your applications. To help you explore and use the new API more easily, check out the API Change Report (API 27->DP2, DP1->DP2) and the Android P API documentation. Visit the developer preview site for details.
Download/update the Android P Developer Preview SDK and toolkit to Android Studio 3.1, or use the latest version of Android Studio 3.2. If you don’t have an Android P Beta device handy (or check out the next post today), use the Android P emulator to run and test your application.
Your feedback is always vital and we welcome your input. If you encounter problems during development or testing, please leave a comment below. Thank you again for your support along the way.
Please click on the blue font to go to the “Android Developers Official Documentation” for details