# Extension SDK
In addition to the core SDK, we also provide an Extension SDK. The Extension SDK is a library that depends on the core SDK and provides various Mini-Program APIs that are not available in the core SDK.
The reason for providing the Extension SDK is to ensure that the core SDK remains lightweight while also ensuring that the Mini-Program APIs are rich enough. The core SDK is responsible for establishing the basic framework for running Mini-Programs and provides a small set of the most essential APIs. In terms of permissions, it only retains basic permissions such as storage, camera, and geographic location, with a size of just over 1MB. The Extension SDK exists as a supplement to the core SDK, and its APIs will continue to be enriched and improved.
Obtaining the Extension SDK
You can log in to the Resource Download Center (opens new window) to download the Android SDK files. The Extension SDK is also included in the downloaded compressed package.
If you wish to use the APIs in the Extension SDK, simply add the Extension SDK library as a dependency in Gradle:
implementation 'com.finogeeks.mop:plugins:x.y.z' // x.y.z must be replaced with the specific version number
# 1. Extension SDK
# 1.1 Overview of Mini-Program APIs in the Extension SDK
| API Name | API Description |
|---|---|
| getLocation | Get location information |
| startRecord | Start recording |
| stopRecord | Stop recording |
| RecorderManager | The globally unique recording manager |
# 1.2 Sensitive Permissions Involved in the Extension SDK
| Permission | Related Interfaces and Components |
|---|---|
| Get location information | getLocation |
| Record audio | startRecord, recorderManager component start |
# 2. MapSDK
Supports the Map component and location APIs.
It depends on the core SDK and serves as a supplement to the Map and Location features.
The map and positioning capabilities provided within rely on third-party map and positioning SDKs. Three combinations are supported: AMap | AMap Location, Baidu Map | Baidu Location, and Google Maps | Google Location.
For integration documentation, please refer to 「Mini-Program SDK - Android SDK - Android Integration - 6. MapSDK」.
# 2.1 Overview of MapSDK-related APIs
| API Name | API Description |
|---|---|
| Map component | View component |
| MapContext | A series of APIs |
| getLocation | Get location information |
| startLocationUpdate | Continuous positioning |
| startLocationUpdateBackground | Continuous positioning (allows background positioning) |
| openLocation | View location |
| chooseLocation | Choose location |
| choosePoi | Open POI list to choose a location |
# 2.2 Sensitive Permissions Involved in MapSDK
| Permission | Related Interfaces and Components |
|---|---|
| Get location information | chooseLocation, getLocation, openLocation, choosePoi, Map component |
# 3. Bluetooth SDK
To use Bluetooth interfaces, you need to integrate the Bluetooth SDK separately. Once integrated, the interfaces will take effect without further configuration.
Integration method:
implementation 'com.finogeeks.mop:bluetooth:x.y.z'
# 3.1 Overview of Bluetooth SDK-related APIs
| API Name | API Description |
|---|---|
| Bluetooth - General | A series of APIs |
| Bluetooth - Low Energy Central | A series of APIs |
| Bluetooth - Low Energy Peripheral | A series of APIs |
| Bluetooth - Beacon | A series of APIs |
# 3.2 Sensitive Permissions Involved in the Bluetooth SDK
| Permission | Related Interfaces and Components |
|---|---|
| Bluetooth | Bluetooth component-related interfaces |
# 4. Agora SDK
It is not recommended to use the Agora SDK for video pushing/pulling streams; it is recommended to use the LiveSDK (see item 12).
To use Agora-related interfaces, you need to integrate the Agora SDK separately. Once integrated, the interfaces will take effect without further configuration.
Integration method:
implementation 'com.finogeeks.mop:agora:x.y.z'
If you integrate the Agora SDK by importing the AAR, you need to add the Agora dependency additionally:
implementation 'io.agora.rtc:full-sdk:3.5.0'
# 4.1 Overview of Agora SDK-related APIs
| API Name | API Description |
|---|---|
| init | Initialize the Agora SDK |
| setRole | Set the client role |
| join | Join a channel |
| publish | Start publishing the stream |
| muteLocal | Mute local audio |
| unmuteLocal | Unmute local audio |
| mute | Mute remote audio |
| unmute | Unmute remote audio |
| renewToken | Refresh the token |
| setRemoteVideoStreamType | Set the type of subscribed video stream |
| destroy | Stop publishing the stream and release resources |
# 4.2 Sensitive Permissions Involved in the Agora SDK
| Permission | Related Interfaces and Components |
|---|---|
| Record audio | join |
| Camera | publish |
# 5. WebRTC SDK
To use WebRTC-related interfaces, you need to integrate the WebRTC SDK separately. Once integrated, the interfaces will take effect without further configuration.
Integration method:
implementation 'com.finogeeks.mop:webrtc:x.y.z'
If you integrate the WebRTC SDK by importing the AAR, you need to add the WebRTC dependency additionally:
implementation 'org.webrtc:google-webrtc:1.0.32006'
# 5.1 Overview of WebRTC SDK-related APIs
| API Name | API Description |
|---|---|
| mediaDevices | MediaDevices-related interfaces, providing access to connected media input devices such as cameras and microphones, as well as screen sharing. It allows you to obtain media data from any hardware resource. |
| rtcPeerConnection | RTCPeerConnection-related interfaces, representing a WebRTC connection from a local computer to a remote peer. This interface provides implementations of methods for creating, maintaining, monitoring, and closing the connection. |
| mediaStream | MediaStream-related interfaces, representing a stream of media content. A stream contains several tracks, such as video and audio tracks. |
| mediaRecorder | MediaRecorder-related interfaces, providing APIs such as the media recorder. |
# 5.2 Sensitive Permissions Involved in the WebRTC SDK
| Permission | Related Interfaces and Components |
|---|---|
| Camera | getUserMedia |
| Record audio | getUserMedia |
# 6. Contacts SDK
To use contact-related interfaces, you need to integrate the Contacts SDK separately. Once integrated, the interfaces will take effect without further configuration.
Integration method:
implementation 'com.finogeeks.mop:contact:x.y.z'
# 6.1 Overview of Contacts SDK-related APIs
| API Name | API Description |
|---|---|
| addPhoneContact | API name for adding a contact to the phone address book |
# 7. Clipboard SDK
To use clipboard-related interfaces, you need to integrate the Clipboard SDK separately. Once integrated, the interfaces will take effect without further configuration.
Integration method:
implementation 'com.finogeeks.mop:clipboard:x.y.z'
# 7.1 Overview of Clipboard SDK-related APIs
| API Name | API Description |
|---|---|
| setClipboardData | Set clipboard content |
| getClipboardData | Get clipboard content |
# 8. WeChat SDK
Quick integration for the WeChat SDK, providing the ability to launch WeChat and obtain login, user information, phone number, and payment capabilities through WeChat Mini-Programs.
Integration method:
implementation 'com.finogeeks.mop:wechat:x.y.z'
And add the WeChat APPID you applied for on the WeChat Open Platform to the build.gradle file of your project (e.g., app/build.gradle):
android {
// ..other configurations omitted
defaultConfig {
// ..other configurations omitted
resValue "string", "wechat_sdk_app_id", "Your WeChat SDK APPID"
}
}
Note
When using the WeChat SDK, you must ensure that its version is consistent with the core SDK you are currently using, and that it is version 2.37.13 or above.
Note
The WeChat SDK needs to override the open-type related methods in IAppletHandler, specifically the six methods: chooseAvatar, contact, feedback, getPhoneNumber, launchApp, and shareAppMessage.
Therefore, if you have implemented IAppletHandler and implemented the above six methods, the WeChat SDK will take over getPhoneNumber. Please migrate the remaining five methods as follows. If you have not implemented IAppletHandler or do not use the above six methods, you can ignore this section.
Implement the
IWeChatOpenTypeHandlerinterface:class MyWeChatAppletOpenTypeHandler : IWeChatOpenTypeHandler { override fun chooseAvatar(callback: IAppletHandler.IAppletCallback) { // Your implementation logic } override fun contact(json: JSONObject): Boolean { // Your implementation logic } override fun feedback(bundle: Bundle): Boolean { // Your implementation logic } override fun launchApp(appParameter: String?): Boolean { // Your implementation logic } override fun shareAppMessage( appInfo: String, bitmap: Bitmap?, callback: IAppletHandler.IAppletCallback ) { // Your implementation logic } }After the core SDK initialization is successful, set your implementation class. (Note: Same as the core SDK, make sure it is set in the main process):
WeChatOpenTypeClient.instance.iWeChatOpenTypeHandler = MyWeChatAppletOpenTypeHandler()
Note
To avoid conflicts with WeChat OpenSDK callback classes, starting from version 2.39.11, the WeChatSDK no longer automatically generates the WeChat callback receiving class WXEntryActivity. Please create WXEntryActivity yourself according to WeChat's official documentation Android Integration Guide (opens new window), and add the WeChatSDK callback handling methods as shown in the example below:
class WXEntryActivity : Activity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
FinWeChatWXEntry.handleWeChatIntent(this, intent)
// Your other business logic
finish()
}
override fun onNewIntent(intent: Intent?) {
super.onNewIntent(intent)
setIntent(intent)
FinWeChatWXEntry.handleWeChatIntent(this, intent)
// Your other business logic
finish()
}
}
# 8.1 WeChatSDK API Overview
| API Name | API Description |
|---|---|
| login | Launches the WeChat Mini-Program, obtains the login credential, and returns the result to the FinClip Mini-Program |
| getUserProfile | Launches the WeChat Mini-Program, obtains user information, and returns the result to the FinClip Mini-Program |
| requestPayment | Launches the WeChat Mini-Program, initiates WeChat Pay, and returns the result to the FinClip Mini-Program |
| getPhoneNumber | Launches the WeChat Mini-Program, obtains the dynamic token, and returns the result to the FinClip Mini-Program |
| navigateToWechatMiniProgram | Launches the WeChat Mini-Program with the following parameters: originId WeChat Mini-Program original ID envVersion The version of the WeChat Mini-Program to open, supporting develop, trial, and release. Defaults to release.path The path of the WeChat Mini-Program to open |
# 9. Media SDK
Supported after version 2.38.0
The video component's play-while-downloading feature requires integrating this SDK.
Integration method:
android {
packagingOptions {
doNotStrip "*/arm64-v8a/libijkffmpeg.so"
doNotStrip "*/arm64-v8a/libijkplayer.so"
doNotStrip "*/arm64-v8a/libijksdl.so"
doNotStrip "*/armeabi/libijkffmpeg.so"
doNotStrip "*/armeabi/libijkplayer.so"
doNotStrip "*/armeabi/libijksdl.so"
doNotStrip "*/armeabi-v7a/libijkffmpeg.so"
doNotStrip "*/armeabi-v7a/libijkplayer.so"
doNotStrip "*/armeabi-v7a/libijksdl.so"
doNotStrip "*/x86/libijkffmpeg.so"
doNotStrip "*/x86/libijkplayer.so"
doNotStrip "*/x86/libijksdl.so"
doNotStrip "*/x86_64/libijkffmpeg.so"
doNotStrip "*/x86_64/libijkplayer.so"
doNotStrip "*/x86_64/libijksdl.so"
}
}
dependencies {
implementation 'com.finogeeks.mop:media:x.y.z' //x.y.z must be replaced with the specific version number
implementation 'tv.danmaku.ijk.media:ijkplayer-java:0.8.8'
}
Add the obfuscation rules to the proguard-rules.pro file:
# Media SDK
-keep public class com.finogeeks.finclip.plugins.media.player.ijk.FinIjkMediaPlayerFactory {
public <init>();
}
-keep class com.finogeeks.finclip.plugins.media.player.ijk.IjkMediaPlayerOptionsApplier {
public static <fields>;
public static <methods>;
}
-keep class com.finogeeks.finclip.plugins.media.player.ijk.IjkMediaPlayerOptionsApplier$Applier {*;}
-keep class com.finogeeks.finclip.plugins.media.player.ijk.IjkMediaPlayerOptionsApplier$Options {*;}
#ijkplayer
-keep class tv.danmaku.ijk.media.player.** {*;}
-keep class tv.danmaku.ijk.media.player.IjkMediaPlayer{*;}
-keep class tv.danmaku.ijk.media.player.ffmpeg.FFmpegApi{*;}
After integrating the Media SDK, the video component's player implementation will automatically switch from the system MediaPlayer to the IjkMediaPlayer solution without requiring any additional operations.
# 9.1 Media SDK Related APIs
Since IjkMediaPlayer has numerous configuration options and each App has different requirements, the Media SDK exposes the configuration functionality to App developers.
class SampleApplication : MultiDexApplication() {
override fun onCreate() {
super.onCreate()
IjkMediaPlayerOptionsApplier.setIjkMediaPlayerOptionsApplier(this) {
it.setOption(
IjkMediaPlayer.OPT_CATEGORY_PLAYER,
"start-on-prepared",
0
) // Disable automatic playback start; controlled by the upper layer
it.setOption(
IjkMediaPlayer.OPT_CATEGORY_PLAYER,
"max-buffer-size",
(1024 * 1024).toLong()
) // Maximum buffer size, in kb
it.setOption(
IjkMediaPlayer.OPT_CATEGORY_PLAYER,
"packet-buffering",
0L
) // This setting will show the loading state when stopping promptly
it.setOption(
IjkMediaPlayer.OPT_CATEGORY_PLAYER,
"enable-accurate-seek",
1
) // Enable accurate seek
}
// Other initialization code...
}
}
The configuration in the code snippet above represents the Media SDK's default configuration items. App developers can customize the relevant configuration according to their own needs.
# 9.2 Known Issues with IjkMediaPlayer
# 9.2.1 Continuous Loading Without Playback
On certain device models, continuous loading without playback may occur. Through Logcat, if you find the following bug pattern:
Fatal signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault addr 0x7783dd1920 in tid 25128 (ff_read), pid 22268
It is highly likely that the current application is running on a device with Android 11 and an armv8a CPU architecture. You need to add the attribute android:allowNativeHeapPointerTagging="false" under the application tag in the Manifest.xml file. For more details, refer to: issues/5342 (opens new window)
# 9.2.2 Inaccurate Progress
When dragging the progress bar or switching in and out of fullscreen mode, progress regression may occur. This is because the player needs to parse keyframes and can only play from keyframes. You need to add the following configuration to enable accurate seekTo.
it.setOption(IjkMediaPlayer.OPT_CATEGORY_PLAYER, "enable-accurate-seek", 1) // Enable accurate seek
Note that after enabling accurate seekTo, the screen may not update after seekTo while in the paused state.
# 10. Share SDK
Integrates the Mini-Program sharing feature and takes over the "Share" button functionality in the "More" menu panel (core SDK version ≥ 2.39.11).
The "Share" button is hidden by default and needs to be configured to display. For details, please refer to: Setting the Mini-Program More Menu.
To take over the "Share" button click event yourself, please refer to: Callback Methods.
Integration method:
implementation 'com.finogeeks.mop:share:x.y.z'
Note
When using the ShareSDK, you must ensure that its version is consistent with the core SDK version you are currently using, and that it is 2.39.11 or above.
# 10.1 WeChat Sharing
To enable the WeChat sharing feature, you need to integrate WeChat's official OpenSDK:
implementation 'com.tencent.mm.opensdk:wechat-sdk-android:6.8.0'
And add the mobile application APPID you applied for on the WeChat Open Platform to the project's build.gradle file (e.g., app/build.gradle):
android {
// ..other configurations omitted
defaultConfig {
// ..other configurations omitted
resValue "string", "wechat_sdk_app_id", "Your WeChat Open Platform mobile application AppID"
}
}
Note
To integrate the ShareSDK and use its WeChat-related sharing capabilities, you must first apply for an AppID on the WeChat Open Platform. The AppID filled in here is the one under the mobile application, which typically starts with wx. Note that it is not the WeChat Mini-Program's AppID, nor is it the WeChat Mini-Program's original ID (starting with gh). These IDs are easy to confuse.
Note
To avoid conflicts with WeChat OpenSDK callback classes, the ShareSDK does not automatically generate the WeChat callback receiving class WXEntryActivity. Please create WXEntryActivity yourself according to WeChat's official documentation Android Integration Guide (opens new window), and add the ShareSDK callback handling methods as shown in the example below:
class WXEntryActivity : Activity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
FinShareWXEntry.handleWeChatIntent(this, intent)
// Your other business logic
finish()
}
override fun onNewIntent(intent: Intent?) {
super.onNewIntent(intent)
setIntent(intent)
FinShareWXEntry.handleWeChatIntent(this, intent)
// Your other business logic
finish()
}
}
# 11. CastSDK
Supported after version 2.38.1
Provides quick integration for the screen casting SDK. When playing a video, it allows casting to other devices that support the relevant protocol (DLNA), such as TVs.
Integration method:
implementation 'com.finogeeks.mop:cast:x.y.z'
- Add the following configuration to the root directory
build.gradlefile of the project to be integrated:
allprojects {
repositories {
maven { url 'http://4thline.org/m2' }
maven { url 'https://jitpack.io' }
}
}
- Add the following configuration to the
app/build.gradlefile of the project to be integrated:
packagingOptions {
exclude 'META-INF/beans.xml'
}
# 12. LiveSDK
Supported after version 2.41.1
Quick integration for the Live SDK, providing capabilities for live streaming push, pull, and playback.
Integration method:
implementation 'com.finogeeks.mop:live:x.y.z'
Note
The Live SDK cannot be used together with WebRTC and AgoraSDK.
Note
Configure the project to be integrated as follows:
FinAppConfig.UIConfig uiConfig = new FinAppConfig.UIConfig();
uiConfig.setUseNativeLiveComponent(true); // Do not omit this configuration
FinAppConfig config = new FinAppConfig.Builder()
// Omit other configurations
.setUiConfig(uiConfig) // Remember to set uiConfig
.build();
FinAppClient.INSTANCE.init(this, config, new FinCallback<Object>() {
@Override
public void onSuccess(Object result) {
// Initialization successful, you can now use the live component
// Do not omit this either
AnyRtcLiverSDK.INSTANCE.install();
}
@Override
public void onError(int code, String error) {
}
@Override
public void onProgress(int status, String error) {
}
});
# 12.1 LiveSDK (live-player) Related API Overview
| API Name | API Description |
|---|---|
| play | Play |
| stop | Stop |
| pause | Pause |
| resume | Resume |
| mute | Mute |
# 12.2 LiveSDK (live-pusher) Related API Overview
| API Name | API Description |
|---|---|
| start | Start live streaming |
| stop | Stop live streaming and camera preview |
| pause | Pause live streaming |
| resume | Resume live streaming |
| startPreview | Start camera preview |
| stopPreview | Stop camera preview |
| switchCamera | Switch between front and rear cameras |
# 12.2.1 Sensitive Permissions Involved in LiveSDK
| Permission | Related Interfaces, Components |
|---|---|
| Camera | Permission is requested during initialization |
| Record Audio | Permission is requested during initialization |
# 13. XLogSDK
Starting from version 2.40.5, the core SDK no longer includes XLog, meaning it no longer includes the functionality to persist logs to local storage.
If you need persistent logging, you can choose to integrate the XLogSDK and enable the corresponding configuration options.
Integration method:
implementation 'com.finogeeks.mop:xlog:x.y.z'
Related configuration:
FinAppConfig config = new FinAppConfig.Builder()
// Enable log recording, default is false
.setDebugMode(true)
// Set log level, default is LEVEL_NONE, meaning no logs will be output or recorded
.setLogLevel(XLogLevel.LEVEL_VERBOSE)
// Set the log file directory, default is /data/data/${packageName}/files/fino_xLog
// If you customize the log save path, please ensure you have write permission for that path before initializing the SDK, otherwise log files may not be written correctly
.setXLogDir(logDir)
// Set the maximum log retention time in seconds. If not set, XLog will manage it automatically
.setLogMaxAliveSec(24*3600)
// Omit other configurations
.build();
FinAppClient.init(application, config, finCallback);
Note: If the XLogSDK is not integrated, the
setXLogDirandsetLogMaxAliveSecconfiguration options above will be ineffective. However,setDebugModeandsetLogLevelwill still take effect, but logs will only be output to the console and will not be persisted.
Log export:
/**
* Export logs
*
* @param context
* @param appId Export logs for the specified Mini-Program ID. If empty, logs from the main process are exported.
* @param date Export log files for the specified date. If empty, all logs from the main process or the specified Mini-Program are exported.
* @param exportDir Export to the specified directory
*/
FinAppClient.INSTANCE.exportLogFile(context, appId, date, exportDir);
Usage examples:
Export all logs from the main process:
boolean result = FinAppClient.INSTANCE.exportLogFile(context, null, null, exportDir);
Export logs for a specified date from the main process:
boolean result = FinAppClient.INSTANCE.exportLogFile(context, null, date, exportDir);
Export all logs from a specified Mini-Program:
boolean result = FinAppClient.INSTANCE.exportLogFile(context, appId, null, exportDir);
Export logs for a specified date from a specified Mini-Program:
boolean result = FinAppClient.INSTANCE.exportLogFile(context, appId, date, exportDir);
Note: Before exporting, please ensure that the specified export directory
exportDirhas write permissions; otherwise, log export may fail.
# 14. CalendarSDK
To use calendar-related interfaces, you need to integrate the Calendar SDK separately. The core SDK version must be higher than 2.40.13. After integration, the interfaces will take effect without additional configuration.
Integration method:
implementation 'com.finogeeks.mop:calendar:x.y.z'
# 14.1 CalendarSDK Related API Overview
| API Name | API Description |
|---|---|
| addPhoneCalendar | Add a normal calendar event |
| addPhoneRepeatCalendar | Add a recurring calendar event |
# 15. MediaPickerSDK
To use the image picker, you need to integrate the MediaPickerSDK separately. The core SDK version must be higher than 2.48.5.
# 15.1 Integration Method:
implementation "com.finogeeks.mop:media_picker:x.y.z"
# 15.2 Dependencies on Other Image Loading Libraries:
// Adapt based on the existing download library in the project; Glide is not mandatory
// If Glide is already a dependency, you don't need to add it again. Other image loading libraries are also acceptable; choose based on your project's needs.
implementation 'com.github.bumptech.glide:glide:4.1.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.1.0'
# 15.3 Configure the Image Processor
// Inherit from: com.finogeeks.mop.picker.delegate.ImageEngineDelegate#ImageEngineDelegate
// Example below:
// Note that the specific implementation of each method is custom and doesn't have to follow the example; adapt it according to your requirements.
class MyImageEngineDelegate : ImageEngineDelegate() {
/**
* Load an image
*
* @param context Context
* @param url Resource URL
* @param imageView Image view container
*/
override fun loadImage(context: Context?, url: String?, imageView: ImageView?) {
if (!ActivityCompatHelper.assertValidRequest(context)) {
return
}
Glide.with(context)
.load(url)
.into(imageView)
}
override fun loadImage(
context: Context?,
imageView: ImageView?,
url: String?,
maxWidth: Int,
maxHeight: Int
) {
if (!ActivityCompatHelper.assertValidRequest(context)) {
return
}
val requestOptions = RequestOptions()
.override(maxWidth, maxHeight) // Specify width and height
Glide.with(context)
.load(url)
.apply(requestOptions)
.into(imageView)
}
/**
* Load album directory cover
*
* @param context Context
* @param url Image path
* @param imageView ImageView container
*/
override fun loadAlbumCover(context: Context?, url: String?, imageView: ImageView?) {
if (!ActivityCompatHelper.assertValidRequest(context)) {
return
}
val requestOptions = RequestOptions()
.override(180, 180).sizeMultiplier(0.5f).transform(RoundedCorners(8))
.centerCrop().placeholder(R.drawable.ps_image_placeholder) // Specify width and height
Glide.with(context)
.load(url)
.apply(requestOptions)
.into(imageView)
}
/**
* Load image list images
*
* @param context Context
* @param url Image path
* @param imageView ImageView container
*/
override fun loadGridImage(context: Context?, url: String?, imageView: ImageView?) {
if (!ActivityCompatHelper.assertValidRequest(context)) {
return
}
val requestOptions = RequestOptions()
.override(200, 200).centerCrop().placeholder(R.drawable.ps_image_placeholder) // Specify width and height
Glide.with(context)
.load(url)
.apply(requestOptions)
.into(imageView)
}
override fun pauseRequests(context: Context?) {
if (!ActivityCompatHelper.assertValidRequest(context)) {
return
}
Glide.with(context).pauseRequests()
}
override fun resumeRequests(context: Context?) {
if (!ActivityCompatHelper.assertValidRequest(context)) {
return
}
Glide.with(context).resumeRequests()
}
}
# 15.4 Configuration Takes Effect
// Register in the onCreate callback of your Application
// After setting this, the internal image picker will be used instead of opening the device's built-in photo album or file manager
FinMediaPickerSDK.setImageEngineDelegateClass(MyImageEngineDelegate::class.java)
# 16. AdvertSDK
Supported in Core SDK version 2.53.9 and above
The AdvertSDK provides APIs related to Mini-Program advertisements, encapsulating capabilities such as ad requests, display, event callbacks, and monitoring/tracking reporting. It currently supports interstitial ads, rewarded video ads, and feed ads.
To use ad-related APIs, you need to integrate the AdvertSDK separately. Once integrated, the APIs will take effect without additional configuration.
Integration method:
implementation 'com.finogeeks.mop:advert:x.y.z' //x.y.z must be replaced with the specific version number
Note
When using AdvertSDK, ensure that its version is consistent with the Core SDK version you are currently using, and that the version is 2.53.9 or above.
# 16.1 AdvertSDK API Overview
| API Name | API Description |
|---|---|
| invokeNativeAd | Create, load, display, or destroy interstitial ads and rewarded video ads, and return ad events via onNativeAdEvent |
| showAdComponent | Retrieve and display Mini-Program ad component data, with results returned via onAdData |
| adComponentEvent | Receive events such as ad component display, click, playback completion, and close, and complete corresponding monitoring/tracking reporting |
| destroyAdComponent | Destroy the specified ad component instance and clean up the corresponding ad resources and context |