Skip to content

WillyLiaoWH/react-native-intent-launcher

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

react-native-intent-launcher

call native function startActivity in react-native

Description

You can call native function startActivity in react-native to do something with Intent which can only be solved with android native code

Installation

  1. npm install react-native-intent-launcher
  2. rnpm link react-native-intent-launcher

Usage

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 String
  • data String
  • category String
  • flags String
  • extra Object

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.

License

MIT

About

call native function "startActivity" in react-native

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 96.2%
  • Java 2.0%
  • Objective-C 1.4%
  • Python 0.4%