Amazon Developer

as

Settings
Sign out
Notifications
Alexa
Amazon Appstore
Ring
AWS
Documentation
Support
Contact Us
My Cases
Get Started
Design and Develop
Publish
Reference
Support
Skip to main content

Projects with Native Code Only

The following section only applies to projects with native code exposed. Linking gives you a general interface to interact with both incoming and outgoing app links. Custom URL scheme isn’t the only way to open your application on mobile. You don’t want to use a custom URL scheme in links in the email because then the links would be broken on desktop. Instead, you want to use a regular https links such as https://www.myapp.io/records/1234546. Android calls it Deep Links (Universal Links - iOS).

Built-in URL Schemes

As mentioned in the introduction, there are some URL schemes for core functionality that exist on every platform. The following is a non-exhaustive list, but covers the most commonly used schemes. To enable a component to receive messages from another app and map the message target URI, set the launch-uris in the manifest.toml file.
There are two ways to handle URLs that open your app.
  • If the app is already open, the app is foregrounded and a Linking ‘url’ event is fired You can handle these events with Linking.addEventListener('url', callback) - it calls callback({url}) with the linked URL
  • If the app is not already open, it is opened and the url is passed in as the initialURL You can handle these events with Linking.getInitialURL() - it returns a Promise that resolves to the URL, if there is one.

Parameters:

getInitialURL()

If the app launch was triggered by an app link, it will give the link url, otherwise it will give null. getInitialURL() can return null when debugging is enabled. Disable the debugger to ensure it gets passed.

openSettings()

Open the Settings app and displays the app’s custom settings, if it has any.

openURL()

Try to open the given url with any of the installed apps. The method returns a Promise object. If the user confirms the open dialog or the url automatically opens, the promise is resolved. If the user cancels the open dialog or there are no registered applications for the url, the promise is rejected. Parameters:
This method will fail if the system doesn’t know how to open the specified URL. If you’re passing in a non-http(s) URL, it’s best to check canOpenURL() first.

Last modified on April 7, 2026