Plugin React Native for PushLink - Android Enterprise App Management
React Native PushLink SDK
Plugin React Native for PushLink - Android Enterprise App Management.
Installation
yarn add react-native-push-link
or
npm install react-native-push-link --save
Prepare Project Android Native
react-native pushlink-prepare-project
Publish APK PushLink
- Required .env [PUSH_LINK_API_KEY=your-api-key] in project react
react-native pushlink-publish-apk
Download APK PushLink
- Required .env [PUSH_LINK_API_KEY=your-api-key] in project react
react-native pushlink-download-apk
Example project
Example Project React Native - PushLink
Usage
...
import PushLink from 'react-native-push-link';
...
componentDidMount = () => {
const deviceId = await PushLink.getDeviceId().catch((e) => e);
const pushLinkStarted = await PushLink.start(PUSH_LINK_API_KEY, deviceId).catch((e) => e);
const strategyCustom = await PushLink.setStrategyCustom(
{ TypeBroadcastReceiver: 'APPLY' },
(responseBroadcast) => {
console.log(responseBroadcast);
// new APK for install...
// Open modal user interaction or silent install...
const install = await PushLink.installApk().catch((e) => e);
},
).catch((e) => e);
};
API
- Open file
./node_modules/react-native-push-link/index.d.ts
and see all possibilities of using the API
Troubleshooting
- Use
adb logcat | grep PUSHLINK
to check what's going on. If you can't solve the problem by yourself, please contact the support.