- Overview
- Implementation
- Android generation and configuration on the Web server
- iOS generation and configuration on the web server
Deep link vers une application mobile
Deep linking allows you to redirect the user to specific content in a mobile application (rather than in a browser) when they click on a link in a web page or in an email. Example: a link to the product sheet in a sales application. If the user has the application installed on their mobile phone, clicking on the link opens the application directly and displays the desired product sheet. If the user does not have the application installed on his mobile phone, the click on the link can for example: - send to a Web Page corresponding to the content to be displayed,
- refer to the Page of setup application on the store.
This avoids displaying an error message to the end user. This type of link is called App link in Android and Universal link in iOS. For an Android or iOS application to be launched by a "deep link", it is necessary to: - Use the DeepLinkProcedure function in the Mobile project initialization code. This function allows to define the Procedure WLanguage executed when clicking on a "deep link"..
- Define in the wizard generation of the Android or iOS application, the URLs that will be associated with the application. Each URL must define a protocol (HTTP or HTTPS in Android , HTTPS only in iOS), a domain name and optionally, all or part of the path of the.
- Publish the association file on the web server.
Remark: To find out if an application has been launched via a deep link, use the ExeInfo function with the constant exeLaunch. Android generation and configuration on the Web server It is possible to define one or more URLs associated with the application. Each URL must define: - a protocol (HTTP or HTTPS),
- a domain name,
- optionally, all or part (prefix, pattern) of the path of the URL.
During the generation of the Android application, a specific step "Deep links" allows to enter the domain names associated with the "deep links".. For each domain name used, it is necessary to create a file assetlinks.json containing the Document JSON displayed in the generation wizard. This file should be published at the following location:
https://<Nom de domaine>/.well-known/assetlinks.json
Caution: The file "assetlinks.JSON" must be accessible from outside and without redirection via an HTTPS connection. This file contains, among other things, the package name of the application as well as the SHA256 fingerprint of its signature Certificate and will allow the system, for security reasons, to verify that the owner of the application and the domain name corresponding to the link are indeed the same. If this check fails, the system uses its Default behavior, which usually consists in displaying the link target in a browser. After the setup of the application, it may be necessary to wait a few minutes for the Process verification to be performed. Caution: Some mobile browsers do not allow direct launch of applications from page links. Some browser settings may also prevent this. iOS generation and configuration on the web server It is possible to use several "deep link" URLs. During the generation of the iOS application, a specific step "Deep link (Apple universal links)" allows to enter the domain names associated with the "deep link" links. For each domain name, it is necessary to create a specific file:
https://<Nom de domaine>/.well-known/apple-app-site-association
This file must be accessible from the Internet (through Apple's servers), in HTTPS, with a valid Certificate. Remark: The "Developer mode" option present in the wizard generation allows the application to retrieve the apple-app-site-association file directly without going through a CDN managed by Apple. This option can only be used in simulator mode on the Mac, using a development provisioning profile. The apple-app-site-association file will have content similar to:
{ "applinks": { "details": [ { "appIDs": [ "ABCDE12345.com.example.app", "ABCDE12345.com.example.app2" ], "components": [ { "/": "/buy/*", "comment": "Matches any URL with a path that starts with /buy/." }, { "/": "/help/website/*", "exclude": true, "comment": "Matches any URL with a path that starts with /help/website/ and instructs the system not to open it as a universal link." }, { "/": "/help/*", "?": { "articleNumber": "????" }, "comment": "Matches any URL with a path that starts with /help/ and that has a query item with name 'articleNumber' and a value of exactly four characters." } ] } ] } }
For compatibility with iOS 12, the following format must be used:
{ "applinks": { "apps": [], "details": { "ABCDE12345.com.example.app": { "paths": [ "/buy/*", "/help/*" ] } } } }
|
|
|
|