Android 6.0 System cotton candy new features and functions

Source: Internet
Author: User

Get your apps ready for Android 6.0 marshmallow!

New features: Run-time permission reminders, Doze (snooze mode) and backup power, assist with new technologies, and more.

Android 6.0Changes

With the new features and functionality, Android 6.0 (API level 23) has made some changes to the system and the use of the API.

If we've already released an app, then we need to focus on whether the changes will affect the app's operation.

Runtimepermissions

This is a new permission usage model that allows users to manage the app's permissions directly while the program is running. Provides a transparent and controllable way for users to manage permissions in processes such as simplified installation and automatic upgrades.

Recommendation: Even if your build target setting is not android6.0 (API23), you should test it in the new mode of 6.0.

In 6.0 and later, to request permissions while the program is running.

(1) checkselfpermission ()

Determine if your program has permissions.

(2) Requestpermission ()

Request permission

For details, please refer to:

Dozeand App Standby

power optimization for restricted devices and applications increases battery life, and since this feature affects all applications, it is recommended that the application be tested on 6.0 platforms.

Doze: If a device screen is turned off, at rest, after a period of time, the device enters Doze mode, which attempts to put the device into hibernation. In this mode, the device is periodically restored to a formal state so that the application can occur synchronously, and the system can handle some unfinished operations.

App Standy: When users are not actively using an app, app standby allows the system to default to the app being idle. If the device is not connected to a power source,

The system will disable network connections for the app, pause syncing and other work, and the app is idle.

To learn more about these power-savingchanges, see Optimizingfor Doze and App Standby.

Apachehttp Client Removal

Android 6.0 removes Apache HTTP support, and if the app uses it and the version is greater than or equal to Android2.3, you can replace it with the HttpURLConnection class. This API is more efficient because it reduces network usage and power consumption through transparent compression and response caching.

If you want to continue using the Apache Http API, you must

(1) in the Buid.gradle file, declare:


(2) Introduction jar package: Org.apache.http.legacy.jar

The package address: sdk\platforms\android-23\optional


Android 6.0 System cotton candy new features and functions

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.