A summary of the new features of Android 6.0 (Cotton candy)

Source: Internet
Author: User
Tags openssl library

A summary of the new features of Android 6.0 (Cotton candy)

With many new features and new features, Android6.0 (API level 23) has many changes in both the system and the API.

1.APP Permissions (software Rights Management) in Android 6.0, app licensing tips can be customized. It allows for a high degree of management of the app's permissions, such as where apps can be used, cameras, microphones, contacts, and so on, which are open to developers and users. As a developer, when your app's target version (target) is Android6.0 (API 23) or higher, make sure that permissions are checked and requested at run time. The new Method Checkselfpermission () can be used to determine whether your app has been granted permission, while Requestpermissions () can request permissions. Even if the target version of your app is below android6.0, you should test your app under the new Rights management model.

2.Chrome Custom Tabs (Web experience Promotion) The new version of M for Chrome's web browsing experience has been improved, it is the landing site, storage password, auto-complete data, multi-threaded browsing the security of the Web page to optimize some columns. The Android.provider.Browser.getAllBookmarks () and Android.provider.Browser.saveBookmark () methods are removed, and the same read_history_ Bookmarks and Write_history_bookmarks permissions are also removed. If the target version of your app is android6.0 or higher, do not access the global provider to get the bookmark, but instead you should save the bookmark data inside the app.

3.App links (App link) Android 6.0 strengthens the connection between the software, Google shows an example on the scene, such as your mobile phone inbox received an email, the text has a Twitter link, the user click on the link can be directly to the Twitter app, instead of the page.

4.Android Pay (Android paid) Android Pay Unified Standard, the new Android 6.0 system integrates with Android paid, its features are simple, safe, optional. Android Pay is an open platform that allows users to choose Google's services or use the bank's app to use it, Android Pay supports 4.4 system devices, and at the launch, Google announced that Android Pay has partnered with more than 700 stores in the US's top three carriers. The payment function can be paid using a fingerprint, which means that this year the Android M-based Nexus product will definitely have fingerprint identification.

5.Fingerprint Support (fingerprint supported) Android 6.0 added fingerprint recognition API, Google began to build in M self-official fingerprint identification support, to the Android unified solution, currently all of the Android product fingerprint recognition is using non-Google authentication technology and interface. New features Six: Power & Change (Battery Management) New power management module will be more intelligent, such as Android tablet for a long time not moving, Android 6.0M system will automatically close some apps. While the Android 6.0 device will support the USB Type-c interface, the new power management will better support the Type-c interface.

6. Sleep and apply Standby mode (Doze and app Standby)

This release introduces a new power-saving optimization scheme that works when devices and applications are idle. This feature affects all applications, make sure to do the appropriate testing.

Sleep mode (Doze): After a period of time when the phone is not plugged in and placed on the screen, the device goes into sleep mode, which puts the system to sleep state. In this mode, the device periodically resumes normal operation so that the application can synchronize and the system performs some necessary actions.

Apply Standby mode (app Standby): This mode allows the system to determine that the app is idle when the user is not using an app. The system is based on the decision of the user in a certain period of time no more click on the application (the main or based on the foreground process to determine). If the device is not connected to the charger at this time, the system disables network connection, synchronization, and task scheduling for the app.

Learn more about power saving changes, see Optimizing for Doze and app Standby (optimizing for Doze and app Standby)

7. Remove Appache HTTP client (Apache HTTP client removal)

The Android6.0 version removes support for the HTTP client for Appache. If the target version of your app is Android2.3 (API level 9) or higher, replace it with the HttpURLConnection class. This class uses transparent compression (transparent compression) and response caching (response caching) to minimize power consumption. If you wish to continue using the Appache Http API, please modify your build.gradle file,

Add the following: Android {

Uselibrary ' Org.apache.http.legacy '

}

8.BoringSSL
Android is replacing the OpenSSL library with the Boringssl library. This will affect the cryptographic libraries your app links to in the NDK, such as libcrypto.so and libssl.so, which are not part of the NDK API. These libraries are not public APIs, so changes to different versions and devices will not notify developers in a timely manner. Also, this will expose your application's security flaws. Therefore, you need to modify your native code to invoke the Java encryption API in a JNI manner or statically link the encryption library you choose.

9. Get the hardware identifier (access to Hardware Identifier)
In this release, in order to better protect the user's data, Android removes the device's local network identifier from the code that accesses the Wi-Fi and Bluetooth APIs. therefore wifiinfo.getmacaddress () and bluetoothadapter.getaddress () will always return 02:00:00:00:00:00
In order to get the hardware identifier of the peripheral device to be able to scan via Wi-Fi and Bluetooth, the app must have Access_fine_location and Access_coarse_location permissions:
Wifimanager.getscanresults ()
Bluetoothdevice.action_found
Bluetoothlescanner.startscan ()
Note: When a device running Android6.0 (API level 23) starts a background Wi-Fi or Bluetooth scan, this action is visible to the external device and is displayed as the address of a random Mac.

10. Notice (Notifications)
This release removes the Notification.setlatesteventinfo () method. Use the Notification.builder class to construct the notification, save and reuse the instance of Notification.builder in the case of repeated updates to the notification;

When the updated notification instance is obtained, its build () method is called.
The ADB Shell dumpsys Notification command no longer outputs your notification text, while the ADB shell dumpsys notification--noredact command outputs the text of a notification object.

11.AudioManager changes

This version no longer supports the use of the Audiomanager class to directly set volume and mute for specific audio streams, so: The Setstreamsolo () method is obsolete (deprecated), replacing the call Requestaudiofocus () method,

The Setstreammute () method is obsolete, the replacement call is the Adjuststreamvolume () method, and the passed-in value changes to Adjust_mute or Adjust_unmute

12. Text Selection (Selection)
After the user selects the text in the app, you can now display a floating toolbar (floating toolbar), display and cut, copy, paste, and interact with the implementation of the contextual action Bar (enabling the Contextual action mode for individual views)
To implement the floating toolbar after selecting the text, you need to make the following changes in the app code:
(1) In the View or activity object, the invocation of Actionmode is changed from Startactionmode (Callback) to Startactionmode (Callback, actionmode.type_floating )
(2) Replace the original actionmode.callback for Actionmode.callback2
(3) override the Ongetcontentrect () method to provide the position of the content Rect object (the text selection rectangle) in the view
(4) Call the Invalidatecontentrect () method when the rectangle is no longer valid as a unique element
If you are using Android support Library revision 22.2, be aware that the floating toolbar is not backwards compatible and because AppCompat takes over the Actionmode object by default, the floating toolbar is blocked from being displayed. In order to support Actionmode in Appcompatactivity, the Getdelegate () method needs to be called, The sethandlenativeactionmodesenabled () method is then called on the returned Appcompatdelegate object, and the input parameter is set to False, which returns control of the Actionmode object to the system framework layer. On Android6.0 (API level 23) devices, the frame layer supports Actionbar or floating toolbar mode, and only Actionbar mode is supported on Android 5.1 (API level 22) and the following devices.

This time, the main improvement of the new Android 6.0 system is to improve the user experience, fix bugs, improve the overall quality of the open platform, a lot of content has been improved, I believe from these new features can be seen.

????

A summary of the new features of Android 6.0 (Cotton candy)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.