# use WMPF Certified Device (Android)
In System Integration rpmbd Later, if the device is installed on the [Mini Program hardware framework(WMPF)](https://developers.weixin.qq.com/doc/oplatform /Miniprogram_Frame/), can be used directly WMPF Certified equipment.
Compared to using equipment certification The SDK, using the WMPF Registered devices have the following advantages:
- Low access costs: no additional introduction of device certification SDK, does not occupy the package size, access costs are lower.
- Maintenance Free Equipment Voucher:
deviceToken
Access is done on demand by the framework, and developers only need to register devices, not maintaindeviceToken
, also do not need to be manually passed to the Mini Program, and maintenance costs are lower.
Be careful
- Note 1: Use WMPF You need to ensure first. RMPBD The service is functioning normally.
- Note 2: Use of Equipment Certification SDK Registered devices that need to be re-used WMPF Registration, in order to be maintenance free equipment certificate.
Specific use can be referred tosample code
# 1. Version requirements
- WMPF: This capability requires Android WMPF >= 1.2.0 Version support (if it is 2023/08/19 Previously downloaded. Wmpf-cli, need to re-load the update under).
- VOIP callPlugins: Plugin Required >= 2.3.0 Support.
# 2. Registration device
use [registerMiniProgramDevice](https://developers.weixin.qq.com/doc/oplatform /Miniprogram_Frame/api/cli/miniprogramdevices /registerMiniProgramDevice.html) For device registration. use [getMiniProgramDeviceInfo ](https://developers.weixin.qq.com/doc/oplatform /Miniprogram_Frame/api/cli/miniprogramdevices /getMiniProgramDeviceInfo .html) For registration information.
# 3. Equipment voucher pre-pull
When using WMPF Once a device is registered, the framework obtains device credentials on demand without developer involvement. To optimize the time it takes to obtain device credentials, developers can call the[prefetchDeviceToken](https://developers.weixin.qq.com/doc/oplatform /Miniprogram_Frame/api/cli/miniprogramdevices /prefetchDeviceToken.html)Interface is predrawn in advance, within the validity period (currently 1 Hours) framework can be obtained directly from the cache.
For example, when an audio video call is initiated, the frame acquires deviceToken
Developers are advised to pre-pull device credentials from the front page of the call initiated by the user (e.g. contact page, etc.).
# 4. Frame Scenarios for Obtaining Device Credentials
Currently, the framework acquires device credentials at the following times, and it is recommended to prepull in advance:
- Mini Program audio and video calls, using VOIP Call plug-in, call initByCaller When the call was initiated.
# 5. From Device Certification SDK Switch to using the WMPF Registration device
If you have previously used device certification SDK, want to switch to WMPF Way to register, you can pay attention to the following:
- Do not mix the same equipment certification SDK and WMPF Registration device
- APP Can be removed from voipsdk-1.x-release.aar and safeguard-release.aar。
- For a previously registered device, it needs to be called again
registerMiniProgramDevice
Interface to refresh the device key. - Developers no longer need to get and pass in deviceToken/CallerTicket, cannot be passed when using the plug-in VoipToken Parameters.
- If the developer has done prior access deviceToken/callerTicket Of the logic, which can be replaced by calling ahead of
prefetchDeviceToken
。