Search code examples
androidandroid-webviewuber-api

Uber universal link not redirecting to the Play Store


We're trying to use an Uber universal link in a WebView on Android.

Following the affiliate program page documentation (here), we're using a link like this: https://m.uber.com/ul/?client_id=.

When we load that url in a WebView with a WebViewClient on a device that doesn't have the Uber app, it tries to redirect to the app using its url scheme (uber://?client_id=xxxx). This doesn't work, because the app is not installed.

However, when we load that url in Chrome, it brings us to the "Open Play Store" page. That is the desired behaviour.

Is there a way to make this work in a WebView?


Solution

  • According to Uber Documentation, using m.uber.com links in a WebView is considered as common mistake. Instead, open links using mobile browser.