1.0.6 • Published 5 years ago

react-native-android-easy-updates v1.0.6

Weekly downloads
21
License
-
Repository
github
Last release
5 years ago

react-native-android-easy-updates

Getting started

$ npm install react-native-android-easy-updates --save

Mostly automatic installation

$ react-native link react-native-android-easy-updates

Manual installation

Android

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

Usage

import RNAndroidEasyUpdates from 'react-native-android-easy-updates';

##API

All the APIs return promise. Please go to https://developer.android.com/guide/playcore/in-app-updates for more information about different function and parameter information.

####checkUpdateAvailability() Checks and starts app update if available for particular updateType 1. Input Params: - updateType - IMMEDIAT/FELXIBLE

####Example

RNAndroidEasyUpdates.checkUpdateAvailability(updateType).then((status) => {
    //update success status
});

####completeUpdate() Starts complete app update if available

####Example

RNAndroidEasyUpdates.completeUpdate().then((status) => {
    //update success status
});
1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.2

5 years ago

1.0.3

5 years ago

1.0.1

5 years ago