The world's leading urban mobility app for Android and iOS

© 2019 Moovit Inc. - All Rights Reserved.    Terms  ·  Privacy  ·   Support

 

Deeplinking

Connect your app to the Moovit app using specific action.

For example, “Get Directions” allows your users to see the best transit routes to a specific destination, while “Show Nearby Lines & Stations" they will see all transit options around them “Show Nearby Lines & Stations".

iOS
Enabling Moovit schemes, checking if the Moovit app exists
and launching the app / external link

To use deeplinks on iOS, first check if the Moovit app is installed on the phone. If it’s installed, use the scheme for deeplinking, and if not, send the user to Moovit’s listing on the App Store. The required schemes and links are as follows:

 

Enabling moovit:// Scheme Links in Your App (REQUIRED on iOS 9+)

 

You'll need to whitelist Moovit in your app's Info.plist file with an LSApplicationQueriesSchemesentry similar that below. This will authorize calls to canOpenURL to check for deeplinks with moovit:// scheme. 

<key>LSApplicationQueriesSchemes</key>

<array>

Checking if the Moovit app exists and launching the app / external link

 

To determine if the app exists, and then launch scheme or external link accordingly, use the call below. Underlined are the links to be used refer to Schemes & Links section for inserting the desired functionality and correct links. In this example, Moovit is opened with the “Nearby Lines & Stations” scheme.

if ([[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"moovit://"]]) {
    // Moovit installed - launch app (with parameters)

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:

@“moovit://nearby?lat=<lat>&lon=<lon>&partner_id=<YOUR_APP_NAME>” ]];

}
else {
    // Moovit not installed - send to store 

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:

@“https://app.appsflyer.com/id498477945?pid=DL&c=<YOUR_APP_NAME>” ]];

}

 

*Note that you need to replace the scheme and download links with the actual links provided in the deeplinking documents

Android
Checking if the Moovit app exists and launching the app / external link

 

For using deeplinks on Android, first check if the Moovit app is installed on the phone. If it’s installed use the scheme for deeplinking, and if not send the user to Moovit’s page on the Google Play store. Schemes and links that are required can be found at the bottom of the page.

 

Checking if Moovit exists & launching Moovit / Download link

To determine if the app exists, and then launch scheme or external link accordingly, use the call below. Underlined are the links to be used refer to the deeplinking documents section for inserting the desired functionality and correct links. In this example, Moovit is opened with the “Nearby Lines & Stations” scheme.

try {

// Assume that Moovit app exists. If not, exception will occur

PackageManager pm = context.getPackageManager();

pm.getPackageInfo("com.tranzmate", PackageManager.GET_ACTIVITIES);

String uri =

// Launch app call - scheme (with parameters)

"moovit://nearby?lat=<lat>&lon=<lon>&partner_id=       <YOUR_APP_NAME>";

Intent intent = new Intent(Intent.ACTION_VIEW);

intent.setData(Uri.parse(uri));

startActivity(intent);

} catch (PackageManager.NameNotFoundException e) {

// Moovit not installed - send to store 

String url = "http://app.appsflyer.com/com.tranzmate?pid=DL&c=<YOUR_APP_NAME>";

Intent i = new Intent(Intent.ACTION_VIEW);

i.setData(Uri.parse(url));

startActivity(i);

}

 

*Note that you need to replace the scheme link and download link with the actual links provided in the deeplinking section below

Deeplinking Documents
Opening Moovit with Schemes

To launch Moovit use one of the schemes below and associate the required parameters. Each scheme represents a different action that will be done automatically once the user is in the app.

 

Using schemes parameters

 

Passing parameters enables a smoother experience for your users. For example, destination parameters can automatically pass the location information and allow  Moovit to instantly show how to reach that destination.

 

Example link 

moovit://nearby?lat=32.075026&lon=34.775625&partner_id=<YOUR_APP_NAME​>

Launching “Show nearby lines & stations” in Moovit

By launching Moovit via the “Show nearby lines & stations” scheme, users will land on the map screen, with a specific location pinpointed, and easily be able to see the nearby lines and stations. If location coordinates are not specified, the map will locate at he user’s location.

 

Scheme structure 

moovit://nearby?lat=<lat>&lon=<lon>&partner_id=<YOUR_APP_NAME>

Parameters

Example

moovit://nearby?lat=40.758896&lon=-73.985130&partner_id=<YOUR_APP_NAME>

Launching “Get Directions” in Moovit

By launching Moovit via the “Get Directions” scheme, users will already have a trip planned for them within the Moovit app. A trip is a set of suggested routes from one origin to one destination.

Scheme structure

moovit://directions?dest_lat=&dest_lon=&dest_name=&orig_lat=&orig_lon=&orig_name=&date=&partner_id=<YOUR_APP_NAME>

Parameters

Example

moovit://directions?dest_lat=40.758896&dest_lon=-73.985130&dest_name=Times Square&orig_lat=40.735845&orig_lon=-73.990512&orig_name=Union Square&auto_run=true&date=2019-04-01T18:30:00+02:00&partner_id=<YOUR_APP_NAME>

Download Link
If Moovit does not exist on the user’s phone, use the link below in order to send the user to download Moovit. This automatically redirects them to the App Store / Google Play.

Replace <YOUR_APP_NAME> with a unique identifier 

 
Marketing / Email Campaign (static link)

 

Contact us, and we’ll provide links according to your needs.

Design Guidelines
Button Assets & Texts

When integrating Moovit into your app, use the assets and texts as presented below based on your specific needs.

Menu Item & Text

 

Add one of the following labels next to the menu item

 

  • Get transit directions by Moovit (best option)
     

  • Transit directions by Moovit
     

  • Get there with Moovit

Wide Button / Narrow Button 
Need more details? Contact us

We are here to assist.