Android 8.1 Developer Preview
Today we're giving you an early look at Android 8.1. This update to Android Oreo includes a set of targeted enhancements including optimizations for Android Go (for devices with 1GB or less of memory) and a new Neural Networks API to accelerate on-device machine intelligence. We've also included a few smaller enhancements to Oreo in response to user and developer feedback.
We're bringing you this Developer Preview so you can get your apps ready; we've already been helping device makers prepare for this new version. We recommend starting soon -- we're expecting the final public version href="https://developer.android.com/preview/overview.html">in December.
It's easy to get Android 8.1 Developer Preview on your Pixel or Nexus device. Just enroll in the Android Beta Program -- you'll soon receive an over-the-air update to Android 8.1 beta. If you enrolled previously, you're all set, there's no need to re-enroll. The Developer Preview will be available for href="https://www.blog.google/products/pixel/new-pixel-2/">Pixel 2 and Pixel 2 XL devices, as well as for Pixel, Pixel XL, Pixel C, Nexus 5X, Nexus 6P, and the Android emulator.
What's in Android 8.1?
Android 8.1 includes select new features and developer APIs (API level 27), along with the latest optimizations, bug fixes, and security patches. Some of the new APIs include:
- Android Go memory optimizations and targeting -- Android 8.1 includes a set of memory optimizations for href="https://android-developers.googleblog.com/2017/05/whats-new-in-android-o-developer.html">Android Go configurations (1GB or less of memory). We've added href="https://developer.android.com/reference/android/content/pm/PackageManager.html#FEATURE_RAM_LOW">new hardware feature constants so you can now target the distribution of your apps and APK splits to normal or low-RAM devices running Android 8.1 and later.
- Neural Networks API -- as part of our efforts to bring machine intelligence to Android, we've added a href="https://developer.android.com/ndk/guides/neuralnetworks/index.html">Neural Networks API via the NDK. It enables hardware-accelerated inference operations on supported devices. We designed the Neural Networks API as a foundational layer for ML frameworks like TensorFlow Lite -- Google's upcoming cross-platform ML framework for mobile -- as well as Caffe2 and others. Stay tuned for TensorFlow Lite announcements.
- Autofill enhancements -- we've made it easier for password managers and other Autofill services to use the href="https://developer.android.com/guide/topics/text/autofill.html">Autofill framework. For example, we've added support for more UI customization of the Save dialog, as well as href="https://developer.android.com/reference/android/widget/BaseAdapter.html#setAutofillOptions(java.lang.CharSequence...)">setAutofillOptions() for users to set credit card expiration using a spinner.
- Shared memory API -- this new API lets apps allocate shared memory for faster access to common data. Apps can map anonymous shared memory and manage protection controls using the href="https://developer.android.com/reference/android/os/SharedMemory.html">SharedMemory API. The API is parcelable, AIDL friendly, and exposes useful features like removing write permissions.
Take a look at href="https://developer.android.com/preview/api-overview.html">Android 8.1 site for more information, including the href="https://developer.android.com/sdk/api_diff/27/changes.html">diff report and updated API reference docs.
Test your apps on Android 8.1
With the consumer launch coming href="https://developer.android.com/preview/overview.html">in December, it's important to test your current app now. This gives users a seamless transition to Android 8.1 when it arrives on their devices.
Just enroll your eligible device in href="http://www.android.com/beta">Android Beta to get the latest update, then install your app from Google Play and test. If you don't have a Pixel or Nexus device, you can set up an Android 8.1 emulator for testing instead. If you notice any issues, fix them and update your app in Google Play right away -- without changing the app's platform targeting.
Build with new features and APIs
When you're ready, take advantage of the new features and APIs in Android 8.1, which we've already finalized as API Level 27. For an overview of what's new, take a look at href="https://developer.android.com/preview/api-overview.html">Android 8.1 for Developers. You can also extend your apps with established Android Oreo features as well, see the href="https://developer.android.com/about/versions/oreo/android-8.0.html">Android Oreo site for details.
If your app uses forms, make sure to test them with href="https://developer.android.com/guide/topics/text/autofill.html">autofill so that users can take advantage of this convenient feature. Enable "Autofill with Google" or a similar service in Settings and test the form fills to make sure they work as expected. We strongly recommend href="https://developer.android.com/guide/topics/text/autofill.html#providing_hints_for_autofill">providing explicit hints about your fields, and also href="https://developers.google.com/identity/smartlock-passwords/android/associate-apps-and-sites">associating your website and mobile app, so that logins can be shared between them.
Speed your development with Android Studio
To build with Android 8.1, we recommend updating to href="https://android-developers.googleblog.com/2017/10/android-studio-30.html">Android Studio 3.0, which is now href="https://developer.android.com/studio/index.html">available from the stable channel. On top of the new app href="https://developer.android.com/studio/profile/android-profiler.html">performance profiling tools, support for the href="http://android-developers.googleblog.com/2017/05/android-announces-support-for-kotlin.html">Kotlin programming language, and Gradle build optimizations, Android Studio 3.0 makes it easier to develop with Android Oreo features like href="https://android-developers.googleblog.com/2017/05/android-instant-apps-is-open-to-all.html">Instant Apps, href="https://developer.android.com/guide/topics/ui/look-and-feel/downloadable-fonts.html">XML Fonts, href="https://developer.android.com/guide/topics/ui/look-and-feel/downloadable-fonts.html">downloadable fonts, and href="https://developer.android.com/guide/practices/ui_guidelines/icon_design_adaptive.html">adaptive icons.
We also recommend updating to the href="https://developer.android.com/topic/libraries/support-library/revisions.html?utm_campaign=android_launch_npreview_061516&utm_source=anddev&utm_medium=blog">Android Support Library 27.0.0, which is available from href="https://developer.android.com/studio/build/dependencies.html#google-maven">Google's Maven repository. New in this version are: a href="https://developer.android.com/reference/android/support/content/ContentPager.html">ContentPager library for efficiently loading "paged" data on a background thread; ViewCompat href="https://developer.android.com/reference/android/support/v4/view/ViewCompat.html#getImportantForAutofill(android.view.View)">wrappers for Autofill methods; an href="https://developer.android.com/wear/releases/index.html">AmbientMode headless fragment that improves Wear ambient mode support, fullscreen Trusted Web Activities, and more. See the href="https://developer.android.com/topic/libraries/support-library/revisions.html#27-0-0">version notes for more information.
You can update your project's compileSdkVersion
to API 27 to compile against the official Android 8.1 APIs. We also recommend updating your app's targetSdkVersion
to API 27 to test with compatibility behaviors disabled. See the href="https://developer.android.com/preview/setup-sdk.html">this guide for details on how to set up your environment to build with Android 8.1.
Publish your updates to Google Play
The Android 8.1 APIs are already final, so we've opened Google Play for apps compiled against or targeting API level 27. When you're ready, you can publish your APK updates in your alpha, beta, or production channels. Make sure that your updated app runs well on Android 8.1 as well as older versions. We recommend using Google Play's href="https://developer.android.com/distribute/engage/beta.html?utm_campaign=android_launch_npreview_061516&utm_source=anddev&utm_medium=blog">beta testing feature to run an alpha test on small group of users, then run a much larger open beta test. When you're ready to launch your update, you can use a href="https://developer.android.com/distribute/best-practices/launch/progressive-updates.html">staged rollout. We're looking forward to seeing your app updates!
Give us your feedback!
As always, your feedback is crucial, so please href="https://developer.android.com/preview/feedback.html">let us know what you think. We've set up different hotlists where you report href="https://issuetracker.google.com/issues/new?component=190602&template=809005">Android platform and tools issues, href="https://issuetracker.google.com/issues/new?component=190602&template=808305">app compatibility issues, and href="https://issuetracker.google.com/issues/new?component=190602&template=809305">third-party SDKs and tools issues. We also have a new hotlist for href="https://issuetracker.google.com/issues/new?component=190602&template=1024216">Neural Networks API issues.
You can also give us feedback through the href="https://plus.google.com/communities/105153134372062985968/stream/755bb91d-c101-4e32-9277-1e560c4e26d2">Android Developer community or href="https://plus.google.com/communities/106765800802768335079">Android Beta community as we work towards the consumer release in December.
Komentar
Posting Komentar