public class IntentModule extends ReactContextBaseJavaModule
NativeModule.NativeMethod
METHOD_TYPE_REMOTE, METHOD_TYPE_REMOTE_ASYNC
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, getReactApplicationContext
canOverrideExistingModule, getConstants, getMethods, initialize, onCatalystInstanceDestroy, writeConstantsField
public 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