# NFC Tab Open Mini Program

Android WeChat Client 8.0.14 Start support, iOS The current version is covered.

Based on Mini Program URL Scheme, in addition to existing text messages, emails, web pages and other scenarios, WeChat also supports NFC The ability to quickly pull up Mini Program pages. Can be used for intelligent equipment fast distribution network, fast control and other scenarios.

This ability is not subject to URL Scheme 30 Days validity limit, and allow access to multiple users.

# NFC Label format

To achieve a direct opening of the Mini Program, NFC Labels need to be written in the following format:

NFC The label must be NFC Data Exchange Format (NDEF) Type, the label needs to contain two Record :

  • URI Record
    • Type Name Format (TNF): 0x01 (Well-Known)
    • Type: U
    • Payload: Mini Program URL Scheme
  • Android Application Record, AAR
    • Type Name Format (TNF): 0x04 (NFC Forum external type)
    • Type: android.com:pkg
    • Payload: WeChat Android Package Name com.tencent.mm

iOS Only identify URI Record, Android also needs AAR To specify the pull up WeChat.

# Use Process

# 1. Device access

The Mini Program wants to use NFC Label opening Mini Program capability, first need to access the device, seeDevice accessDocumentation. Upon completion of the access, the developer has access to the model_id 。model_id Corresponding to a device type, it is also an important certificate to invoke the interface related to the device capability of the Mini Program.

# 2. Ability to apply

After the device access is approved, in theMini Program management background -- function -- hardware -- device managementPage click on "Apply Device Capability," select "NFC Label tuning Mini Program”。

# 3. Apply URL Scheme

After the ability to apply is passed, through the [Obtain NFC Mini Program scheme]((generateNFCSscheme )) Interface can be obtained NFC Open any page of the Mini Program under the scene URL Scheme 。

# 4. Get started with

  1. Prepare to meet the required format NFC Tag.
  2. Use of Support NFC Function of the device, install the latest version of WeChat client, close to the NFC The label is opened. scheme The corresponding page of the corresponding Mini Program in.

# Use of the Site

  • Need Equipment Support NFC May be used. iPhone Need XS And above models.
  • Need to unlock the device before it can be used.
  • It cannot be used when using the system wallet, camera, or when Airplane Mode is turned on.

# Note

  • Android can directly open the Mini Program, iOS The system requires the user to click the system's notification banner to confirm.
  • AndroidWeChat 8.0.14 The following version can pull up WeChat, but can not open the Mini Program.

# 5. Common problem

# 5.1 NFC Tag can't pull up WeChat (Android)

use AAR Tag-opening apps is an Android capability.

If some devices cannot pull up WeChat, there may be the following reasons

  1. Device not supported NFC or NFC Function is closed.
  2. WeChat is not installed on the device
  3. Disabled in device settings NFC Ability to pull up applications

If all devices cannot pull up WeChat, there may be the following reasons

  1. AAR Package name written incorrectly or not written in the specified format

# 5.2 NFC Tags can pull up WeChat, but did not pull up the mini program, or pulled up the bus card page

  • Filled in Scheme Invalid (incomplete, malformed, expired, etc.) or not written in the specified format
  • WeChat version is too low, it is recommended to upgrade and try again (Android requires at least 8.0.14)