# Quick to get started
In completing theAccess processAnd read all the steps in the WMPF Technical principleAfter that, you can officially start WMPF Client Of the code development.
WMPF Client Is through the Java and Kotlin Written, should be familiar with Android development students for project development
# to download WMPF Service Apk
Please go to GitHub Release District Download:
- Shaped like
wmpf-arm-alpha-release-v7.0.10.51-411.apk
The file (with the alpha Word) is the development version with the WMPF The test interface for the WMPF process (click to wake up only, no debug entry). - Shaped like
wmpf-arm-production-release-v7.0.10.51-411.apk
The file (with the production Is the official version, there is no interface, only for use after the official launch. - Shaped like
wmpf-cli-release-v1.0.2-rc1.aar
The document is aar Files that need to be downloaded and integrated in the WMPF Client Middle.
# WMPF Client Development
Please go to GitHub On the warehouse. clone WMPF Client sample code, and on the basis of which a custom WMPF Client Secondary development.
When we putsample codeAfter downloading to local, you need to complete the following steps:
# 1. to download Android Studio
Please download the official website Android Studio Development tools (ignore those that have already been downloaded), and then in the Android Studio Import Run in WMPF Client sample code。
# 2. Fill in the hardware information
Ahead of us.Access processObtained in productId
、keyVersion
、deviceId
、signature
Fill in the information DeviceInfo.com 。
# 3. Fill in the mobile application information
Before we enter the process.Creating a Mobile AppObtained in the HostAppID and AppSecret Fill in build.gradle , and set the DeviceInfo.isInProductionEnv = true
。
Be careful:HostAppID and AppSecret Should be taken from local environment variables and should not appear in code repositories on the line and Apk Middle.
# 4. integrated aar file
in Android Studio In the integration of the latest wmpf-cli.aar , so WMPF Client Ability to work with WMPF Service For interactive communication.
# 5. Real machine operation application
Downloaded before running on Android devices WMPF Service Apk , through Android Studio OnReal machine debuggingFunction, compile and run WMPF Client Apk , and then follow the steps in the following GIF, and you can open the Mini Program.
# 6. IPC Interaction protocol
After a successful compilation run WMPF Client Apk After, WMPF The device will be activated in real time according to the hardware registration information provided before, and it can be used normally after the activation is successful. See below for the timing chart:
Read Client and Service 初始值 IPC Interaction protocol, Understanding WMPF Client How to communicate with WMPF Service To communicate and successfully activate the device and Launch Your own little program.
# 7. optimization WMPF
WMPF Call channel (Invoke Channel)
If the device needs to call special local capabilities, and the mobile phone WeChat Mini Program does not define the relevant interface, the relevant information can be transmitted through the channel. Please visit WMPF Call Channel Document。
WMPF Proprietary Interface (JSAPI)
With regard to special Android interfaces not defined in Mini Programs, some common hardware such asprinter、equipment 初始值 code) can be obtained by WMPF Proprietary interface to call directly.
Message push capability
When the Mini Program is not running in the foreground, it can also be sent to the WMPF push Messages, developers can define their own push Style of messageYou can also jump from the message to the Mini Program or to a specified page within the Mini Programs. This ability applies to scenes rich, while the use of Mini programs more scenes. Please visitMessage Push Capability Documentation。
Brush Face Payment Ability
We can access the mini program on the face payment device, so that the device can better connect to WeChat. Please visit初始值。
Subload and preload
For poor hardware performance, or poor network conditions, you can subcontract loading to improve the smoothness of Mini Program startupThe pre-load function can also be enabled, and part of the data will be stored locally after the first start of the Mini Program, and the next start speed will be significantly optimized. Please visit Client and Service of IPC Interactive Protocol Documentation, and view the PreloadRuntime
Parameters.
Horizontal screen optimization
If your device's screen orientation is landscape, but you need to use a Mini Program designed for vertical screen on your phone, you can turn on landscape to force center display. Please visit Client and Service of IPC Interactive Protocol Documentation, and view the LaunchWxaApp
Parameters.
# Be careful
in WMPF Client sample codeThere are two of them. flavor ,flavor Can be found at Android Studio Switch in.
- Guide: used after officially activating the hardware, on the basis of which you can make changes and customize and officially use it online.
- Experience: Used to experience without formally activating the hardware WMPF , cannot be used in a production environment