New features and functions of cotton candy in Android 6.0

Source: Internet
Author: User

New features and functions of cotton candy in Android 6.0

Get you apps ready for Android 6.0 running mallow!

New features: Permission reminders during runtime, Doze (NAP mode) and backup power, assistance with new technologies, etc.

Android 6.0 Changes

With new features and functions, Android 6.0 (API level 23) has made some changes in the system and API usage.

If we have released an app, we should pay attention to whether these changes will affect the running of the app.

RuntimePermissions

This is a new permission usage model. You can directly manage the permissions of an application while running the program. In the process of simplified installation and automatic upgrade, users are provided with transparent and controllable permission management methods.

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

In versions 6.0 and later, you must request permissions when running the program.

(1) checkSelfPermission ()

// Determine whether your program has permissions.

(2) requestPermission ()

// Request Permissions

For details, see:

Dozeand App Standby

Optimize the battery capacity of devices and applications to increase the endurance. Because this feature affects all applications, we recommend that you test the application on the 6.0 platform.

Doze: If the screen of a device is closed and in the static state, after a period of time, the device enters the Doze mode and tries to sleep the device. In this mode, the device is periodically restored to the formal State, so that the application can be synchronized, and the system can process some unfinished operations.

App Standy: when users are not actively using an application, App standby allows the system to leave the application idle by default. If the device is not connected to the power supply,

The system will disable network connection for the application, pause synchronization and other work content, and the application is idle.

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

ApacheHTTP Client Removal

Android 6.0 removes the Apache Http support. If the app uses it and the version is later than or equal to Android, you can use the HttpURLConnection class. This Api is more effective because it reduces network usage and power consumption through transparent compression and response caching.

To continue using Apache Http APIs, you must

(1) declare in the buid. gradle file:

(2) introduce the jar package org. apache. http. legacy. jar.

Package address: sdk \ platforms \ android-23 \ optional

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.