This is an android update module.
npm i react-native-android-update.13 --save
Link the package using react-native link:
react-native link react-native-android-update.13
Import library
import AndroidUpdateApp from 'react-native-android-update.13';
componentWillMount() {
AndroidUpdateApp.updateAndroid(
'https://you url',
'you appkey'
);
}
Key | Description | Type | Default |
---|---|---|---|
udpateUrl | config url | string | |
appKey | needed parameters | string | |
version | version name | string | Automatically read the versionName of build.gradle |
Name | Description | Type | Default |
---|---|---|---|
updateAndroid | check for update |
{
"code": 0,
"info": null,
"data": {
"apkVersion": "0.0.13",
"apkUrl": "http",
"updateLog": "test",
"apkSize": "30M",
"newMd": "sssskjlfae",
"isConstraint": "false",
"isUpgrade": "true"
}
}