React Native version of applet access
Docking preparation
- Dependency list: List the dependencies in the project. If the native aar package is involved, the aar package needs to be provided.
- Image resources in the project: use base64 and remote images
- bundle: the compiled bundle file of the project
Common interface (NativeModules)
AndroidDataDeviceManager module
Interface | Purpose | versionCode |
---|---|---|
closeActivity() | Close the current applet | 61 |
packageInstalled(String name, Promise promise) | Query name APK is installed | 76 |
getVersionCode(Promise promise) | get paynicorn pay versioncode | 76 |
AndroidDataBundleManager module
Interface | Purpose | versionCode |
---|---|---|
setTitle(String title) | set native title bar | 61 |
getBundleInfo(Promise promise) | Get bundle configuration information | 62 |
Interface | Purpose | versionCode |
---|---|---|
startPayment(String txnId) | Start native cashier | 61 |
topUp(String currency, String amount) | Start native top-up function | 61 |
AndroidDataAccountManager module
Interface | Purpose | versionCode |
---|---|---|
getAuthCode(String sdkKey, Callback callback) | Start native oauth authentication, get authcode through callback | 61 |
getLoginCode(Promise promise) | Get the loginCode after a single login to determine whether the user has logged in again | 61 |
demo
import { NativeModules } from 'react-native'
const {
AndroidDataAccountManager,
} = NativeModules;
const sdkKey = 'xxxx'
AndroidDataAccountManager.getAuthCode(sdkKey, (res) => {
// res
})