-2

I have a button in my website that when clicked needs to redirect to an app in App Store and Play Store.

I searched alot for the solution but i couldn't find how to connect a website to an app.

Hope someone tried the same thing and has the answer

Francesco
  • 549
  • 1
  • 8
  • 14
  • 1
    At least on Android you can set it up in your manifest https://developer.android.com/training/app-links/deep-linking , https://stackoverflow.com/questions/24031955/create-custom-url-protocol-in-android – cbr Jan 18 '21 at 19:38
  • 1
    use [Firebase Dynamic Links](https://firebase.google.com/docs/dynamic-links) – Sinner of the System Jan 18 '21 at 19:39

2 Answers2

0

The way DeepLinking works is by defining the link in your android AndroidManifesto file. A DeepLink lets the android OS know that to open this link the android OS has not just the browser apps, instead this app that can also handle this link.

To create a deepLink, simply open the AndroidManifesto file located in:

<Project-Directory>/app/src/main/AndroidManifest.xml

and add the following to it:

<intent-filter android:label="nameThatShouldBeDisplayedInAppPreferenceMenu">
        <action android:name="uniqueNameOfActionForThisIntent" />

        <category android:name="android.intent.category.DEFAULT" />
        <category android:name="android.intent.category.BROWSABLE" />

        <data
          android:host="www.yourhostname.com"
          android:pathPrefix="/yourPath"
          android:scheme="http" />
      </intent-filter>
Karan Dhillon
  • 1,186
  • 1
  • 6
  • 14
  • Hi, i need to add the link in my website not in the app. I don't have an andorid manifesto. Thanks anyways – Francesco Jan 18 '21 at 19:49
-1

I figured that out once i posted the question. This is how i did it:

'On your Android device, just open up the Android Market and select the app you want to share, then scroll down to "Share This Application" to either email, text or Facebook message it to someone in order to get the URL.'

Francesco
  • 549
  • 1
  • 8
  • 14