Linking API provides a general interface to interact with both incoming and outgoing app links. You can open URLs in the browser, launch other apps, and handle deep links into your app.
Import
Methods
openURL()
Attempts to open a URL with any of the installed apps.string
required
The URL to open. Can be:
- Web URLs:
https://example.com - Phone numbers:
tel:+1234567890 - SMS:
sms:+1234567890 - Email:
mailto:email@example.com - App-specific schemes:
myapp://path
Promise<void> - Resolves when the URL is opened, rejects if no app can handle the URL.
canOpenURL()
Checks if an app is installed that can handle a given URL.string
required
The URL to check.
Promise<boolean> - Resolves to true if the URL can be opened, false otherwise.
getInitialURL()
Returns the URL that launched the app, if any.Promise<string | null> - The initial URL, or null if the app wasn’t launched via a link.
addEventListener()
Listens for incoming app links while the app is running.string
required
Must be
'url'.function
required
Callback function that receives an object with a
url property.EventSubscription - Object with a remove() method to unsubscribe.
openSettings()
Opens the operating system settings for your app.Promise<void>
sendIntent() (Android only)
Launches an Android intent with optional extras.string
required
The Android intent action (e.g.,
'android.intent.action.VIEW').array
Array of extra data objects with
key, value properties.Promise<void>
Examples
Opening a Web URL
Making a Phone Call
Sending an Email
Sending an SMS
Handling Deep Links
Opening App Settings
Opening Maps
Opening Social Media Apps
Android Intent Example
Deep Link Configuration
iOS Setup
Add URL schemes to yourInfo.plist:
Android Setup
Add intent filters to yourAndroidManifest.xml:
Common URL Schemes
Best Practices
On iOS, you must declare URL schemes you want to query in
LSApplicationQueriesSchemes in Info.plist, or canOpenURL() will always return false.