GithubHelp home page GithubHelp logo

puneet-softdev / android-app-link Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 1.0 205 KB

Demo App to handle Android App Links which came into picture in Android 6 But starting from Android 12 Deeplinks on Tapping of deep link, it's navigating to Browser which has been take care here. This app has both Java and Kotlin lang. code and basic mandatory changes you've to make to make your deeplinks / applinks work

Kotlin 72.07% Java 27.93%
android kotlin-android applinks applinking deeplink android12

android-app-link's Introduction

Android-App-Link

Handling Android App Links

-- What is Android App Links --

Android App Links, available on Android 6.0 (API level 23) and higher, are web links that use the HTTP and HTTPS schemes and contain the autoVerify attribute. This attribute allows your app to designate itself as the default handler of a given type of link. So when the user clicks on an Android App Link, your app opens immediately if it's installed—the disambiguation dialog doesn't appear

-- Steps --

  1. Update the Android Manifest First we must update all intent filters that can respond to an HTTP link with the android:autoVerify=”true” attribute

  2. Create the assetlinks.json file

Option 1:- Create an empty file named assetlinks.json If working with a single application, place the following information inside this file:

[{ "relation": ["delegate_permission/common.handle_all_urls"], "target": { "namespace": "android_app", "package_name": "<Your App’s package name>", "sha256_cert_fingerprints": ["<Your App’s SHA256 finger print>"] } }]

Option 2:- Use Android Studio’s App Link Assistant

Option 3:- Use Google’s statement list generator tool

  1. Deploy the assetlinks.json file to host(s)

After generating the digital asset links file, deploy it to the host (or hosts if handling multiple domains) under a .well_known directory:- https://www.doordash.com/.well-known/assetlinks.json

  1. Verify that the assetlinks.json file is correct

Google provides a Digital Asset Links API to verify the accuracy of the assetlinks.json file:

https://digitalassetlinks.googleapis.com/v1/statements:list?source.web.site=https://domain.name:optional_port&relation=delegate_permission/common.handle_all_urls

  1. Verify your changes on Android

adb shell am start -a android.intent.action.VIEW
-c android.intent.category.BROWSABLE
-d "PLACE_YOUR_DEEPLINK_HERE"

This ADB command launches an implicit intent with the action VIEW, category BROWSABLE, all of which is similar to the implicit intent executed when clicking on a link

android-app-link's People

Contributors

puneet-softdev avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.