0.3.4 • Published 2 years ago
@yz1311/react-native-intent-launcher v0.3.4
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 --save
react-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
action
Stringdata
Stringcategory
Stringtype
Stringextra
ObjectpackageName
StringclassName
Stringflags
Number (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.4
2 years ago
0.3.4-beta2
3 years ago
0.3.2-beta1
3 years ago
0.3.2-beta2
3 years ago
0.3.3-beta1
3 years ago
0.3.2
3 years ago
0.3.4-beta1
3 years ago
0.3.3
3 years ago
0.3.0
3 years ago
0.3.1
3 years ago
0.2.1
4 years ago
0.2.0
5 years ago
0.1.3
5 years ago