Summary of new technologies in Android 6.0

Summary of new technologies in Android 6.0

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.

[[146632]]

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:

  • In the system settings, you can control each APP permission separately
  • Permissions are grouped according to content
  • Normal permissions or authorization during installation
  • Other permissions are authorized by the system pop-up window at runtime, and the purpose of using this permission must be analyzed

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.
In addition, this article combines pictures, text and code to explain the permission model in Android M. It is relatively clear and can be used as a reference.

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:

  • There is a voice interaction API
  • Hotspot 2.0 support
  • 4k screen support
  • Improvements to Voice and Video APIs
  • Android enterprise user features, such as multi-user support, silent installation, etc.

<<:  Writing high-quality code starts with naming

>>:  Learn more! Five pillars of interaction design that are worth your in-depth understanding

Recommend

Gaomi SEO Training: What are the various variations of words in search engines?

What are the various variations of words in searc...

Guangdong embroidery: the four famous embroidery

Cantonese embroidery is composed of Guangzhou emb...

More than 50 types of scams are coming, can you avoid them?

"The account is at risk. Please verify the o...

Are you a hair removal person or a comfort person?

The summer clothes that had been lying around for...

Tips for attracting new users on Pinduoduo APP!

This article is an analysis of Pinduoduo's ca...

30-day practical training camp for playing and earning money on Xianyu

Course Catalog ├──01. Getting started for no-sour...