0

I have a website, www.website.com. This website includes three pages:-

  1. Home Page www.website.com/home.php
  2. Contact Page www.website.com/contact.php
  3. Offer Page www.website.com/offer.php

Now I have created a web view app of my website (Native App)

A user having an android app, visits www.website.com/offer.php?root=yes from the browser.

What are the ways, so that the link opens in the app, rather than in browser?

Swarn
  • 1
  • 2
  • What you are asking for is deep links. Your app has to support deep links to those specific URLs. Read documentation and see examples here.. https://developer.android.com/training/app-links/deep-linking.html – ᴛʜᴇᴘᴀᴛᴇʟ Mar 26 '18 at 17:39
  • This is called a DeepLink. https://developer.android.com/training/app-links/deep-linking.html – letsCode Mar 26 '18 at 17:39

2 Answers2

0

I'd suggest you using this assistant, which is built in Android Studio. It's gonna add the necessary code for you in order to lead the users from those links to your App using App Links. Notice that this solution is available only from Android 6.0 (API level 23) or higher.

In order to support lower API levels, you should read this post and this documentation about Android Deep Links.


For your understanding, you should read this documentation about handling Android Deep Links and Android App links, and the difference between them. See which is better for your needs.

Tal Barda
  • 4,067
  • 10
  • 28
  • 53
0

You can use deep linking

https://developers.tune.com/sdk/deep-linking-to-your-mobile-app-from-your-website

Here in the example one html code is given you can add the js code in your page and you can remove the setTimeout as it is redirecting to play store if you don't want to force user to install the app

Sakshi Garg
  • 549
  • 1
  • 5
  • 13