// QR code scanning extension componentimplementation 'com.tencent.tcmpp.android:mini_extra_qrcode:${version}' // For version information, see Android SDK Updates
API name | Description |
wx.scanCode | Opens the client’s QR code scanning interface |
Permission | Description |
Camera | Camera permission is required for QR code scanning. |
File read/write | File read/write permissions are required to recognize QR codes in local images. |
implementation 'com.tencent.tcmpp.android:mini_extra_map:${version}'// For version information, see Android SDK UpdatesImplementation 'com.tencent.map:tencent-map-vector-SDK:5.9.0' // For version information, see Tencent Maps Documentationimplementation 'com.tencent.map:sdk-utilities:1.0.9'implementation 'com.tencent.map.geolocation:TencentLocationSdk-openplatform:7.6.1.3'
<application...<meta-dataandroid:name="TencentMapSDK"android:value="(YOUR_API_KEY)" />...</application>
API name | Description |
Map | Supports map APIs, including map display, location selection, POI query, offline map, and custom tile, etc. |
Permission | Description |
Location | Required to use location services for displaying map locations. |
@Overridepublic MiniConfigData configData(Context context, int configType, JSONObject params) {if (configType == MiniConfigData.TYPE_OFFLINE_MAP) {MiniConfigData.OfflineMapConfig offlineMapConfig = new MiniConfigData.OfflineMapConfig();// Set whether to enable the offline map feature. Default is false. It can be set to true based on business requirements.offlineMapConfig.enabled = true;return new MiniConfigData.Builder().offlineMapConfig(offlineMapConfig).build();}return new MiniConfigData.Builder().build();}
implementation 'com.tencent.tcmpp.android:mini_extra_google_map:${version}'// For version information, see Android SDK Updatesimplementation 'com.google.android.gms:play-services-maps:18.1.0' // For version information, see Google Maps Documentation (public network access required)implementation 'com.google.maps.android:android-maps-utils:2.3.0'
repositories {maven {url 'https://developer.huawei.com/repo/'}}implementation 'com.tencent.tcmpp.android:mini_extra_huawei_map:${version}'// For version information, see Android SDK Updatesimplementation 'com.huawei.hms:maps:6.9.0.300' // For version information, seePetal Maps Documentationimplementation 'com.huawei.hms:maps-basic:6.9.0.300'implementation 'com.huawei.hms:site:6.5.1.300'
<application...<meta-dataandroid:name="com.google.android.geo.API_KEY"android:value="(YOUR_API_KEY)" />...</application>
<application...<meta-dataandroid:name="HuaweiApiKey"android:value="(YOUR_API_KEY)" />...</application>
API name | Description |
Map | Supports map APIs and components, including map display, location selection, and POI query, etc. |
Permission | Description |
Location | Required to use location services for displaying map locations. |
// Live streaming component support libraryimplementation 'com.tencent.tcmpp.android:mini_extra_trtc_live:${version}'// For version information, see Android SDK Updates// If you only need to integrate the live streaming component library, use the following lightweight dependency.implementation 'com.tencent.liteav:LiteAVSDK_Live:latest.release' // For version information, see Tencent Cloud Documentation// If you need to integrate the live streaming component library and advanced player component library, use the following full dependency verionsimplementation 'com.tencent.liteav:LiteAVSDK_Professional_Player_Premium:latest.release // For version information, see Tencent Cloud Documentation
@ProxyService(proxy = MiniAppProxy.class)public class MiniAppProxyImpl extends BaseMiniAppProxyImpl {@Overridepublic MiniConfigData configData(Context context, int configType, JSONObject params) {if(configType == MiniConfigData.TYPE_LIVE) {// Live streaming configurationMiniConfigData.LiveConfig liveConfig = new MiniConfigData.LiveConfig();// The following key and URL are used for demo onlyliveConfig.licenseKey = "";liveConfig.licenseUrl = "";return new MiniConfigData.Builder().liveConfig(liveConfig).build();}return null;}}
API name | Description |
wx.createLivePusherContext | Creates the live streaming pusher context. |
LivePusherContext | Supports LivePusherContext APIs. |
wx.createLivePlayerContext | Creates a live streaming player context. |
LivePlayerContext | Supports LivePlayerContext APIs. |
live-pusher | Tag for live streaming push. |
live-player | Tag for live streaming play. |
Permission | Description |
Camera | - |
Recording | - |
implementation 'com.tencent.tcmpp.android:mini_extra_lbs:${version}'// For version information, see Android SDK Updates
API name | Description |
Location information | Supports location information APIs. |
Compass | Supports compass APIs. |
Accelerometer | Supports accelerometer APIs. |
Device motion | Supports device motion APIs. |
Gyroscope | Supports gyroscope APIs. |
Permission | Description |
Location | Required to obtain the location. |
implementation 'com.tencent.tcmpp.android:mini_extra_bluetooth:${version}'// For version information, see Android SDK Updates
API | Description |
Bluetooth - general-purpose | General-purpose Bluetooth API. |
Bluetooth - Low Energy (BLE) peripheral device | Bluetooth Low Energy (BLE) peripheral devices APIs. |
Bluetooth-Low Energy (BLE) central device | Central device APIs. |
Bluetooth-beacon | Bluetooth beacon APIs. |
Permission | Description |
Bluetooth | Required to operate the Bluetooth. |
Location | Required to search the Bluetooth device. |
implementation 'com.tencent.tcmpp.android:mini_extra_nfc:${version}'// For version information, see Android SDK Updates
API name | Description |
wx.getNFCAdapter | Gets the NFC operation management instance object. |
NFCAdapter | Supports NFCAdapter APIs. |
NFC instances (NFCA, NFCB, NFCV, NFCF, NDEF, IsoDep, MifareUltralight, MifareClassic) | Supports NFC tag instance APIs. |
Permission | Description |
NFC | Required to access NFC capabilities. |
implementation 'com.tencent.tcmpp.android:mini_extra_soter:${version}'// For version information, see Android SDK Updates
API name | Description |
wx.startSoterAuthentication | - |
wx.checkIsSupportSoterAuthentication | - |
wx.checkIsSoterEnrolledInDevice | - |
Permission | Description |
Fingerprint access | Required to access fingerprint authentication. |
implementation 'com.tencent.tcmpp.android:mini_extra_clipboard:${version}'// For version information, see Android SDK Updates
API name | Description |
wx.getClipboardData | - |
wx.setClipboardData | - |
Permission | Description |
Clipboard | Required to access and modify clipboard data. |
implementation 'com.tencent.tcmpp.android:mini_extra_contact:${version}'// For version information, see Android SDK Updates
API name | Description |
wx.addPhoneContact | Adds a contact. |
wx.chooseContact | Selects a contact. |
Permission | Description |
Contacts read/write permission | Required to access and write contacts information. |
implementation 'com.tencent.tcmpp.android:mini_extra_pdf:${version}'// For version information, see Android SDK Updates
API name | Description |
wx.openDocument | Opens the document (PDF format only). |
implementation 'com.tencent.tcmpp.android:mini_extra_media_support:${version}'// For version information, see Android SDK Updates
implementation 'com.tencent.tcmpp.android:mini_extra_media_support_lite:${version}'// For version information, see Android SDK Updates
@ProxyService(proxy = MediaImageLoaderProxy.class)public class CustomMediaImageLoaderProxy implements MediaImageLoaderProxy {private GlideImageEngine glideImageEngine = new GlideImageEngine();@Overridepublic ImageEngine getCustomImageEngine() {return glideImageEngine;}static class GlideImageEngine implements ImageEngine {@Overridepublic void loadPhoto(@NonNull Context context, @NonNull Uri uri, @NonNull ImageView imageView) {Glide.with(context).load(uri).transition(withCrossFade()).into(imageView);}@Overridepublic void loadGifAsBitmap(@NonNull Context context, @NonNull Uri gifUri, @NonNull ImageView imageView) {Glide.with(context).asBitmap().load(gifUri).into(imageView);}@Overridepublic void loadGif(@NonNull Context context, @NonNull Uri gifUri, @NonNull ImageView imageView) {Glide.with(context).asGif().load(gifUri).transition(withCrossFade()).into(imageView);
implementation 'com.tencent.tcmpp.android:mini_extra_mbengine:${version}'// For version information, see Android SDK Updates
implementation 'com.tencent.tcmpp.android:mini_extra_admob:${version}'// For version information, see Android SDK Updates
<activityandroid:name="com.google.android.gms.ads.AdActivity"android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"android:exported="false"android:taskAffinity=":admob"android:excludeFromRecents="true"android:multiprocess="true"android:theme="@android:style/Theme.Translucent"tools:ignore="MissingClass" />
Modified field | Purpose and impact | Removable? |
android:multiprocess="true" | Purpose: Allows AdActivity to run in the calling process, enabling the mini program process to use AdMob ads. Impact: This attribute only affects the child process calling AdMob ads; it does not affect the main process. | No, removing it will prevent the mini programs and mini games from displaying ads properly. |
android:taskAffinity=":AdMob" | Purpose: AdMob adds the FLAG_ACTIVITY_NEW_TASK flag when a banner ad is clicked, causing AdActivity to be pushed into the superapp's main task stack instead of the mini program's task stack. As a result, when returning from the target page, users first return to the superapp’s main task stack and cannot navigate back to the mini program page properly. Adding this attribute allows AdActivity to be pushed onto an independent task stack, enabling normal navigation back to the mini program page. Impact: 1. AdMob does not add FLAG_ACTIVITY_NEW_TASK when displaying rewarded video ads, so those ads are unaffected. 2. Banner ad target pages will have a separate task stack, which may affect the final return logic if users switch tasks through the recent tasks list. | Removable, but removing it will prevent normal navigation back to the mini program page from the banner ad target page. |
android:excludeFromRecents="true" | Purpose: Since AdActivity may only serve as a transitional page, it could display a black screen task in the recent tasks list when pushed onto a new task stack. This attribute prevents the display of that black screen task. Impact: If AdActivity is the root page of the task stack, it will not be shown in the recent tasks list, which may lead to activity leaks in some scenarios. | Removable, but removing it may result in a black screen task being displayed in the recent tasks list. |
// Advanced player component support libraryimplementation 'com.tencent.tcmpp.android:mini_extra_video:${version}'// For version information, see Android SDK Updates// If you only need to integrate the advanced player component library, use the following lightweight dependency version.implementation 'com.tencent.liteav:LiteAVSDK_Player_Premium:latest.release' // For version information, see Tencent Cloud Documentation// If you need to integrate the advanced player component library and live streaming component library, use the following full dependency version.implementation 'com.tencent.liteav:LiteAVSDK_Professional_Player_Premium:latest.release // For version information, see Tencent Cloud Documentation
@ProxyService(proxy = MiniAppProxy.class)public class MiniAppProxyImpl extends BaseMiniAppProxyImpl {@Overridepublic MiniConfigData configData(Context context, int configType, JSONObject params) {if(configType == MiniConfigData.TYPE_LIVE) {// Configure the advanced player SDK for the video componentMiniConfigData.LiveConfig liveConfig = new MiniConfigData.LiveConfig();// The following key and URL are used for demo onlyliveConfig.licenseKey = "";liveConfig.licenseUrl = "";return new MiniConfigData.Builder().liveConfig(liveConfig).build();}return null;}}
API name | Description |
is-drm | Whether it is a DRM-type video source. |
provision-url | Certificate provider URL. |
license-url | Decryption key URL. |
-keep class com.tencent.liteav.** { *; }
<?xml version="1.0" encoding="utf-8"?><network-security-config><domain-config cleartextTrafficPermitted="true"><domain includeSubdomains="true">127.0.0.1</domain></domain-config></network-security-config>
<?xml version="1.0" encoding="utf-8"?><manifest ... ><application android:networkSecurityConfig="@xml/network_security_config"... >...</application></manifest>
Feedback