Aim: Present an environment friendly solution to deploy your Google Digital Asset Hyperlinks (DAL) file with a view to ease the verification course of for Android App Hyperlinks
The Android App Hyperlink verification course of requires management of a particular path on an online host, which makes it difficult for an Android developer to check with out cooperation from the supervisor of their web site. This weblog submit goals to assist Android builders shortly create a site that may will let you efficiently deploy the assetlinks.json file and confirm their Android App Hyperlinks in a developer or check atmosphere.
On this weblog submit we are going to current 2 easy methods to deploy the assetlinks.json file into a web site:
To efficiently deploy a check area for Android App Hyperlinks, let’s evaluate what we’d like for assetlinks.json:
- It should be publicly obtainable, and never behind a VPN.
- It should be served with Content material-type: software/json.
- It should be accessible over HTTPS.
- It should be served immediately with an HTTP 200 response (no HTTP 300’s redirect).
With these necessities in thoughts, we’re able to arrange our check area.
This part will aid you deploy assetlinks.json with Firebase Internet hosting. Please consult with the Firebase Internet hosting documentation for particulars on the instructions and steps.
*Word: All of the instructions that can be introduced will work on MacOS/Linux.
- Firebase CLI: Please examine the docs on the best way to set up relying in your OS, then run firebase login
Command:
Command:
1.1 Choose “Create a brand new undertaking”
1.2 Specify a globally distinctive undertaking ID. It may be any string from 6–30 chars. We are going to use “deeplinks-test”
1.3 Really helpful: have the identical identify for the undertaking ID and the start of the area identify
1.4 Really helpful: depart all defaults for public listing (public), single-page app (No), and automated builds (No)
Command:
2.1 This command creates a “.well-known/” listing and creates the “assetlinks.json” file that comprises the empty array “[]”. The default Firebase Internet hosting configuration will deploy information in your public/ listing.
Command:
3.1 Let’s confirm that our web site is deployed and the assetlinks.json file is in place
3.2 The command will present the deployed web site URL within the kind “https://<PROJECT_ID>.net.app”
3.3 Navigate to “https://<PROJECT_ID>.net.app/.well-known/assetlinks.json”
3.4 Be sure you see “[]”
You’ve efficiently deployed assetlinks.json! Now you can edit the contents of the file public/.well-known/assetlinks.json and deploy up to date configurations. You’re prepared for the part “What’s Subsequent?” beneath.
This part will aid you deploy assetlinks.json with GitHub Pages. Please consult with the GitHub Pages documentation for particulars on the steps.
1.1 Create a new repository. Be certain that the repository identify is utilizing the next format:
“<username>.github.io”. We have to replace “<username>” together with your github username. For instance: sabs231.github.io. Word: You may have 1 GitHub web page per repository, consumer and group. Examine the documentation for extra particulars.
Command:
2.1 Be certain that “<username>” is changed by your Github username.
Command:
3.1 This command creates a “.well-known/” listing and creates the “assetlinks.json” file that comprises the empty array “[]”.
Command:
4.1 This instructions provides the added information/directories, commits them and pushes to the primary department
5.1 Go to “https://<username>.github.io/.well-known/assetlinks.json” and confirm you see the “[]”
You’ve efficiently deployed assetlinks.json! Now you can edit the contents of the file .well-known/assetlinks.json and deploy up to date configurations. You’re prepared for the part “What’s Subsequent?” beneath.
There are various choices to deploy your web site, from working it in your individual {hardware} to renting it from a public cloud. Every with their very own stage of complexity, we advise reviewing their documentation and ensure they’ve the listed necessities for Android App Hyperlinks.
We introduced 2 choices for configuring and deploying a web site with the assetlinks.json file.
Hopefully, it is going to ease the configuration of the check atmosphere for Android App Hyperlinks to allow them to be verified effectively
To efficiently confirm your Android App Hyperlinks we advise the next steps:
- Declare the web site affiliation in your deployed “assetlinks.json” file
- Confirm manually if the Android App Hyperlinks was efficiently verified
- Examine our crash course video collection for extra
All these steps and extra are mentioned in our codelab for Android App Hyperlinks.