1Ci Support Help Center home page
Submit a request
Sign in
  1. 1Ci Support
  2. 1C:Enterprise Platform FAQ
  3. Blog

Starting 1C mobile applications from external sources

  • Blog
    • New functions in query language and Data Composition System
    • Developing extensions
    • New procedure for recovering passwords of 1C infobase users
    • Starting 1C mobile applications from external sources
    • User notification mechanism and notification center
    • Automatic modification of table height to fit the contents
    • Multitenancy in 1C:Enterprise
    • New features in charts
    • New features in mobile platform
    • Cryptography in 1C:Enterprise mobile platform
See more

This article is an announcement of new functionality.
We do not recommend that you use the article to learn the new functionality.
A full description of the new functionality will be provided in the documentation for the appropriate version.
For a complete list of changes in the new version, see the v8Update.htm file.

Planned for mobile platform version 8.3.18

At the moment, the only way to start a mobile application created on 1C:Enterprise mobile platform (or 1C:Enterprise mobile client) without clicking the application icon directly is through PUSH or a local notification.

In mobile platform version 8.3.18, you will be able to start 1C:Enterprise mobile application (an application created on 1C mobile platform or 1C mobile client) from another mobile application or using a certain URL.

This feature may be required to solve various issues of mobile application integration (both external applications and services with 1C mobile applications, and 1C mobile applications with each other).

In particular, there will be new features:

  • Calling a specific mobile application function from another application.
  • Using a certain URL to open the mobile application on a specific object or function.

Examples of scenarios for using the new functionality:

  • A user received an email (a text message or a messenger message) with a promo code. The user clicks "Use", the 1C mobile application opens, and the promo code field is populated automatically.
  • A user receives a link to the EDI Client document in 1C:Document Management (for example, in an email or via the Collaboration System). Clicking the link starts the EDI Client mobile application and opens the required object.

To call a mobile application from a different application, deep links (deep linking) and deep linking are used. A deep link is a URL that refers to a resource on a website or in an application. Deep linking is a mechanism that will allow the mobile operating system to link a URL and a mobile application installed on the device.

There are two ways to generate a deep link:

  • Using your own scheme (for example, myfuncapp://). In this case, a URL will look like myfuncapp://comand?params.
  • Using the HTTP(S) scheme. This method assumes that a deep link URL belongs to the http:// or https:// scheme. In this case, deep linking is only possible using a real website that a developer must have access to. It may be a developer of the mobile application or the entire integration scheme of the application and website. This access is required to place certain files in a specific website directory (from a deep link).

A new handler can be implemented in the application module:

URLTransitionProcessing(URLTransitionData,
  StandardProcessing)

If you click a deep link in the mobile application, this handler will be called.

Deep linking example

Let's say we want our mobile application to start externally using URLs based on the myapp scheme and using URLs starting with https://my.site.com/path/for/service.
We need to do the following:

  1. Create a website my.site.com with the entire nested structure my.site.com/path/for/service and make it available over https. In addition, certain files must be placed on the website (as described above; for more information, see the documentation).
  2. Implement the URLTransitionProcessing() event handler in our configuration. As parameters, this handler will get full information about the URL that was clicked to open our mobile application.
  3. In Designer, specify which schemes or URL fragments the configuration is “subscribed to” (via the new “Mobile application URLs” property).
    In the Mobile Application Builder, specify the correspondence between the configuration of the mobile application being built and a scheme or URL it will process. With the Mobile Application Builder, the mobile application that is being built gets all the settings that are needed to implement the application response to deep links.

The following events will occur on your mobile device while our application is running:

  • Once installed on a mobile device, the application registers deep links that it can process in the mobile operating system.
  • When a user clicks a deep link, the mobile operating system determines which application processes this link.
  • The found application is started and the used deep link is passed to this application to be parsed by the application itself.
  • In the mobile application, the URLTransitionProcessing event handler is triggered. As input, it gets the deep link that started the mobile application.

Starting 1C mobile application in Android via the intent mechanism

When starting the 1C mobile application via a URL, we can pass additional parameters in string format only. In addition, there is a URL length limit (it depends on the specific OS version).
In Android OS, 1C mobile applications can now be started from other applications via the intent mechanism.  This allows you to pass various types of data (for example, arrays) to the application, which increases the amount of information passed to the application.

As an illustration, here is 1C code (similar code can be written in any language supported by Android):

Startup = New MobileDeviceApplicationStartup("android.intent.action.VIEW",
"myappfunc://testPath?key1=" + NumberParameter); 

Startup.AdditionalData.Add("key2", StringParameter);

If Startup.StartupSupported() Then

    Startup.Start(False);

 EndIf;

Consider the following when using this functionality:

  • Currently, only the android.intent.action.VIEW action is supported.
  • The myappfunc:// scheme must be specified as supported for Android OS in the mobile application being built.

In this example, two parameters are passed to the called mobile application:

  1. The number parameter with the key1 ID is passed directly to the deep link URL.
  2. The key2 string parameter is passed by explicitly specifying a parameter in the list of additional data of the object describing the intent call.

For the called mobile application to respond to this call, a handler of the following type must be described in the client application module:

Procedure URLTransitionProcessing(URLTransitionData,
  StandardProcessing)

  BaseLink = URLTransitionData.BaseURL;

  Path = URLTransitionData.RelativeURL;

  AddlData = 

 URLTransitionData.AdditionalMobileApplicationTransitionData;   

  Parameter1 = 

  URLTransitionData.URLParameters.Get("key1");

  Parameter2 = AddlData.Get("key2");

  Message = "Link started the mobile application:" + Characters.LF +

                          "Base link: " + BaseLink + Characters.LF +

                          "Relative path: " + Path + Characters.LF +

                          "Parameter 1: " + Parameter1 + Characters.LF +

                          "Parameter 2: " + Parameter2;

  Notify(Message);

  StandardProcessing = False;

EndProcedure

© 2020 1C INTERNATIONAL LLC www.1Ci.com Support policy