2.1.2 • Published 4 years ago

react-native-apk-installer-n v2.1.2

Weekly downloads
86
License
MIT
Repository
github
Last release
4 years ago

react-native-apk-installer-n

Support AndroidX and Android other version

Getting started

AndroidX
$ yarn add react-native-apk-installer-n

Other version
$ yarn add react-native-apk-installer-n@1

Mostly automatic install with react-native link (RN < 0.60)

$ react-native link react-native-apk-installer-n

Usage

You can use react-native-fs to download the apk file:

import RNFS from 'react-native-fs'
import RNApkInstallerN from 'react-native-apk-installer-n';

const filePath = RNFS.DocumentDirectoryPath + '/com.domain.example.apk';
const download = RNFS.downloadFile({
    fromUrl: 'apk file download url',
    toFile: filePath,
    progress: res => {
        console.log((res.bytesWritten / res.contentLength).toFixed(2));
    },
    progressDivider: 1
});

download.promise.then(result => {
    if(result.statusCode == 200){
        RNApkInstallerN.install(filePath)
    }
});
2.1.2

4 years ago

2.1.1

4 years ago

2.1.0

4 years ago

2.0.1

4 years ago

2.0.0

4 years ago

1.0.6

5 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago