Security News
Supply Chain Attack Detected in Solana's web3.js Library
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
react-native-apk-installer-qb
Advanced tools
Install an android APK from your react-native project. This project is based on `react-native-android-library-boilerplate` and `react-native-install-apk`
Install an android APK from your react-native project.
This project is based on react-native-android-library-boilerplate
and react-native-install-apk
react-native-apk-installer
to your projectnpm install --save react-native-apk-installer
.npm install --save git+https://github.com/null--/react-native-apk-installer.git
in your main project.Add the following to android/settings.gradle
:
include ':react-native-apk-installer'
project(':react-native-apk-installer').projectDir = new File(settingsDir, '../node_modules/react-native-apk-installer/android')
Add the following to android/app/build.gradle
:
...
dependencies {
...
compile project(':react-native-apk-installer')
}
Add the following to android/app/src/main/java/**/MainApplication.java
:
...
import com.cnull.apkinstaller.ApkInstallerPackage; // add this for react-native-apk-installer
public class MainApplication extends Application implements ReactApplication {
@Override
protected List<ReactPackage> getPackages() {
return Arrays.<ReactPackage>asList(
new MainReactPackage(),
...
new ApkInstallerPackage() // add this for react-native-apk-installer
);
}
}
import ApkInstaller from 'react-native-apk-installer'
(You might also need to install react-native-fs
package). import RNFS from 'react-native-fs';
import ApkInstaller from 'react-native-apk-installer'
try {
var filePath = RNFS.CachesDirectoryPath + '/com.example.app.apk';
var download = RNFS.downloadFile({
fromUrl: 'http://example.com/com.example.app.apk',
toFile: filePath,
progress: res => {
console.log((res.bytesWritten / res.contentLength).toFixed(2));
},
progressDivider: 1
});
download.promise.then(result => {
if(result.statusCode == 200) {
console.log(filePath);
ApkInstaller.install(filePath);
}
});
}
catch(error) {
console.warn(error);
}
FAQs
Install an android APK from your react-native project. This project is based on `react-native-android-library-boilerplate` and `react-native-install-apk`
The npm package react-native-apk-installer-qb receives a total of 3 weekly downloads. As such, react-native-apk-installer-qb popularity was classified as not popular.
We found that react-native-apk-installer-qb demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.