View as Markdown

Step by step

The what3words mobile apps on Android and on iOS support the ability to allow your mobile app to send the user to the what3words app. You can either open the what3words app at the user’s current location or navigate directly to a 3 word address.

1Step 1: Android intents#

In your Android app, you can create a request to send the user to the what3words app using an Intent .

Android
Intent intent = packageManager.getLaunchIntentForPackage("com.what3words.android");
intent.setAction(Intent.ACTION_VIEW);
intent.setData(Uri.parse("w3w://show?threewords=daring.lion.race"));
startActivity(intent);

2Step 2: iOS URL Schemes#

In your iOS app, you can create a request to send the user to the what3words app using a URL scheme for inter-app communication.

Objective-C, Swift
Objective-C
NSURL *myURL = [NSURL URLWithString:@"w3w://show?threewords=index.home.raft"];
[[UIApplication sharedApplication] openURL:myURL]
Swift
if let url = URL(string: "w3w://show?threewords=fancy.duck.cloud") {
  UIApplication.shared.open(url, options: [:]) {
    (success) in print("Opened: \(success)")
  }
}

3Step 3: Supported URIs#

  • To open the what3words app at the user’s current location, use the URI w3w://show?currentlocation.
  • To navigate to a 3 word address in the what3words app, use the URI w3w://show?threewords=[word.word.word], replacing [word.word.word] with a 3 word address and omitting the square brackets.
esc
↑ ↓ to choose↵ to openesc to close