0.3.5 • Published 1 year ago
@yz1311/react-native-intent-launcher v0.3.5
react-native-intent-launcher
call native function startActivity in react-native
Support Android 7 FileProvider
thanks poberwong's workreact-native-intent-launcher AndroidUtilCode
Description
You can call native function startActivity in react-native to do something with Intent which can only be solved with android native code
Compatibility
| @yz1311/react-native-intent-launcher version | Required React Native Version |
|---|---|
0.2.x | >=0.60 or >=0.59 if using Jetifier |
0.1.x | <=0.59 |
Installation
npm install @yz1311/react-native-intent-launcher --savereact-native link react-native-intent-launcher
Usage startActivity
import IntentLauncher, { IntentConstant } from 'react-native-intent-launcher'
...
IntentLauncher.startActivity({
action: 'android.settings.APPLICATION_DETAILS_SETTINGS',
data: 'package:com.example'
})
...you can view the code in Example of the Repository
Properties
actionStringdataStringcategoryStringtypeStringextraObjectpackageNameStringclassNameStringflagsNumber (to set multi flgas,eg: flag1|flag2|flag2)
In 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.
Usage finish
to finish a exist activity
import IntentLauncher, { IntentConstant } from 'react-native-intent-launcher'
...
IntentLauncher.finish(0,'',{}); //if no resultCode,just like this
...References
License
MIT
0.3.5
1 year ago
0.3.4
3 years ago
0.3.4-beta2
5 years ago
0.3.2-beta1
5 years ago
0.3.2-beta2
5 years ago
0.3.3-beta1
5 years ago
0.3.2
5 years ago
0.3.4-beta1
5 years ago
0.3.3
5 years ago
0.3.0
5 years ago
0.3.1
5 years ago
0.2.1
5 years ago
0.2.0
6 years ago
0.1.3
6 years ago