Home Office equipment Automation tips. So, why are 1C mobile applications a good idea? Mobile application 1c for Android

Automation tips. So, why are 1C mobile applications a good idea? Mobile application 1c for Android

The 1C:Enterprise mobile platform is a set of tools and technologies for the rapid development of applications for mobile operating systems iOS, Android, Windows Phone / 8.1 / 10, using the same development environments (Configurator or 1C:Entrprise Development Tools) and the same development techniques, that are used for “regular” 1C applications. The result is autonomous, offline applications, but with the ability to exchange information with the outside world using a wide range of integration tools provided by the platform: Web and HTTP services, e-mail, etc. Since the exchange protocols are platform-independent, the 1C mobile platform, among other things, is a means of quickly creating a mobile front-end for almost any server solution.

Background

Back in the days of 1C:Enterprise version 8.0 (and subsequent versions), there was a software product called “Extension for Pocket PCs”. The extension allowed creating products only for Windows Mobile, Windows CE, etc. The product had its own configurator and server, and was supported until the release of 1C:Enterprise version 8.3. The latest version of the extension (8.2.9) was released in October 2013, and full support ended on January 1, 2015.
The extension had limited use even during the heyday of Windows Mobile communicators, and the departure of such devices from the mobile market clearly did not add to the popularity of this software product. iOS and Android devices have taken over almost the entire mobile device market, and it has become obvious that support for these operating systems is one of the key points for a system that must be operated in the modern mobile world. It also seemed obvious that the main approach of the existing 1C:Enterprise platform should be used on mobile devices: the application developer should first of all think about solving application problems, and secondly, about what capabilities of the operating system he uses to solve these problems . In other words, we need a tool that isolates the application developer from the peculiarities of a specific mobile OS and development tool.

Mobile platform

Based on the experience of developing and operating extensions for pocket computers, it was decided to develop a specialized system that would satisfy several requirements:
  • it must support modern popular mobile operating systems and devices running them. First of all, these are iOS from Apple and Android from Google.
  • this system should allow the use of developed applications in the style adopted on modern mobile devices. In particular, the interface should rely on manual control (literally) using touch screens.
  • the system must provide a uniform software interface for implementing various specific mechanisms, regardless of the mobile OS used.
  • the developer must use the same tool and the same development approaches as when developing applications for a “regular” computer.
  • An application developer should develop an application solution in a familiar development environment, if possible using a single code for desktop and mobile systems.
  • the interface of an application solution running on a mobile device should be similar for different platforms and, in general, be clearly recognizable.
The result of the development was the so-called mobile platform, which was released on May 29, 2013 in versions for iOS and Android. The 1C:Enterprise mobile platform is a set of tools and technologies that allows you to create applications for mobile operating systems iOS, Android, Windows Phone / 8.1 / 10, using the same development environment (Configurator) and the same development techniques as for regular applications on the 1C:Enterprise platform. The result is autonomous, offline applications, but with the ability to exchange information with the outside world using a wide range of integration tools provided by the platform: Web and HTTP services, email, etc.
The mobile platform was quite well received by the community, and various articles on this topic began to appear (for example, and). In order to develop a fully functional application that runs simultaneously on the vast majority of mobile devices, now required minimal time and knowledge, which is not fundamentally different from the knowledge of a “regular” application developer on the 1C:Enterprise platform. Of course, such a low barrier to entry attracts developers who need to provide some basic functionality for employees working on the road, management, and other mobile employees who need to work with the corporate system.
It’s easy to start developing a mobile application on the 1C:Enterprise platform. In the Configurator, you need to set the “Use Purpose” property of the configuration to the “Mobile device” value. In this case, some application configuration objects will become unavailable (characteristic type plans, charts of accounts, etc.), but properties specific to mobile applications will become available (for example, built-in multimedia tools and geopositioning of a mobile device, etc.).


At the same time, you can debug the main algorithms of the application (not directly related to mobile specifics) directly in the Configurator on the developer’s computer. At the same time, it is recommended to frame sections of the code in which “mobile” functionality is accessed with appropriate instructions to the preprocessor in order to avoid errors when executing the code on a personal computer:
#If the Mobile Application is a Client Then Data = GeopositioningServer.GetProviderName(); #EndIf
Starting with version 8.3.7 of the mobile platform, debugging the application directly on a mobile device has become available (more on this below).

Development on a mobile platform can follow different approaches, but there are a few main points that can be highlighted. From the point of view of building the mobile application itself, its functional richness and role in the IT infrastructure of the enterprise:

  • a mobile application can be an integral and integral part of an enterprise’s existing information system. The mobile application will provide an interface and other capabilities (including data exchange) tailored to the capabilities of the existing information system. In this case, the mobile application is very tightly connected with the “regular” information system and cannot be operated in isolation from it.
  • a mobile application performs specific tasks that have virtually no connection with the enterprise information system. There is only a minimum set of data that is exchanged between the mobile application and the information system. In this case, most likely, the mobile application will perform the exchange using some standardized protocol, which makes it possible to use this mobile application in completely different cases and situations.
The two situations described above can be considered extreme options. But these are not the only development options. An application developer can independently choose the integration options between a mobile application and the information system that acts as a back office for it.
The mobile application is developed as a completely standalone configuration, but may share some of the source code with the “parent” configuration. By the way, the “parent” configuration may not physically exist (for example, if you are developing some kind of universal application that can work with different systems using a universal protocol).

Mobile platform device

What is a mobile platform and what can it do?
To be fair, the mobile platform is just one of the components of the entire complex, thanks to which 1C:Enterprise 8 works on mobile devices. So, the application developer operates with the following components:
  1. The mobile platform itself is the mobile part of the 1C:Enterprise framework. It can be a regular one (which is used during the build of the application for publication in the app store) and a mobile developer platform, which is used (surprise) during the development of a mobile application.
  2. Mobile configuration is a configuration of the 1C:Enterprise program system, written in the form of an XML file.
  3. The combination of a mobile platform and a mobile configuration results in a mobile application.
  4. Mobile application builder is a specialized application solution that can make a ready-made mobile application file from a mobile platform, configuration, screensavers, icons and other components, which can be uploaded to the Apple AppStore, Google Play, Windows Phone Apps / Windows Apps stores.
Why is everything so difficult? Why can’t it be done on a mobile device exactly as it is done on a large platform? Those. install one mobile platform on the device and load any number of configurations/applications into it? This is prohibited by licensing restrictions on applications that are distributed through application stores. For example, if your app downloads executable code (in the form of a script) over the Internet, it will never appear in the Apple app store. It should be understood, however, that the ability to download any configuration that is available in the developer’s mobile platform is not intended for distribution of mobile applications even within the same company, not to mention distribution to the developer’s clients.
After the mobile application is on the target mobile device, it becomes necessary to use some kind of database (the data must be stored somewhere). As a database engine, the mobile platform uses its own database engine, which is ported to the mobile platform from the platform for a personal computer. It is compact and fast enough, but the main thing is that it provides exactly the same behavior that application developers are accustomed to when working on a platform for personal computers.
It is also worth noting that internally, the mobile application is built according to the same scheme as the work of a regular platform with a file version of the information base: there is a client part, there is a server part, there is a database and there is client-server interaction.
The mobile platform itself is written as a native application, compiled into binary code for the main processor architectures currently used in the mobile world: this is the ARM v5 and higher architecture and x86.
In addition, special permissions may be required to interact with certain capabilities of a mobile device (telephony, GPS, working with the built-in camera, etc.). For iOS, they are set directly during the operation of the application itself, and for Android, permissions are specified when creating the application. The required permissions are specified when developing a mobile application and are used by the mobile application builder, but more on the builder a little later.

A little about the developer platform

While we are developing a mobile application, we are not bound by licensing restrictions imposed on mobile applications distributed through application stores. This means that we can use the 1C mobile platform in the same way as we use a “large” platform on a personal computer - install the mobile platform itself on a smartphone/tablet and load mobile application configurations into it. After launch, the platform will show us a list of applications registered in it:

To add a new application to the platform, you need to place an XML file with its description on a resource accessible from a mobile device via the HTTP protocol. The most convenient way to do this is from the Configurator, through the menu “Configuration \ Mobile application \ Publish”. In this case, the XML file with the application configuration is placed on a web server on the developer’s computer (accordingly, this computer must have a web server - IIS or Apache).

If you specify the “Restart from configurator” option for the application, the application on the mobile device will be automatically updated from the developer’s computer every time the developer updates the XML configuration file located on the web server.
When the “Debugging Allowed” option is enabled, step-by-step debugging of the application on a mobile device is possible from the Configurator on the developer’s computer (in the Configurator, the “Debugging via HTTP” option must be selected in the “Tools\Options” menu). If you set breakpoints in the code in the Configurator and select the “Mobile application - start debugging” command, the mobile application on the device will stop when the executing code reaches the breakpoint, and in the Configurator you can view the values ​​of variables, the call stack, etc.

What can he do?

So, what can the mobile platform do? Enough:)
If you don’t use specific 1C:Enterprise terms, the mobile platform provides the ability to work with regulatory and reference information, draw up documents describing some external actions, view reports, communicate with the outside world using Internet services, and much more. Those. it provides an application developer with the opportunity to write a fairly functional application, for example, a home finance accounting program, a field trading program, and the like.
But in addition to the usual functionality that is found on a platform for a personal computer, the mobile platform must provide work with specific capabilities that are unique to mobile devices:
  • working with calls and call logs;
  • working with short messages (SMS) and their list;
  • contacts;
  • calendars;
  • geopositioning (without routing);
  • allows you to take photographs, as well as video and audio recording;
  • respond to changes in screen orientation;
  • work with notifications (local and PUSH, both directly and through a special intermediary service);
  • scan barcodes and QR codes using the camera
  • Monetization of mobile applications (i.e. a way to give the mobile application developer opportunities for additional income):
    • Work with the Apple In-App Purchase (for iOS OS) and Google Play In-App Billing (for Android OS) shopping services, with which you can organize various types of subscriptions, purchases of functionality, etc. in a mobile application
    • Displaying advertising in mobile applications (iAd services for iOS and AdMob for Android are currently supported).
  • etc.
It is clear that some features may not be available on each specific device, therefore, to determine what can be done on the device on which the mobile application is running, special methods are provided that allow you to find out what is available on this device, for example, the ability to dial numbers or not. Thus, approximately the following usage scheme is implemented: we check whether some feature can be used or not, and if it is possible, we use it:
If Telephony Tools.SupportedDialing() Then Telephony Tools.DialNumber(PhoneNumber, CallImmediately); endIf;
Hiding details about the mobile OS used from the application developer and providing him with unified mechanisms for using mobile functionality is an important task for us. We believe that we are successfully solving the problem. Differences in the implemented mechanisms are either absent or minimized. Except, of course, for cases where there is no functionality at all in one of the operating systems.
For example, the technique for working with PUSH notifications is very different between Google and Apple. We have made a lot of effort to unify the mechanism for working with PUSH notifications from application code. In the case of a mobile application, we succeeded almost 100%: the same application code on a mobile device processes the reception of PUSH notifications on both iOS and Android. And the code for sending PUSH notifications in the server application also looks the same. But in order to achieve such unification, we had to develop a special proxy server https://pushnotifications.1c.com/, which hides from the developer different techniques for working with Apple Push Notification Service (APNS) and Google Cloud Messaging (GCM). The whole difference lies in the different settings directly on the proxy site https://pushnotifications.1c.com/; to work with APNS, you need to upload an SSL certificate to the site (which Apple issues for the application at the request of the developer); to work with GCM, you need to specify a unique application identifier.
Obviously, it is impossible to implement all the features you want in a mobile application right away. And you always have to find a compromise between several very useful things. And if you are missing something, write to us about what business tasks (after all, a platform is, first of all, a tool for implementing business tasks!) you cannot solve and what mechanism would help you with this.

What does it look like?

The graphical interface of the mobile platform is a separate issue. In 1C:Enterprise, as you know, the interface is described declaratively. This, on the one hand, imposes some restrictions on UI development (for example, there is no possibility of pixel-by-pixel positioning), but, on the other hand, it allows the platform to uniformly render the interface on screens of different sizes, in thin and web clients. We tried to adhere to the same principle in the mobile platform. How well have we done this? Let's try to figure it out.
In the first versions of the mobile platform (up to 8.3.5 inclusive), the graphical interface of the applications looked very familiar to experienced 1C users; in fact, he transferred the interface familiar from the “desktop” versions of 1C to the mobile world. But from the point of view of users who were not previously familiar with 1C, the interface looked somewhat archaic.
Taking into account comments and suggestions, we have radically revised our approach to the mobile interface in version 8.3.6. We can say that we have made a completely new mobile interface for our applications. It has a lot in common with our Taxi interface. The development model for mobile application developers corresponds to the development model in Taxi. At the same time, the mobile interface fully complies with the design approaches adopted in mobile applications. The interface fully takes into account the specifics of the mobile world: small screen size (which means the design of graphic elements should become more ascetic - without shadows, gradients), there is support for finger gestures, etc. Interesting fact: the new platform mechanism responsible for placing elements in the form (layouter) turned out to be so successful and timely for the mobile platform that it was released earlier (in version 8.3.6) than in the PC platform (in version 8.3.7) , for which it was primarily intended.
In the picture you can see how our interface has changed.
Application “Management of a small company” on mobile platform version 8.3.5:


It is the same on version 8.3.6:

And this is what the interface of the mobile platform looks like in real life:

The collector - and what kind of beast is this?

As mentioned earlier, a mobile application consists of several components (the mobile platform itself, configuration, various resources), which must form a single whole in order to place the application in the store. To make it easier to turn components into an application, a mobile application builder was developed. This is a configuration (application) created on the 1C:Enterprise platform, which stores in its database all the components necessary to create a mobile application. In order for the collector to do its job, you need to download and install various software packages that are needed for its operation (Java and Android SDK, etc.), then specify the paths to these packages in the collector settings and set some additional parameters (developer keys etc.).


After configuration, the assembler is ready for use. In general, working with the collector looks like this:
  1. Download the version of the 1C mobile platform on which we will build the application
  2. Loading the configuration from which we will build the mobile application
  3. We create a mobile application in which we indicate for which platforms (Android, iOS, Windows) the build should be performed, what configuration and platform should be used (in particular, indicate which certificate to use for building for iOS if the application works with PUSH- notifications).
  4. We build a mobile application for all selected platforms with one click
  5. “With another click” we send the collected mobile applications to the application stores (if it is an application for iOS or Android). The application must be downloaded manually to the Windows Apps / Windows Phone Apps stores, because Microsoft does not yet provide an API for publishing an application in the store.
It should be separately noted that the collector is not needed to develop and debug a mobile application. To do this, you can use the mobile developer platform and Configurator tools to transfer the configuration to the mobile device. But to distribute a mobile application, you need a collector.

Applications on the mobile platform

The 1C company itself produces a number of applications on the mobile platform that are mobile clients of 1C server applications (1C: Document Flow, 1C: Small Firm Management, etc.). These applications implement some subset of the functionality of "regular" clients. In the case of the mobile version of 1C: Small Firm Management, the functionality is sufficient for full use of the program, and we have often seen a situation where the mobile version of the application is enough for clients to conduct business.
Our partners use the mobile platform both to develop mass-produced mobile applications distributed through application stores, and for custom applications created according to the requests of specific clients. Among mass-produced applications, there are applications that use a non-1C back-end as a central data storage.
Among the mobile applications created at the request of clients, we can mention the mobile client for 1C:Manufacturing Enterprise Management, created by order of a large machine-building holding. About a hundred employees of the holding use the mobile application in hot shops, where for safety reasons it is impossible to install desktop computers. The built-in camera of a mobile device is used to read barcodes of products and search for them in the item directory; the mobile application allows you to understand at what stage of the technological chain a given product is located, mark the passage of the next operation by the product, etc.

Conclusion

We tried to very superficially describe the mobile platform, what it allows you to do and why it turned out the way it did. This article says almost nothing about mobile Windows. There are several reasons for this: firstly, the version of the mobile platform for Windows was released relatively recently (“1C:Enterprise” version 8.3.7), and secondly, this version of the mobile platform does not have any significant differences from the implementation for other mobile operating systems . Naturally, we will increase functionality for Windows OS. As well as increasing the functionality of the mobile platform as a whole. So, in the near future we have support for external components in the mobile platform; this mechanism (long available in the “big” platform) will allow developers to implement functionality that is not available for some reason in the mobile platform.
Traditionally, the strengths of the 1C:Enterprise technology platform are its ease of use for developers and the speed of creating and modifying business applications. The 1C mobile platform brought both of these trump cards to the mobile world. The 1C mobile platform is an opportunity to quickly develop an application that runs on the three most popular mobile platforms (iOS, Android, Windows Phone / 8.1 / 10). And thanks to the wide range of available platform-independent integration tools (Web and HTTP services, etc.), the 1C mobile platform is the ability to quickly create a mobile client for three mobile platforms for almost any server application that supports any of the integration methods available in the 1C platform (Web and HTTP services, file sharing, etc.).

Only registered users can participate in the survey. , Please.

On September 28 of this year, 1C, without much noise and pathos, released an evaluation version of the platform 8.3.2.163, which was intended for testing. Those interested can read the full list of changes and improvements or, if they have a subscription, .
Of the listed improvements, I think the “Mobile Platform 1C: Enterprise 8” is quite “tasty”, which allows you to create an application for Android or iOS mobile operating systems using the usual 1C tools

Mobile platform, as the developers themselves write, “is the general name for a technology that allows you to create applications that run on mobile devices running the Android or iOS operating systems.”
“A mobile application installed on a device is a combination of a mobile platform and an information base.”

That is, to put it simply, you can compile your written configuration into an application for Android (.apk) or iOS (.zip). Then all this stuff can be posted on Google Play or AppStore. True, if an Android program can be signed with the key created there immediately in 1C, and it will be ready for publication immediately, then to publish the application in the AppStore it will first have to be compiled using the Xcode program on a computer with the Mac OS X operating system. And, Of course, publishing in any of these stores requires a developer license.
Everything sounds good, and I naturally wanted to try out the new features in action.

Creating a mobile application on 1C

To do this, we need a new version of the platform (), a file that takes , android SDK and JDK.
I’ll warn you right away: I’m not currently setting myself the task of showing the process of developing something specific on 1C, but I just want to check and show you that - yes, the world has gone crazy and you can really write a program for Android on 1C.
Well, let's try to write a kind of “helloWorld” for Google Phone. Let's make a program for test purposes - a configuration with one general form, which we will put on the “desktop”.
So, we create a new configuration in managed mode, and the first thing we must do, if we are writing for a mobile platform, is to indicate “Purpose of use” in the properties of the configuration itself.

And here we immediately notice that many configuration objects have become unavailable for use. We will no longer be able to use subsystems, routine tasks, XDTO packages, Web services, reports, business processes and much more. Also, many procedures and methods for some objects are not available. This should be taken into account when developing.
We make a “form”, create a string attribute with the title: “Hello, Habr!” - and throw it onto the form. Let's also create a button. In click processing, we will write a message output, for example.

&OnClient Procedure Command1(Command) Warning("It works!"); End of Procedure

This is enough for us to check its functionality, so let’s get to the fun part. We save the configuration to a file for the mobile application (Configuration->Mobile application->Write to file), launch in managed mode, and start processing MobileAppWizard.epf. This file is in the mobile.zip archive, which we downloaded at the very beginning.
And now we are asked to fill out the initial settings, where all required fields are underlined in red.

Mobile platform location - the directory in which the android.zip and ios.zip files necessary to form the delivery of the mobile application are located. They are all in the same mobile.zip archive.
We indicate the folder where we installed the Android SDK (you can download it). 1C sets the following requirements:
Android SDK Tools version - no lower than 20.0.3;
Version of Android SDK Platform-tools - not lower than 14;
SDK Platform version - API 8 (not lower than version 8.3).
And we also need a Java SDK (can be obtained at this address) Moreover, 1C warns us that JDK7 does not work in conjunction with the Android SDK.
We indicate the folders where our .apk file will be placed, the location of the signing key and an alias with a password. If you are doing this for the first time and you do not have a key, then you can fill in the “key parameters” and create a key for yourself (in this case, in the “key file” field you must indicate the folder where this key will be created).
Click “OK” and go to the second window.

In it, first of all, we indicate “Mobile application configuration” - the same file that we saved. Then the language, and only then click on the button with a “magnifying glass” and enter the representation there. We indicate “Application ID” - a unique name of the Java class that will be used in the future to perform the update. The identifier must be written in Latin, and 1C recommends starting its name with “com.e1c.” Fill in the version and build number and click the “Create” button. If everything goes well, the system will notify you that the .apk file has been successfully created.
We upload the resulting file to the phone and install it with our favorite manager, having previously allowed the installation of third-party applications in the system settings. Or install the program on the emulator via adb. I’ll say right away: on the emulator everything is terribly slow, but on the phone (I only tested it on the HTC Wildfire S) things are much better, but there are still problems. For example, my file turned out to weigh as much as 34 Mb, so the installation took quite a long time. After launch, we are greeted by a splash screen, and after a while the configuration itself starts. (sorry about the photo: I took it with a calculator)

So far, the new features look very “crude”: limited functionality of 1C, the inability to use the SDK directly, plus a large size and some “brakes”... But the very possibility of writing a program for a mobile platform on 1C is a little surprising! Personally, I'm of two minds about this. On the one hand, this “feature” is still more like a toy, because there is no opportunity to do something truly worthwhile. But on the other hand, this is clearly a big step by the 1C company towards mobility, and if this direction is actively developed, it can bring a lot of benefits. As an example, you can equip storekeepers with tablets. If it is possible to use “on-board” cameras, then you can free yourself from reading devices, and scan codes directly from the tablet, you can provide them to car drivers, and send transportation tasks or track the vehicle’s route and time in motion. In general, there are many options, and the fact that it will all be in a single information system will greatly please customers/managers, because for some reason they always have a panic fear of using a large number of different systems, they want to use all the functionality on single platform.

One of the main differences in the 8th version of the 1C program is the new possibilities for working with data from mobile devices. Initially, the product, designed to work under Windows Mobile operating systems, was called “Extension for Pocket Computers.” Later, the market conditions for mobile devices, the popularity of Android systems and IOs devices made their own adjustments, and the 1C Mobile platform appeared.

1C mobile platform device

Some restrictions from the licensing policies of Apple and Google, the main suppliers of operating systems for mobile devices, leave their mark on 1C for smartphones and tablets. Actually, taking this into account, the developers created the following scheme:

  1. Platform;
  2. Configuration, an XML file containing metadata information;
  3. The platform and configuration combined on the device is a mobile application;
  4. Compiler of applications for mobile devices.

Despite the apparent complexity of the design, the implementation of the 1C enterprise mobile platform is not much different from the usual file mode of operation. It should be taken into account that interface development, code writing, and user administration take place in the normal Configurator mode, which does not require 1C programmers to have separate specialized knowledge for work.

Communication between the mobile application and the main database can occur via email, Web services, or HTTP protocols.

A few words about configuration

To independently develop a mobile application, you do not need specific knowledge or additional tools. It is enough to open a new development base in the Configurator.

The main part of the setup consists of two steps:

  1. In the “Properties” of the configuration, in the “Purpose of use” submenu, you must check the box opposite “Mobile device” (Fig. 1);
  1. Due to the fact that running 1C on Android devices requires prior permissions, you need to set these parameters in the Configurator. Fig 2

Basically, these two steps allow you to create a configuration for mobile applications. Please note that some configuration objects (particularly reports and charts of accounts) will become unavailable for development.

Own databases for launching on mobile devices should be published on services accessible via the HTTP protocol. They can be located on the developer's computer with a web server installed on it.

In some cases, the error “Web server extension modules are not installed” may appear, then the missing components must be reinstalled from the delivery file.

Placing the configuration on the device

You can download the mobile application to your device in the application manager that is supported by the operating system. After launching the application for the first time, the installation of the database will start (Fig. 3)

Rice. 3 Installing a standard application

If several configurations are installed on the device, after launching the application the database selection window will be available (Fig. 4).

Some features of this window:

  1. By clicking on the “+” button in the upper right corner of the screen, you can add a new configuration;
  2. A long press on the name of the base opens the properties window Fig. 5, which allows you to change some properties of the base, as well as remove it from the list;

  1. In the properties window, you can enable database debugging and set the address of the debug configuration storage server;
  2. By clicking the “Administration” button, you can open the database testing window to eliminate most errors.

After launching the 1C mobile application on a tablet or smartphone, a window opens that in appearance very much resembles a thin or Web client.

Forms of documents, reference books and reports that can be launched on the device are already presented here. In addition, in the “Service” submenu you can call up the settings of the current database, or call up a list of installed applications.

Application Builder

As long as you, as a developer, use the base and capabilities of the 1C mobile application, you most likely will not need to use the Collector. At the moment when you yourself want to create a 1C mobile application and distribute it through the Google, Apple and Windows Apps app stores, you simply cannot do without the “Mobile Application Collector” configuration. It is this shell that allows you to assemble a platform and configuration for mobile phones into a single whole.

Additionally, you will have to install several software packages (Java SDK, Android SDK and, possibly, some others), without which correct assembly for various operating systems is simply impossible.

The general sequence of actions when working with the Collector is as follows:

  1. The mobile platform is loading;
  2. Load the created or revised configuration;
  3. We directly create a mobile application for the platforms on which we will work.

The next two clicks allow you not only to create an application for different axes, but also to publish it on the appropriate resources (some problems may arise with publishing on Microsoft servers).

The 1C:Enterprise 8 mobile platform is the name of the technology that allows you to develop solutions that run on Google Android or Apple iOS smartphones and tablets. An important advantage of the 1C platform is that solutions are developed in one version for both mobile operating systems and then simply exported for Android and for iOS without any additional modification and writing platform-dependent program code.

Both the 1C:Enterprise platform and the information base itself (configuration, in 1C terms) are immediately installed on the mobile device. The information base on the device contains a file database option (for storing various data that the user works or will work with) and the application itself (software bytecode that runs on a tablet or smartphone).

An example of a mobile client for the EDMS “Corporate Document Flow” created on the mobile platform “1C:Enterprise 8.3”

The platform supports downloading and deployment of applications by users on their devices from the App Store or Google Play. The distribution kit contains all the components necessary to get started.

Various solutions can be created based on the 1C mobile platform, but the main solution option is mobile off-line clients for accounting systems. Such solutions are designed to support mobile users in remote workplaces. Data exchange is carried out through regular synchronization with the central database. Data exchange is possible through the following mechanisms:

  • Web services
  • File sharing
  • Email
  • and other mechanisms
    An alternative option is to work online using a web client.

The developed mobile application is a separate, complete software product and can exchange data with several central databases at once. For example, in one mobile application you can implement access and work with documents from the accounting database and tasks from the enterprise document management system.


The 1C:Enterprise mobile platform is a set of tools and technologies for the rapid development of applications for mobile operating systems iOS, Android, Windows Phone / 8.1 / 10, using the same development environments (Configurator or 1C:Entrprise Development Tools) and the same development techniques, that are used for “regular” 1C applications. The result is autonomous, offline applications, but with the ability to exchange information with the outside world using a wide range of integration tools provided by the platform: Web and HTTP services, e-mail, etc. Since the exchange protocols are platform-independent, the 1C mobile platform, among other things, is a means of quickly creating a mobile front-end for almost any server solution.

Background

Back in the days of 1C:Enterprise version 8.0 (and subsequent versions), there was a software product called “Extension for Pocket PCs”. The extension allowed creating products only for Windows Mobile, Windows CE, etc. The product had its own configurator and server, and was supported until the release of 1C:Enterprise version 8.3. The latest version of the extension (8.2.9) was released in October 2013, and full support ended on January 1, 2015.
The extension had limited use even during the heyday of Windows Mobile communicators, and the departure of such devices from the mobile market clearly did not add to the popularity of this software product. iOS and Android devices have taken over almost the entire mobile device market, and it has become obvious that support for these operating systems is one of the key points for a system that must be operated in the modern mobile world. It also seemed obvious that the main approach of the existing 1C:Enterprise platform should be used on mobile devices: the application developer should first of all think about solving application problems, and secondly, about what capabilities of the operating system he uses to solve these problems . In other words, we need a tool that isolates the application developer from the peculiarities of a specific mobile OS and development tool.

Mobile platform

Based on the experience of developing and operating extensions for pocket computers, it was decided to develop a specialized system that would satisfy several requirements:
  • it must support modern popular mobile operating systems and devices running them. First of all, these are iOS from Apple and Android from Google.
  • this system should allow the use of developed applications in the style adopted on modern mobile devices. In particular, the interface should rely on manual control (literally) using touch screens.
  • the system must provide a uniform software interface for implementing various specific mechanisms, regardless of the mobile OS used.
  • the developer must use the same tool and the same development approaches as when developing applications for a “regular” computer.
  • An application developer should develop an application solution in a familiar development environment, if possible using a single code for desktop and mobile systems.
  • the interface of an application solution running on a mobile device should be similar for different platforms and, in general, be clearly recognizable.
The result of the development was the so-called mobile platform, which was released on May 29, 2013 in versions for iOS and Android. The 1C:Enterprise mobile platform is a set of tools and technologies that allows you to create applications for mobile operating systems iOS, Android, Windows Phone / 8.1 / 10, using the same development environment (Configurator) and the same development techniques as for regular applications on the 1C:Enterprise platform. The result is autonomous, offline applications, but with the ability to exchange information with the outside world using a wide range of integration tools provided by the platform: Web and HTTP services, email, etc.
The mobile platform was quite well received by the community, and various articles on this topic began to appear (for example, and). In order to develop a fully functional application that runs simultaneously on the vast majority of mobile devices, now required minimal time and knowledge, which is not fundamentally different from the knowledge of a “regular” application developer on the 1C:Enterprise platform. Of course, such a low barrier to entry attracts developers who need to provide some basic functionality for employees working on the road, management, and other mobile employees who need to work with the corporate system.
It’s easy to start developing a mobile application on the 1C:Enterprise platform. In the Configurator, you need to set the “Use Purpose” property of the configuration to the “Mobile device” value. In this case, some application configuration objects will become unavailable (characteristic type plans, charts of accounts, etc.), but properties specific to mobile applications will become available (for example, built-in multimedia tools and geopositioning of a mobile device, etc.).


At the same time, you can debug the main algorithms of the application (not directly related to mobile specifics) directly in the Configurator on the developer’s computer. At the same time, it is recommended to frame sections of the code in which “mobile” functionality is accessed with appropriate instructions to the preprocessor in order to avoid errors when executing the code on a personal computer:
#If the Mobile Application is a Client Then Data = GeopositioningServer.GetProviderName(); #EndIf
Starting with version 8.3.7 of the mobile platform, debugging the application directly on a mobile device has become available (more on this below).

Development on a mobile platform can follow different approaches, but there are a few main points that can be highlighted. From the point of view of building the mobile application itself, its functional richness and role in the IT infrastructure of the enterprise:

  • a mobile application can be an integral and integral part of an enterprise’s existing information system. The mobile application will provide an interface and other capabilities (including data exchange) tailored to the capabilities of the existing information system. In this case, the mobile application is very tightly connected with the “regular” information system and cannot be operated in isolation from it.
  • a mobile application performs specific tasks that have virtually no connection with the enterprise information system. There is only a minimum set of data that is exchanged between the mobile application and the information system. In this case, most likely, the mobile application will perform the exchange using some standardized protocol, which makes it possible to use this mobile application in completely different cases and situations.
The two situations described above can be considered extreme options. But these are not the only development options. An application developer can independently choose the integration options between a mobile application and the information system that acts as a back office for it.
The mobile application is developed as a completely standalone configuration, but may share some of the source code with the “parent” configuration. By the way, the “parent” configuration may not physically exist (for example, if you are developing some kind of universal application that can work with different systems using a universal protocol).

Mobile platform device

What is a mobile platform and what can it do?
To be fair, the mobile platform is just one of the components of the entire complex, thanks to which 1C:Enterprise 8 works on mobile devices. So, the application developer operates with the following components:
  1. The mobile platform itself is the mobile part of the 1C:Enterprise framework. It can be a regular one (which is used during the build of the application for publication in the app store) and a mobile developer platform, which is used (surprise) during the development of a mobile application.
  2. Mobile configuration is a configuration of the 1C:Enterprise program system, written in the form of an XML file.
  3. The combination of a mobile platform and a mobile configuration results in a mobile application.
  4. Mobile application builder is a specialized application solution that can make a ready-made mobile application file from a mobile platform, configuration, screensavers, icons and other components, which can be uploaded to the Apple AppStore, Google Play, Windows Phone Apps / Windows Apps stores.
Why is everything so difficult? Why can’t it be done on a mobile device exactly as it is done on a large platform? Those. install one mobile platform on the device and load any number of configurations/applications into it? This is prohibited by licensing restrictions on applications that are distributed through application stores. For example, if your app downloads executable code (in the form of a script) over the Internet, it will never appear in the Apple app store. It should be understood, however, that the ability to download any configuration that is available in the developer’s mobile platform is not intended for distribution of mobile applications even within the same company, not to mention distribution to the developer’s clients.
After the mobile application is on the target mobile device, it becomes necessary to use some kind of database (the data must be stored somewhere). As a database engine, the mobile platform uses its own database engine, which is ported to the mobile platform from the platform for a personal computer. It is compact and fast enough, but the main thing is that it provides exactly the same behavior that application developers are accustomed to when working on a platform for personal computers.
It is also worth noting that internally, the mobile application is built according to the same scheme as the work of a regular platform with a file version of the information base: there is a client part, there is a server part, there is a database and there is client-server interaction.
The mobile platform itself is written as a native application, compiled into binary code for the main processor architectures currently used in the mobile world: this is the ARM v5 and higher architecture and x86.
In addition, special permissions may be required to interact with certain capabilities of a mobile device (telephony, GPS, working with the built-in camera, etc.). For iOS, they are set directly during the operation of the application itself, and for Android, permissions are specified when creating the application. The required permissions are specified when developing a mobile application and are used by the mobile application builder, but more on the builder a little later.

A little about the developer platform

While we are developing a mobile application, we are not bound by licensing restrictions imposed on mobile applications distributed through application stores. This means that we can use the 1C mobile platform in the same way as we use a “large” platform on a personal computer - install the mobile platform itself on a smartphone/tablet and load mobile application configurations into it. After launch, the platform will show us a list of applications registered in it:

To add a new application to the platform, you need to place an XML file with its description on a resource accessible from a mobile device via the HTTP protocol. The most convenient way to do this is from the Configurator, through the menu “Configuration \ Mobile application \ Publish”. In this case, the XML file with the application configuration is placed on a web server on the developer’s computer (accordingly, this computer must have a web server - IIS or Apache).

If you specify the “Restart from configurator” option for the application, the application on the mobile device will be automatically updated from the developer’s computer every time the developer updates the XML configuration file located on the web server.
When the “Debugging Allowed” option is enabled, step-by-step debugging of the application on a mobile device is possible from the Configurator on the developer’s computer (in the Configurator, the “Debugging via HTTP” option must be selected in the “Tools\Options” menu). If you set breakpoints in the code in the Configurator and select the “Mobile application - start debugging” command, the mobile application on the device will stop when the executing code reaches the breakpoint, and in the Configurator you can view the values ​​of variables, the call stack, etc.

What can he do?

So, what can the mobile platform do? Enough:)
If you don’t use specific 1C:Enterprise terms, the mobile platform provides the ability to work with regulatory and reference information, draw up documents describing some external actions, view reports, communicate with the outside world using Internet services, and much more. Those. it provides an application developer with the opportunity to write a fairly functional application, for example, a home finance accounting program, a field trading program, and the like.
But in addition to the usual functionality that is found on a platform for a personal computer, the mobile platform must provide work with specific capabilities that are unique to mobile devices:
  • working with calls and call logs;
  • working with short messages (SMS) and their list;
  • contacts;
  • calendars;
  • geopositioning (without routing);
  • allows you to take photographs, as well as video and audio recording;
  • respond to changes in screen orientation;
  • work with notifications (local and PUSH, both directly and through a special intermediary service);
  • scan barcodes and QR codes using the camera
  • Monetization of mobile applications (i.e. a way to give the mobile application developer opportunities for additional income):
    • Work with the Apple In-App Purchase (for iOS OS) and Google Play In-App Billing (for Android OS) shopping services, with which you can organize various types of subscriptions, purchases of functionality, etc. in a mobile application
    • Displaying advertising in mobile applications (iAd services for iOS and AdMob for Android are currently supported).
  • etc.
It is clear that some features may not be available on each specific device, therefore, to determine what can be done on the device on which the mobile application is running, special methods are provided that allow you to find out what is available on this device, for example, the ability to dial numbers or not. Thus, approximately the following usage scheme is implemented: we check whether some feature can be used or not, and if it is possible, we use it:
If Telephony Tools.SupportedDialing() Then Telephony Tools.DialNumber(PhoneNumber, CallImmediately); endIf;
Hiding details about the mobile OS used from the application developer and providing him with unified mechanisms for using mobile functionality is an important task for us. We believe that we are successfully solving the problem. Differences in the implemented mechanisms are either absent or minimized. Except, of course, for cases where there is no functionality at all in one of the operating systems.
For example, the technique for working with PUSH notifications is very different between Google and Apple. We have made a lot of effort to unify the mechanism for working with PUSH notifications from application code. In the case of a mobile application, we succeeded almost 100%: the same application code on a mobile device processes the reception of PUSH notifications on both iOS and Android. And the code for sending PUSH notifications in the server application also looks the same. But in order to achieve such unification, we had to develop a special proxy server https://pushnotifications.1c.com/, which hides from the developer different techniques for working with Apple Push Notification Service (APNS) and Google Cloud Messaging (GCM). The whole difference lies in the different settings directly on the proxy site https://pushnotifications.1c.com/; to work with APNS, you need to upload an SSL certificate to the site (which Apple issues for the application at the request of the developer); to work with GCM, you need to specify a unique application identifier.
Obviously, it is impossible to implement all the features you want in a mobile application right away. And you always have to find a compromise between several very useful things. And if you are missing something, write to us about what business tasks (after all, a platform is, first of all, a tool for implementing business tasks!) you cannot solve and what mechanism would help you with this.

What does it look like?

The graphical interface of the mobile platform is a separate issue. In 1C:Enterprise, as you know, the interface is described declaratively. This, on the one hand, imposes some restrictions on UI development (for example, there is no possibility of pixel-by-pixel positioning), but, on the other hand, it allows the platform to uniformly render the interface on screens of different sizes, in thin and web clients. We tried to adhere to the same principle in the mobile platform. How well have we done this? Let's try to figure it out.
In the first versions of the mobile platform (up to 8.3.5 inclusive), the graphical interface of the applications looked very familiar to experienced 1C users; in fact, he transferred the interface familiar from the “desktop” versions of 1C to the mobile world. But from the point of view of users who were not previously familiar with 1C, the interface looked somewhat archaic.
Taking into account comments and suggestions, we have radically revised our approach to the mobile interface in version 8.3.6. We can say that we have made a completely new mobile interface for our applications. It has a lot in common with our Taxi interface. The development model for mobile application developers corresponds to the development model in Taxi. At the same time, the mobile interface fully complies with the design approaches adopted in mobile applications. The interface fully takes into account the specifics of the mobile world: small screen size (which means the design of graphic elements should become more ascetic - without shadows, gradients), there is support for finger gestures, etc. Interesting fact: the new platform mechanism responsible for placing elements in the form (layouter) turned out to be so successful and timely for the mobile platform that it was released earlier (in version 8.3.6) than in the PC platform (in version 8.3.7) , for which it was primarily intended.
In the picture you can see how our interface has changed.
Application “Management of a small company” on mobile platform version 8.3.5:


It is the same on version 8.3.6:

And this is what the interface of the mobile platform looks like in real life:

The collector - and what kind of beast is this?

As mentioned earlier, a mobile application consists of several components (the mobile platform itself, configuration, various resources), which must form a single whole in order to place the application in the store. To make it easier to turn components into an application, a mobile application builder was developed. This is a configuration (application) created on the 1C:Enterprise platform, which stores in its database all the components necessary to create a mobile application. In order for the collector to do its job, you need to download and install various software packages that are needed for its operation (Java and Android SDK, etc.), then specify the paths to these packages in the collector settings and set some additional parameters (developer keys etc.).


After configuration, the assembler is ready for use. In general, working with the collector looks like this:
  1. Download the version of the 1C mobile platform on which we will build the application
  2. Loading the configuration from which we will build the mobile application
  3. We create a mobile application in which we indicate for which platforms (Android, iOS, Windows) the build should be performed, what configuration and platform should be used (in particular, indicate which certificate to use for building for iOS if the application works with PUSH- notifications).
  4. We build a mobile application for all selected platforms with one click
  5. “With another click” we send the collected mobile applications to the application stores (if it is an application for iOS or Android). The application must be downloaded manually to the Windows Apps / Windows Phone Apps stores, because Microsoft does not yet provide an API for publishing an application in the store.
It should be separately noted that the collector is not needed to develop and debug a mobile application. To do this, you can use the mobile developer platform and Configurator tools to transfer the configuration to the mobile device. But to distribute a mobile application, you need a collector.

Applications on the mobile platform

The 1C company itself produces a number of applications on the mobile platform that are mobile clients of 1C server applications (1C: Document Flow, 1C: Small Firm Management, etc.). These applications implement some subset of the functionality of "regular" clients. In the case of the mobile version of 1C: Small Firm Management, the functionality is sufficient for full use of the program, and we have often seen a situation where the mobile version of the application is enough for clients to conduct business.
Our partners use the mobile platform both to develop mass-produced mobile applications distributed through application stores, and for custom applications created according to the requests of specific clients. Among mass-produced applications, there are applications that use a non-1C back-end as a central data storage.
Among the mobile applications created at the request of clients, we can mention the mobile client for 1C:Manufacturing Enterprise Management, created by order of a large machine-building holding. About a hundred employees of the holding use the mobile application in hot shops, where for safety reasons it is impossible to install desktop computers. The built-in camera of a mobile device is used to read barcodes of products and search for them in the item directory; the mobile application allows you to understand at what stage of the technological chain a given product is located, mark the passage of the next operation by the product, etc.

Conclusion

We tried to very superficially describe the mobile platform, what it allows you to do and why it turned out the way it did. This article says almost nothing about mobile Windows. There are several reasons for this: firstly, the version of the mobile platform for Windows was released relatively recently (“1C:Enterprise” version 8.3.7), and secondly, this version of the mobile platform does not have any significant differences from the implementation for other mobile operating systems . Naturally, we will increase functionality for Windows OS. As well as increasing the functionality of the mobile platform as a whole. So, in the near future we have support for external components in the mobile platform; this mechanism (long available in the “big” platform) will allow developers to implement functionality that is not available for some reason in the mobile platform.
Traditionally, the strengths of the 1C:Enterprise technology platform are its ease of use for developers and the speed of creating and modifying business applications. The 1C mobile platform brought both of these trump cards to the mobile world. The 1C mobile platform is an opportunity to quickly develop an application that runs on the three most popular mobile platforms (iOS, Android, Windows Phone / 8.1 / 10). And thanks to the wide range of available platform-independent integration tools (Web and HTTP services, etc.), the 1C mobile platform is the ability to quickly create a mobile client for three mobile platforms for almost any server application that supports any of the integration methods available in the 1C platform (Web and HTTP services, file sharing, etc.).

Only registered users can participate in the survey. Come in, please.

New on the site

>

Most popular