A ReactNative Update Component for android

Usage no npm install needed!

<script type="module">
  import reactNativeAndroidUpdateMatt from '';



Getting started

$ npm install react-native-android-update-matt --save

Mostly automatic installation

$ react-native link react-native-android-update-matt

Manual installation


  1. Open up android/app/src/main/java/[...]/
  • Add import; to the imports at the top of the file
  • Add new RNAndroidUpdateMattPackage() to the list returned by the getPackages() method
  1. Append the following lines to android/settings.gradle:
    include ':react-native-android-update-matt'
    project(':react-native-android-update-matt').projectDir = new File(rootProject.projectDir, 	'../node_modules/react-native-android-update-matt/android')
  2. Insert the following lines inside the dependencies block in android/app/build.gradle:
      implementation project(':react-native-android-update-matt')


import AndroidUpdate from 'react-native-android-update-matt';

componentDidMount() {
    this.upgradeTimer = setTimeout(() => {
      let url = x;
      let version = y;
      let options = {token:xxx, dlUrlPrefix:xxx};
      AndroidUpdate.update(url, version, options);
    }, 500);

  componentWillUnmount() {
    this.upgradeTimer && clearTimeout(this.upgradeTimer);
public Response appUpdate() {
    Map map = new HashMap();
    map.put("version", "x.x.x");
    map.put("description", new String[] {"xxx","xxx");
    map.put("url", "");
    return new Response().success(map);

Response from server:

  success: true,
  result {
    version: 'x.x.x',
    description: ["xxx","xxx"],
    url: ''