All tutorials
Mobile linking to the what3words app
easy
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.
1Android intents
In your Android app, you can create a request to send the user to the what3words app using an Intent
.
Intent intent = packageManager.getLaunchIntentForPackage("com.what3words.android"); intent.setAction(Intent.ACTION_VIEW); intent.setData(Uri.parse("w3w://show?threewords=daring.lion.race")); startActivity(intent);
Copied
2iOS 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.
NSURL *myURL = [NSURL URLWithString:@"w3w://show?threewords=index.home.raft"]; [[UIApplication sharedApplication] openURL:myURL]
Copied
3Supported 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.