ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Mobile specific functions / Phone functions
  • Overview
  • Implementation
  • Generation of the Android application and configuration on the web server
  • Generation of the iOS application and configuration on the web server
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Deep links to mobile applications
Overview
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 that takes users to a specific product in an e-commerce application.
If the user has the application installed on their phone, the link opens the application directly and displays the desired product.
If the user does not have the application installed their phone, the link can for example:
  • take users to a web page with the desired content,
  • take users to the application's page on the corresponding app 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.
Implementation
To launch an Android or iOS application via a deep link:
  1. Use DeepLinkProcedure in the initialization code of the Mobile project. This function defines the WLanguage procedure executed when the user clicks a deep link.
  2. In the Android or iOS application generation wizard, define the URLs to be associated with the application. Each URL must specify a protocol (HTTP or HTTPS in Android , HTTPS only in iOS), a domain name and optionally, all or part of the URL path.
  3. Publish the association file on the web server.
Remark: To determine if an application has been launched via a deep link, use the ExeInfo function with the exeLaunch constant.

Generation of the Android application and configuration on the web server

You can associate one or more URLs with the application. Each URL must specify:
  • a protocol (HTTP or HTTPS),
  • a domain name,
  • optionally, all or part (prefix, pattern) of the URL path.
The Android application generation wizard includes a specific "Deep links" step, where you can enter the domain names associated with the deep links.
For each domain name used, you must create an assetlinks.json file containing the JSON document displayed in the generation wizard. This file should be published at the following location:
https://<Domain name>/.well-known/assetlinks.json
Caution: The "assetlinks.json" file must be accessible from the outside and without redirection via an HTTPS connection.
This file contains, among other data, the application package name as well as the SHA256 fingerprint of its signature certificate. For security reasons, the file will also allow the system to verify that the owner of the application and the domain name corresponding to the link are the same.
If this verification fails, the system uses the default behavior, which is usually to display the link target in a browser.
After installing the application, it may take a while for the verification process to be completed.
Caution: Some mobile browsers do not allow launching applications directly from page links. Some browser settings may also prevent this.

Generation of the iOS application and configuration on the web server

You can use multiple deep link URLs.
The iOS application generation wizard includes a specific "Deep link (Apple Universal Links)" step, where you can enter the domain names associated with the deep links.
You will need to create a specific file for each domain name:
https://<Domain name>/.well-known/apple-app-site-association
This file must be accessible to Apple's servers via HTTPS, and have a valid certificate.
Remark: The "Developer mode" option in the generation wizard 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 a Mac, using a development provisioning profile.
The content of the apple-app-site-association file will look something like this:
{
"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/*"
              ]
          }
      }
  }
}
For more information about the format of the apple-app-site-association file, see: https://developer.apple.com/documentation/xcode/supporting-associated-domains
Minimum version required
  • Version 28
Comments
Click [Add] to post a comment

Last update: 03/17/2023

Send a report | Local help