public class IntentModule extends ReactContextBaseJavaModule
NativeModule.NativeMethodMETHOD_TYPE_ASYNC, METHOD_TYPE_PROMISE, METHOD_TYPE_SYNC| Constructor and Description |
|---|
IntentModule(ReactApplicationContext reactContext) |
| Modifier and Type | Method and Description |
|---|---|
void |
canOpenURL(java.lang.String url,
Promise promise)
Determine whether or not an installed app can handle a given URL.
|
void |
getInitialURL(Promise promise)
Return the URL the activity was started with
|
java.lang.String |
getName() |
void |
openURL(java.lang.String url,
Promise promise)
Starts a corresponding external activity for the given URL.
|
getCurrentActivity, getReactApplicationContextcanOverrideExistingModule, getConstants, hasConstants, initialize, onCatalystInstanceDestroypublic IntentModule(ReactApplicationContext reactContext)
public java.lang.String getName()
require() this module
from javascript.public void getInitialURL(Promise promise)
promise - a promise which is resolved with the initial URLpublic void openURL(java.lang.String url,
Promise promise)
url - the URL to openpublic void canOpenURL(java.lang.String url,
Promise promise)
url - the URL to openpromise - a promise that is always resolved with a boolean argument