Recently, Google officially released Android M, named "Marshmallow". What new technologies and changes are there for developers? This article attempts to summarize the new technologies and changes that Android 6.0 (API 23) brings to developers.
Permission Management Permission management is a change in Android M ***. Permission management is more refined, and the previous static authorization during installation has been changed to dynamic authorization during runtime. Everyone has been complaining about Android permissions for a long time, and Android should be able to greatly improve this problem. The main changes are:
For developers, you need to be careful when handling permissions. When using a certain function, you need to always determine whether the permission is required and request user authorization in an appropriate way. For more information about Android M permissions, please refer to the official documentation. APP Linking This is a technology that directly connects APP and web pages, allowing APP to directly process the ordinary URL link of your website to display the corresponding website content. This is definitely an improvement worth paying attention to, and the gap between the Web and APP will become smaller and smaller. This is very beneficial for applications that have both websites and APPs, such as Zhihu and Taobao. It is similar to the previous APP Deep Link, which can also allow the APP to directly open the corresponding content through a special Schema. The characteristic of APP Linking is that it only needs to use the traditional URL, and it corresponds to a specific APP based on the domain name of the URL. All developers need to do is make a corresponding declaration in AndroidManifest.xml. If you want the system to open the corresponding URL with your APP by default, you also need the website to provide assetlinks.json. For details, please refer to here. Automatic backup of APP data Supports automatic backup of APP data to Google Drive. When you change your phone, you can directly restore the APP data to your phone. You can also configure which data needs to be backed up or not. And it is automatically realized without writing any code. For details, please refer to here. However, these are of no use to domestic developers. Some domestic manufacturers' ROMs already have or are preparing to catch up, and everyone can enjoy such convenience at that time. Fingerprint unlocking Android officially supports fingerprint authentication, which can be used for unlocking or any other place where user authentication is required, such as payment. A new API FingerprintManager is provided to allow third-party apps to obtain fingerprint authentication functions. For specific usage, please refer to this example. Direct sharing Direct sharing is to pop up a list of objects to be shared to other apps directly in the APP, omitting the operations such as selecting the APP to be shared and selecting "Contacts". Sharing in Android is already very good, and here it is further simplified. If you want your APP to support direct sharing, you need to implement a ChooserTargetService and implement the corresponding Activity to handle the sharing Intent. For specific usage, please refer to here. Support Bluetooth stylus The system has built-in support for Bluetooth stylus, so the Android system supports high-end stylus by default. It also provides an API for your app to respond to stylus events. Bluetooth Low Energy Scanning Optimization Optimized low-power Bluetooth scanning. Now there are more and more low-power Bluetooth applications, and many apps need to scan devices. Scanning devices is a very heavy operation. I hope this change can bring some improvements. ColorStateLists with theme support Use context.getColorStateList(int id) to get the ColorStateLists corresponding to the current theme. Camera API Provide API setTorchMode()) to directly switch the flashlight, and can monitor the flashlight's on/off status. In the past, many apps already supported using the flashlight as a flashlight, and now the official API is provided to do this. Starting from Android 5.0, a new camera API Camera2 is provided, on which processing-related APIs are added. other There are many other improvements, but I won’t go into detail because they involve too many professional aspects or the relevant functions are not used. You can refer to the official overview:
|
<<: Writing high-quality code starts with naming
>>: Learn more! Five pillars of interaction design that are worth your in-depth understanding
What are the various variations of words in searc...
Now is the season when mulberries are on the mark...
Download the report: Add 199IT’s official WeChat ...
I graduated from university with a major in e-com...
Cantonese embroidery is composed of Guangzhou emb...
At present, the statement of "Hongmeng/Ark O...
The construction of an account is like a pyramid,...
"The account is at risk. Please verify the o...
People are full of fantasies about flying, and th...
For the State Administration of Radio, Film and T...
The summer clothes that had been lying around for...
Some time ago, I was walking on the street and se...
This article is an analysis of Pinduoduo's ca...
Course Catalog ├──01. Getting started for no-sour...
YouTube is the world's largest original video...