
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
react-native-android-intent-launcher
Advanced tools
call native function about intent in react-native android
call native function startActivity in react-native
isPackageInstalled and isAppInstalled method is to check to see if the app is installed openApp and startAppByPackageName method will run the app when it is installed.
Original Repository is react-native-intent-launcher
Fixes the following issues when building React Native 0.60 or later.
And
Added isPackageInstalled, openApp method
Use isPackageInstalled method when isAppInstalled method doesn't work.
Use openApp method when startAppByPackageName method doesn't work.
WARNING: Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.
It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html
You can call native function startActivity in react-native to do something with Intent which can only be solved with android native code
Using yarn (RN 0.60 and and above)
yarn add react-native-android-intent-launcher
Using yarn (RN 0.59 and and below)
yarn add react-native-android-intent-launcher
react-native link react-native-android-intent-launcher
import { Linking } from 'react-native'
import IntentLauncher, { IntentConstant } from 'react-native-intent-launcher'
...
IntentLauncher.startActivity({
action: 'android.settings.APPLICATION_DETAILS_SETTINGS',
data: 'package:com.example'
})
// check if app is installed by package name
IntentLauncher.isAppInstalled('com.your.app')
.then((result) => {
console.log('isAppInstalled yes');
})
.catch((error) => console.warn('isAppInstalled: no', error));
// open another app by package name
IntentLauncher.startAppByPackageName('com.your.app')
.then((result) => {
console.log('startAppByPackageName started');
})
.catch((error) => console.warn('startAppByPackageName: could not open', error));
const downloadURL = "https://www.your.com/download"
IntentLauncher.isPackageInstalled('com.your.app')
.then(isInstalled => {
if (isInstalled)
IntentLauncher.openApp(appInfo.package, options)
else if (downloadURL)
Linking.openURL(downloadURL)
.catch(err => console.error("An error occurred", err))
else
console.log("There is no path to download the app")
})
...
action Stringdata Stringcategory Stringflags Stringextra ObjectpackageName StringclassName Stringflags NumberIn the IntentConstant, we provide some constants for these properties, you can look up document provided by google to find out property we didn't support currently.
MIT
FAQs
call native function about intent in react-native android
The npm package react-native-android-intent-launcher receives a total of 125 weekly downloads. As such, react-native-android-intent-launcher popularity was classified as not popular.
We found that react-native-android-intent-launcher 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
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.