# Developing apps for Android devices
On the Android device side, developers need to run an Android application (also known as Weixin Mini Program Launcher in the documentation) for device registration, running Mini Programs for VOIP calls and other operations.
# 1. Access WMPF and run Weixin Mini Program
On the Android platform, Weixin Mini Program video calling capabilities are implemented in Mini Programs. An Android app running on the device needs to pull up a Mini Program developed by the developer to initiate and receive a voice and video call.
After preparing "3.1 access to WeChat hardware platform" before completing the development, and registering the device, you can get the necessaryproductId、keyVersion、deviceId、signatureWait for hardware information.
Refer to the instructions in the WMPF documentation to complete the following:
- Deployment of WMPF Service APK;
- Integrate the WMPF Client in your application with the sample code provided by WMPF;
- Invoke activateDevice to complete device activation;
# 2. Device registration
Before initiating a call, you need to complete the device registration.Refer to the Device Authentication Document for the steps to complete the deployment of the RPMBD service, SDK access, and device registration.
After the device registration is completed, the device note can be obtained via the SDK'sgetDeviceTokeninterface before initiating a call and passed to Weixin Mini Program as a vopToken to call the VOIP plug-in to initiate a call.
NOTE:
- The SN used here must be registered as a deviceId through the WMPF addDevice interface and consistent with the deviceId used for WMPF device activation . Otherwise, the subsequent call cannot be initiated normally.
- Using the device authentication SDK requires assurance that the rpmbd service is running successfully.
# 3. Run Weixin Mini Program
After the WMPF installation and device activation are completed, you can invoke launchMiniProgram to start the specified Weixin Mini Program.
# 3.1 Android apps communicate with Weixin Mini Program
Weixin Mini Program Once started, the application can communicate with the Mini Program in the following ways
- Simple "Android application - > Weixin Mini Program" one-way single this pass parameter scene, you can directly start the Mini Program in the path of splicing query.
- If an Android application wants to receive events from Weixin Mini Program, needs two-way communication, or has a large amount of data, it can use the Invoke Channel provided by WMPF.
# 3.2 Run the development / experience version Weixin Mini Program
When debugging with the Development / Demo Weixin Mini Program, follow these steps.
Note: You must scan your password to log in before you can download the development / experience version normally. After the development / experience version is updated, it is recommended to restart WMPF to update to the latest.
- Developers in the developer tools click "preview," the development version of the Weixin Mini Program code package uploaded to the background.You can also submit it as an experiential version;
- Call login on the WMPF, with the same WeChat number logged in on the developer tools;
- WMPF launchMiniProgram Specify the appType as the development or experience version;
- The development version has a validity period and you need to re-take the above steps after it expires