tencent cloud

All product documents
Tencent Cloud Super App as a Service
SDK Extension Components
Last updated: 2025-03-20 18:01:55
SDK Extension Components
Last updated: 2025-03-20 18:01:55
A mini program's main SDK (mini_core) provides the basic runtime capabilities of the mini program. In addition to mini_core, the mini program SDK also offers the following extension components, which can be integrated to the host app as needed.

QR code scanning extension SDK

Component description: If your mini program uses the QR code scan capability, you need to add the following SDK to support the scanning function. If not used, it is recommended not to add it to reduce the app package size.
Integration method: Add the QR code scanning extension library dependency as follows:
// QR code scanning extension component
implementation 'com.tencent.tcmpp.android:mini_extra_qrcode:${version}' // For version information, see Android SDK Updates
After the QR code scanning extension SDK is added, the supported mini program APIs are as follows:
API name
Description
wx.scanCode
Opens the client’s QR code scanning interface to scan the QR code.
Required permissions:
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.

Tencent Maps extension SDK

Component description: Developed for apps in the Chinese mainland. If your mini program uses the map capabilities, you need to add the following SDK. If not used, it is recommended not to add it to reduce the app package size.
Integration method: Add the map extension library dependencies as follows.
implementation 'com.tencent.tcmpp.android:mini_extra_map:${version}'// For version information, see Android SDK Updates
Implementation 'com.tencent.map:tencent-map-vector-SDK:4.5.10' // For version information, seeTencent Maps Documentation
implementation 'com.tencent.map:sdk-utilities:1.0.7'
implementation 'com.tencent.map.geolocation:TencentLocationSdk-openplatform:7.4.7'
You need to configure the project in the Tencent Location Service console and obtain the API key required to access the Tencent Maps service. For detailed steps, see Development Guide.
Once you've completed the above steps, you need to configure your API key in the Android project. Add the following meta-data in the AndroidManifest.xml file, and replace (YOUR_API_KEY) with your actual API key:
<application
...
<meta-data
android:name="TencentMapSDK"
android:value="(YOUR_API_KEY)" />
...
</application>
After the Tencent Maps extension SDK is added, the supported mini program APIs are as follows:
API name
Description
Map
Supports map APIs, including map display, location selection, and POI query, etc.
Required permissions:
Permission
Description
Location permission
Required to use location services for displaying map locations.

Google Maps and Huawei Maps extension SDKs

Component description: Developed for apps outside the Chinese mainland. If your mini app uses map capabilities, you need to add the following SDK. If not used, it is recommended not to add it to reduce the app package size.
Integration method: Add the map extension library dependencies as follows.
implementation 'com.tencent.tcmpp.android:mini_extra_google_map:${version}'// For version information, see Android SDK Updates
implementation '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'
Since some Huawei devices do not support embedded Google Maps, the map may not be displayed. You can integrate Petal Map as a supplementary solution, and the mini program framework will prioritize the use of Petal Map on Huawei devices.
repositories {
maven {url 'https://developer.huawei.com/repo/'}
}
implementation 'com.tencent.tcmpp.android:mini_extra_huawei_map:${version}'// For version information, see Android SDK Updates
implementation 'com.huawei.hms:maps:6.9.0.300' // For version information, see Huawei Maps Documentation
implementation 'com.huawei.hms:maps-basic:6.9.0.300'
implementation 'com.huawei.hms:site:6.5.1.300'
For Google Maps, you need to configure the Google Cloud project in the Google Cloud console and obtain the API key required to access the Google Maps service. For detailed steps, see Setup in the Cloud Console and Use API Keys.
Once you've completed the above steps, you need to configure your API key in the Android project. Add the following meta-data in the AndroidManifest.xml file, and replace (YOUR_API_KEY) with your actual API key:
&lt;application
...
&lt;meta-data
android:name="com.google.android.geo.API_KEY"
android:value="(YOUR_API_KEY)" />
...
</application>
For Petal Map, you need to create a project in the Huawei Maps console, activate the map and location services, and obtain the API key used to access the location service. For detailed steps, see Configuring App Information in AppGallery Connect. Then follow the guide of Integrating the HMS Core SDK to download the “agconnect-services.json” file to your project and configure the Huawei AGC plugin.
To use Huawei's location service properly, you need to add the following meta-data to the AndroidManifest.xml file and replace (YOUR_API_KEY) with your actual key:
&lt;application
...
&lt;meta-data
android:name="HuaweiApiKey"
android:value="(YOUR_API_KEY)" />
...
</application>
Note:
For security purpose, it is recommended to request a separate API key for location services.
After the Google Maps and Huawei Maps extension SDKs are added, the supported mini program APIs are as follows:
API name
Description
Map
Supports map APIs and components, including map display, location selection, and POI query, etc.
Required permissions:
Permission
Description
Location permission
Required to use location services for displaying map locations.

Live streaming component extension SDK

Component description: If you need to use the live streaming components (live-player and live-pusher) for developing capabilities of live streaming push and pull, you need to add the following SDKs.
Integration method: Add the live streaming component dependencies as follows.
// Live streaming component support library
implementation 'com.tencent.tcmpp.android:mini_extra_trtc_live:${version}'// For version information, see Android SDK Updates
// Live streaming component library
implementation 'com.tencent.liteav:LiteAVSDK_Professional:latest.release' // For version information, see Tencent Cloud Documentation
In addition to adding the above dependencies, you need to override the following methods of implementing baseminiAppProxyImpl and provide the licenseURL and licenseKey required for the live streaming component. This is necessary to complete the initialization configuration for the live streaming component. If you do not configure the correct LicenseUrl and LicenseKey, the live streaming component will not function properly.
Note:
For the method of obtaining the LicenseURL and LicenseKEY, see Adding and Renewing A License.
@ProxyService(proxy = MiniAppProxy.class)
public class MiniAppProxyImpl extends BaseMiniAppProxyImpl {
@Override
public MiniConfigData configData(Context context, int configType, JSONObject params) {
if(configType == MiniConfigData.TYPE_LIVE) {
// Live streaming configuration
MiniConfigData.LiveConfig liveConfig = new MiniConfigData.LiveConfig();
// The following key and url can only be used for demo
liveConfig.licenseKey = "";
liveConfig.licenseUrl = "";

return new MiniConfigData
.Builder()
.liveConfig(liveConfig)
.build();
}

return null;
}
}
After the live streaming extension SDK is added, the supported mini program APIs are as follows:
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.
Component
-
live-pusher
Tag for live streaming push.
live-player
Tag for live streaming play.
Required permissions:
Permission
Description
Camera
-
Recording
-

LBS extension SDK

Component description: The LBS component provides capabilities related to location information, compass, accelerometer, positioning, and device orientation.
Integration method: Add the LBS extension library dependency as follows.
implementation 'com.tencent.tcmpp.android:mini_extra_lbs:${version}'// For version information, see Android SDK Updates
After the LBS extension SDK is added, the supported mini program APIs are as follows:
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.
Required permissions:
Permission
Description
Location permission
Required to obtain the location.

Bluetooth extension SDK

Component description: After the Bluetooth extension library is added, you can use Bluetooth APIs.
Integration method: Add the Bluetooth extension library dependency as follows:
implementation 'com.tencent.tcmpp.android:mini_extra_bluetooth:${version}'// For version information, see Android SDK Updates
After the LBS extension SDK is added, the supported mini program APIs are as follows:
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
Bluetooth Low Energy (BLE) central devices APIs.
Bluetooth-beacon
Bluetooth beacon APIs.
Required permissions:
Permission
Description
Bluetooth
Required to operate the Bluetooth.
Location permission
Required to search the Bluetooth device.

NFC extension SDK

Component description: The NFC extension SDK can be added to enable NFC read/write capabilities.
Integration method: Add the NFC extension SDK dependency as follows.
implementation 'com.tencent.tcmpp.android:mini_extra_nfc:${version}'// For version information, see Android SDK Updates
After the NFC extension SDK is added, the supported mini program APIs are as follows:
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.
Required permissions:
Permission
Description
NFC permission
Required to access NFC capabilities.

Biometric authentication extension SDK

Component description: Biometric authentication extension SDK provides capabilities related to device fingerprinting and face recognition.
Integration method: Add the biometric authentication extension library dependency as follows.
implementation 'com.tencent.tcmpp.android:mini_extra_soter:${version}'// For version information, see Android SDK Description
After he biometric authentication extension SDK is added, the supported mini program APIs are as follows:
API name
Description
wx.startSoterAuthentication
-
wx.checkIsSupportSoterAuthentication
-
wx.checkIsSoterEnrolledInDevice
-
Required permissions:
Permission
Description
Fingerprint access
Required to access fingerprint authentication.

Clipboard extension SDK

Component description: Provides clipboard access capability.
Integration method: Add the extension library dependency as follows.
implementation 'com.tencent.tcmpp.android:mini_extra_clipboard:${version}'// For version information, see Android SDK Updates
After the LBS extension SDK is added, the supported mini program APIs are as follows:
API name
Description
wx.getClipboardData
-
wx.setClipboardData
-
Required permissions:
Permission
Description
Clipboard permission
Required to access and modify clipboard data.

Address book extension SDK

Component description: Provides contact access related capabilities.
Integration method: Add the extension library dependency as follows.
implementation 'com.tencent.tcmpp.android:mini_extra_contact:${version}'// For version information, see Android SDK Updates
After the address book extension SDK is added, the supported mini program APIs are as follows:
API name
Description
wx.addPhoneContact
Adds a contact.
wx.chooseContact
Selects a contact.
Required permissions:
Permission
Description
Contacts read/write permission
Required to access and write contacts information.

PDF extension SDK

Component description: Provides the capability to open PDF documents.
Integration method: Add the extension library dependency as follows.
implementation 'com.tencent.tcmpp.android:mini_extra_pdf:${version}'// For version information, see Android SDK Updates
After the PDF extension SDK is added, the supported mini program APIs are as follows:
API name
Description
wx.openDocument
Opens the document (PDF format only).

Media extension SDK

Component description: Provides default implementations for chooseMedia and previewMedia.
Integration method: Add the extension library dependency as follows.
implementation 'com.tencent.tcmpp.android:mini_extra_media_support:${version}'// For version information, see Android SDK Updates
Implement the MediaImageLoaderProxy, use a custom image loading implementation for image loading in the mini_extra_media_support library.
Note:
You can also implement the MediaChooseJsProxy to customize the logic for chooseMedia.
@ProxyService(proxy = MediaImageLoaderProxy.class) public class CustomMediaImageLoaderProxy implements MediaImageLoaderProxy { private GlideImageEngine glideImageEngine = new GlideImageEngine(); @Override public ImageEngine getCustomImageEngine() { return glideImageEngine; } static class GlideImageEngine implements ImageEngine { @Override public void loadPhoto(@NonNull Context context, @NonNull Uri uri, @NonNull ImageView imageView) { Glide.with(context).load(uri).transition(withCrossFade()).into(imageView); } @Override public void loadGifAsBitmap(@NonNull Context context, @NonNull Uri gifUri, @NonNull ImageView imageView) { Glide.with(context).asBitmap().load(gifUri).into(imageView); } @Override public void loadGif(@NonNull Context context, @NonNull Uri gifUri, @NonNull ImageView imageView) { Glide.with(context).asGif().load(gifUri).transition(withCrossFade()).into(imageView);

Mini game extension SDK

Component description: Provides the implementation for the mini game engine.
Integration method: Add the extension library dependency as follows.
implementation 'com.tencent.tcmpp.android:mini_extra_mbengine:${version}'// For version information, see Android SDK Updates
After the extension library is added, mini games are supported. For mini game APIs, see API Overview.

Google ads extension SDK

Component description: Provides Google AdMob ad loading capability.
Integration method: Add the extension library dependency as follows.
implementation 'com.tencent.tcmpp.android:mini_extra_admob:${version}'// For version information, see Android SDK Updates
Note:
This feature depends on AdMob. Please integrate it according to the official documentation first. For more information, see Get Started.


Was this page helpful?
You can also Contact Sales or Submit a Ticket for help.
Yes
No

Feedback

Contact Us

Contact our sales team or business advisors to help your business.

Technical Support

Open a ticket if you're looking for further assistance. Our Ticket is 7x24 available.

7x24 Phone Support