Get Started
API Reference


expo-intent-launcher provides a way to launch Android intents. For example, you can use this API to open a specific settings screen.

Platform Compatibility

Android DeviceAndroid EmulatoriOS DeviceiOS SimulatorWeb


→ expo install expo-intent-launcher

If you're installing this in a bare React Native app, you should also follow these additional installation instructions.

import * as IntentLauncher from 'expo-intent-launcher';

// Open location settings

import * as IntentLauncher from 'expo-intent-launcher';

Starts the specified activity. The method will return a promise which resolves when the user returns to the app.

  • activityAction (string) -- The action to be performed, e.g. IntentLauncher.ACTION_WIRELESS_SETTINGS. There are a few pre-defined constants you can use for this parameter. You can find them at expo-intent-launcher/src/IntentLauncher.ts. Required
  • intentParams (IntentLauncherParams) -- An object of intent parameters.

A promise resolving to an object of type IntentLauncherResult.

typestringA string specifying the MIME type of the data represented by the data parameter. Ignore this argument to allow Android to infer the correct MIME type.
categorystringCategory provides more details about the action the intent performs. See Intent.addCategory.
extraobjectA map specifying additional key-value pairs which are passed with the intent as extras. The keys must include a package prefix, for example the app com.android.contacts would use names like com.android.contacts.ShowAll.
datastringA URI specifying the data that the intent should operate upon. (Note: Android requires the URI scheme to be lowercase, unlike the formal RFC.)
flagsnumberBitmask of flags to be used. See Intent.setFlags for more details.
packageNamestringPackage name used as an identifier of ComponentName. Set this only if you want to explicitly set the component to handle the intent.
classNamestringClass name of the ComponentName.

resultCodenumberResult code returned by the activity. See ResultCode for more details.
datastringOptional data URI that can be returned by the activity.
extraobjectOptional extras object that can be returned by the activity.

Result codeValueDescription
Success-1Indicates that the activity operation succeeded.
Canceled0Means that the activity was canceled, e.g. by tapping on the back button.
FirstUser1First custom, user-defined value that can be returned by the activity.