Mobile application 1c for android. Automation Tips

On September 28 of this year, 1C released a trial version of the 8.3.2.163 platform, which was intended for testing, without much noise and pathos. Those interested can read the full list of changes and improvements or, if they have a subscription, .
Of the listed improvements, it seems to me that “Mobile platform 1C: Enterprise 8” is quite “delicious”, 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, "This is the general name of a technology that allows you to create applications that run on mobile devices running Android or iOS operating systems."
“A mobile application installed on a device is a combination of a mobile platform and 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 goodness can be laid out in Google Play or AppStore. True, if a program for Android can be signed with a key created there immediately in 1C, and it will be ready for publication immediately, then in order to publish an application in the AppStore, it will first have to be assembled using the Xcode program on a computer with an operating system. Mac system OS X. And, of course, publishing to any of these stores requires a developer license.
Everything sounds good, and I naturally wanted to try out new features in action.

Creation mobile application on 1C

For this we need a new version platform(), the file that is taken, android SDK and JDK.
I’ll warn you right away: now I don’t set 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 Googlephone. Let's make a program for test purposes - a configuration with one common form, which we will put on the "desktop".
So, we create a new configuration in controlled mode, and the first thing we need to do if we write for a mobile platform is to specify the "Destination 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, scheduled 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 during development.
We make a “form”, create a string prop with the title: “Hi, Habr!” - and throw it on the form. We will also create a button. In the handling of pressing, we will write the output of a message, for example.

&AtClient Procedure Command1(Command) Warning("It works!"); EndProcedure

To check the performance, this is enough for us, so we proceed to the most interesting. We save the configuration to a file for the mobile application (Configuration->Mobile application->Write to file), run 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 offered to fill in the primary settings, where all the required fields are underlined in red.

Mobile platform location - the directory where the android.zip and ios.zip files are located, which are necessary to generate the mobile application delivery. They are all in the same mobile.zip archive.
Specify the folder where we installed Android SDK(you can download). 1C sets the following requirements:
Android SDK Tools version - at least 20.0.3;
Android SDK Platform-tools version - at least 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 with the Android SDK.
We specify the folders where our .apk file will be placed, the location of the key for the signature and the alias with the 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 generate a key for yourself (in this case, in the “key file” field, you must specify the folder where this key will be created).
Click "OK" and go to the second window.

In it, first of all, we indicate the "Configuration of the mobile application" - the same file that we saved. Then the language, and only then we click on the button with the “magnifying glass” and enter the representation there. Specify "Application ID" - the unique name of the Java class, which will be used later 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 about the successful creation of the .apk file.
We upload the resulting file to the phone and install it with our favorite manager, having previously allowed the installation in the system settings third party applications. Or install the program on the emulator via adb. I will say right away: everything is terribly slow on the emulator, but on the phone (I only checked it on 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 a long time. After launch, we are greeted by a splash screen, and after a while the configuration itself starts. (sorry for the photo: I took it with a calculator)

So far, the new features look very “raw”: 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 am 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 really worthwhile. But on the other hand, this is clearly a big step for 1C towards mobility, and if this direction will be 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 get rid of the reading devices, and scan the codes directly from the tablet, you can supply them to car drivers, and send tasks for transportation or track the route of the car and the time in motion. There are, in general, a lot of 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 before using a large number different systems, they want to use all the functionality on a single platform.

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 methods 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 quick creation 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 "Extension for pocket computers". The extension allowed you to create products only for the OS 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. latest version 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 popularity to this software product. iOS and Android devices have occupied almost the entire mobile device market, and it has become clear that support for these operating systems is one of the key points for a system that must be operated in today's mobile world. It also seemed obvious that the main approach of the existing 1C:Enterprise platform should also be used on mobile devices: an applied developer should first of all think about solving applied problems, and secondly, about what features of the OS he uses to solve these problems . In other words, you need a tool that isolates the application developer from the specifics of a specific mobile OS and development tool.

Mobile platform

Based on the experience of developing and operating an extension for pocket computers, it was decided to develop a specialized system that would satisfy several requirements:
  • it should support modern popular mobile Operating Systems and devices under their control. First of all, these are iOS by Apple and Android by Google.
  • this system should allow the use of developed applications in the style adopted on modern mobile devices. In particular, the interface must be based on manual control(in the literal sense of the word) using touch screens.
  • the system should provide a uniform programming 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.
  • application developer should develop application solution in a familiar development environment, using the same code for desktop and mobile whenever possible.
  • the interface of an applied solution running on a mobile device should be similar for different platforms and generally unambiguously 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 iOS, Android, Windows Phone / 8.1 / 10 mobile operating systems using the same development environment (Configurator) and the same development methods 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 well received by the community, various articles on this topic began to appear (for example, and). In order to develop a full-featured application that runs simultaneously on the vast majority of mobile devices, it 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 entry threshold attracts developers who need to provide some basic functionality for employees working on the road, bosses, and other mobile employees who need to work with the corporate system.
It is easy to start developing a mobile application on the 1C:Enterprise platform. In the Configurator, you need to set the configuration property "Purpose of use" to the value "Mobile device". In this case, some of the application configuration objects will become unavailable (characteristic types plans, charts of accounts, etc.), but mobile application-specific properties will become available (for example, built-in multimedia and geopositioning tools). mobile device etc.).


At the same time, you can debug the main application algorithms (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 the "mobile" functionality is called with appropriate instructions to the preprocessor in order to avoid errors when executing the code on a personal computer:
#If MobileApplicationClient Then Data = GeolocationServer.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 a variety of approaches, but there are a few main points that stand out. From the point of view of building the actual mobile application, its functional richness and role in the IT infrastructure of the enterprise:

  • a mobile application can be an integral and integral part of an existing enterprise information system. The mobile application will provide an interface and other features (including data exchange) tailored to the capabilities of the existing information system. In this case, the mobile application is very closely related to the "normal" information system and cannot be used in isolation from it.
  • the mobile application performs specific tasks that are practically unrelated to the enterprise information system. There is only a minimal set of data that is exchanged between the mobile application and the information system. In this case, most likely, the mobile application will 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. The application developer can independently choose the integration options between the 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 universal application, which can work with different systems according to the 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 whole 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 comes in the form of regular (which is used during app build for publishing to the app store) and mobile developer platform which is used (surprise) during mobile app development.
  2. A mobile configuration is a configuration of the 1C:Enterprise software system written as an XML file.
  3. The combination of mobile platform and mobile configuration results in a mobile application.
  4. Mobile application assembler is a specialized application solution that can be made from a mobile platform, configuration, splash screens, icons and other components, finished file mobile application that can be downloaded from Apple AppStore, Google Play, Windows Phone Apps / Windows Apps.
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 prohibits making licensing restrictions on apps that are distributed through app stores. For example, if your app downloads executable code (as a script) over the Internet, it will never appear in the Apple app store. However, it should be understood that the ability to download any configuration that is in the developer's mobile platform is not intended for the distribution of mobile applications even within one 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 personal computer. It is compact and fast enough, but the main thing is that it provides exactly the same behavior that application developers are used to when working on a platform for personal computers.
It is also worth noting that inside the mobile application is built according to the same scheme as the work of a conventional platform with a file version of the infobase: there is a client part, there is a server part, there is a database and there is a 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 features of the mobile device (telephony, GPS, work 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 the application is created. Required permissions are specified when developing a mobile application and are used by the mobile application builder, but more on the builder 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 the “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 the web server on the developer's computer (accordingly, this computer must have a web server - IIS or Apache).

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

What can?

So what does the mobile platform do? Enough:)
If you do not use the specific terms of 1C:Enterprise, then the mobile platform provides an opportunity 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 mobile sales program, and the like.
But in addition to the usual functionality that is on the platform for a personal computer, the mobile platform must provide work with specific features that are unique to mobile devices:
  • work with calls and call log;
  • work with short messages (SMS) and their list;
  • contacts;
  • calendars;
  • geopositioning (without laying routes);
  • allows you to take pictures, as well as video and audio recording;
  • respond to screen orientation changes;
  • work with notifications (local and PUSH, both directly and through a special intermediary service);
  • scan barcodes and QR codes with the camera
  • Monetization of mobile applications (i.e. a way to give a mobile application developer opportunities for additional income):
    • Working with Apple In-App Purchase (for iOS OS) and Google Play In-App Billing (for Android OS) purchase services, with which you can organize various kinds of subscriptions, functionality purchases, etc. in a mobile application
    • Show ads in mobile apps (iAd 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, there are special methods that let you know is available on this device, such as the ability to dial a number or not. Thus, approximately the following usage scheme is implemented: we check whether it is possible to use some kind of opportunity or not, and if possible, we use it:
If TelephonyTools.SupportedDial() Then TelephonyTools.DialNumber(PhoneNumber, Call Immediately); EndIf;
To hide from the application developer details about the mobile OS used, to provide him with unified mechanisms for using mobile functionality is an important task for us. We believe that we have successfully solved the problem. Differences in the implemented mechanisms are either absent or minimized. Except, of course, for cases where there is no functionality in one of the operating systems at all.
For example, the technique for working with push notifications is very different between Google and Apple. We have put a lot of effort into unifying the mechanism for working with PUSH notifications from the application code. In the case of a mobile application, we succeeded almost 100%: the same application code on a mobile device processes the receipt 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 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 not possible to implement all the features that you want to have in a mobile application right away. And you always have to find a compromise between several very useful things. And if something is missing for you, write to us about what business tasks (after all, the platform is, first of all, a tool for implementing business tasks!) You cannot solve and what mechanism would help you for 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. On the one hand, this imposes some restrictions on the development of the UI (for example, there is no possibility of pixel-by-pixel positioning), but, on the other hand, it allows the platform to render the interface uniformly on screens of different sizes, in thin and web clients. We tried to adhere to the same principle in the mobile platform. How well did we do it? Let's try to figure it out.
In the first versions of the mobile platform (up to 8.3.5 inclusive) GUI applications looked very familiar to sophisticated 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 the 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 is fully consistent with the design approaches adopted in mobile applications and . The interface fully takes into account the specifics of the mobile world: a small screen size (which means that 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 in it earlier (in version 8.3.6) than in the PC platform (in version 8.3.7), for to which it was primarily intended.
In the picture you can see how our interface has changed.
Application "Management of a small company" on the version of the mobile platform 8.3.5:


It is on version 8.3.6:

And this is what the interface of the mobile platform looks like live:

Collector - and what kind of animal is this?

As mentioned earlier, a mobile application consists of several components (the actual mobile platform, configuration, various resources), which must be a single whole in order to place the application in the store. To facilitate the transformation of components into an application, a mobile application assembler has been developed. This is a configuration (application) created on the 1C:Enterprise platform, which stores in its database all the components necessary to form a mobile application. In order for the assembler 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 Extra options(dev keys, etc.).


After setting up the collector is ready to work. In general, work with the collector looks like this:
  1. We 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) we need to build, what configuration and platform should be used (in particular, specify which certificate to build for iOS to use if the application works with PUSH- notifications).
  4. We perform “one-click” assembly of a mobile application for all selected platforms
  5. With another click, we send the collected mobile applications to the application stores (if this is an application for iOS or Android). IN Windows Stores Apps / Windows Phone app app must be loaded manually, because Microsoft does not yet provide an API for hosting an app in the store.
It should be noted separately that the assembler is not needed for developing and debugging a mobile application. To do this, you can use the developer's mobile platform and the Configurator tools to transfer the configuration to a mobile device. But to distribute a mobile application, you need an assembler.

Applications on the mobile platform

The 1C company itself releases a number of applications on the mobile platform that are mobile clients of 1C server applications (1C: Document Management, 1C: Small Company Management, etc.). These applications implement some subset of the functionality of "regular" clients. When mobile version"1C: Small Business Management" functionality is enough for the full use of the program, and we have often seen a situation where a mobile version of the application is enough for customers to run a business.
Our partners use the mobile platform both for the development of mass-produced mobile applications distributed through app stores, and for custom applications created at the request of specific customers. Among the circulation applications, there are applications that use a non-1C back-end as a central data repository.
Among the mobile applications created by order of customers, we can mention the mobile client for "1C: Manufacturing Enterprise Management", created by order of a large engineering holding. About a hundred employees of the holding use a mobile application in hot shops, where, for safety reasons, put desktop computers impossible. The built-in camera of a mobile device is used to read the barcodes of products and search for them in the stock list directory, the mobile application allows you to understand at what stage of the technological chain this product is located, mark the passage of the next operation by the product, etc.

Conclusion

We tried very superficially to describe the mobile platform, what it allows you to do and why it turned out the way it turned out. 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 the 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 in the mobile platform external components; this mechanism (which has long been available in the "large" platform) will allow developers to implement functionality that is not available for any reason in the mobile platform.
Traditionally strengths of the 1C:Enterprise technological platform are the ease of learning for the developer and the speed of creating and modifying business applications. The 1C mobile platform has transferred 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 a wide range of available platform-independent integration tools (Web and HTTP services, etc.), the 1C mobile platform is an opportunity 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 exchange, etc.).

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

Mobile application development is always associated with the need to learn additional technologies. But what if we reconsider the question and use already familiar tools?

For the first time, 1C tried to enter the market mobile development in 2006. At that time, there was a real boom in automating the work of remote employees using a PDA. New programs for solving such problems appeared like mushrooms, and such a vendor as 1C with successful products for automating various business areas could not miss the chance to enter the profitable market.

By the middle of 2006 the company presented the release of a new product with the promising name "1C:Enterprise 8. Extension for PDAs". The developers of 1C, who saw the prospects of the 8th platform, had a hope that now on one tool it became possible to carry out development under the popular Windows Mobile operating system in those years without much difficulty.

In practice, things looked much worse. Incarnate original ideas this tool did not allow. Package " PDA extension”was more of an add-on for certain typical configurations than a complete development solution. It was not intended to expand the functionality of the configuration by adding new metadata objects. At the mercy of third-party programmers, there were very simple things: creating new forms for interacting with the user, processing user events.

Yes, there were all sorts of circumventions of the restrictions, but even they did not allow for a real turn around. In addition to technical limitations, consumers have experienced a serious financial barrier. Companies that decided to implement a solution from 1C needed to purchase high-performance PDAs, purchase licenses for Windows Mobile, and also pay 1C for the delivery of the solution and the final application.

The solution from 1C was too expensive. Companies accustomed to save money continued to use alternative solutions. Moreover, the developers of alternatives managed to provide their products with functionality for interacting with typical 1C solutions.

Technical limitations, high cost did not allow the product to repeat the tremendous success of the desktop platform. The idea to conquer the mobile market corp.

applications failed miserably.

Step forward

Loss and losses from an unsuccessful project did not put an end to the development of a promising direction. In 2013, 1C introduced the first stable version of the new 8.3 platform, which has the function of developing mobile applications.

1C completely rethought the approach to solving the mobile "theorem" and took into account the mistakes of the previous unsuccessful product. The result is a completely new tool that has nothing in common with its predecessor and is focused on the latest mobile platforms - Android and iOS.

Mobile applications in 1C style

For a full acquaintance with the possibilities of developing for mobile platforms, let's try to develop a small configuration. Using a cross-cutting example, you can better evaluate the available functionality and decide on the possibility of using the 1C platform to solve problems.

To work, you need the latest release of the 1C:Enterprise 8.3 platform. The educational version of the distribution kit is available on the official 1C website. To recreate an example, its capabilities are more than enough.

In addition to the 1C:Enterprise 8.3 platform, we will need a number of additional tools. The article will consider an example of developing an application for Android. In this regard, you will have to download: Android SDK and Apache WEB server. The first component contains everything you need to build the application and an emulator for testing, and the WEB server is useful for fast loading mobile OS applications.

We will also need to supply the "Mobile Developer Platform". It contains a configuration to simplify the process of building the created mobile application, as well as a mobile developer platform. It must be installed on a mobile device or emulator.

To build an application ready for distribution via Google Play, you will need to download Apacheant And JavaJDK. This topic is beyond the scope of the article, so you can learn more about working with these tools and building an application in the corresponding section of my .

Configuring tools

Platform " 1C:Enterprise 8.3' and the Apache web server come with installers and are installed in the standard way. Android SDK you just need to unzip it into a separate directory and run “ sdk manager.exe". You will see a window with a choice of available packages for installation. For testing, considered within the framework of the example article, you will need to select and install: Android SDK Tools, A Android Platform Tools, SDK Platform API 17.

The last step is to create a new infobase. For those who are not involved in the development of under on " 1C:Enterprise»I will explain that any solution for this platform consists of an information base and configuration. Adding a new database is carried out by clicking the button " Add» start window. After adding the base, open it in the " Configurator».

First mobile configuration

In the main menu of the configurator, find the section " Configuration” and select the item “Open configuration”. The configuration tree (of the objects that the future application will consist of) will be displayed in the left part of the window. Select the configuration root in it and press the key combination " Alt+Enter". The properties editor will open in the right part of the configurator window.

Let's call the configuration " TODO” and in the “Destination of use” property, specify “ Mobile device". Pay attention by doing last action, some nodes of the configuration tree will become inactive. Unfortunately, you won't be able to use all the metadata objects on the mobile platform.

To solve our problem, we need to create several metadata objects in the configuration tree:


Procedure AddTask(Task) ExportRecordManager = CreateRecordManager(); RecordManager.Period = CurrentDate(); RecordManager.Task = Task; RecordManager.Status = Task.Status; RecordManager.Write(); EndProcedure

Listing 2. Code for GetList of Unclosed Tasks() function

Function GetList of Unclosed Tasks() Export Request = New Request; Query.Text = "SELECT | TaskStatusLastSlice.Task AS Task, | TaskStatusLastSlice.Task.DueDate AS DueDate |FROM | DataRegister.StatusTasks.SliceLast(&CurrentDate, Status<>VALUE(Enumeration.TaskStatuses.Completed)) AS TaskStatusSliceLast | |ORDER BY | DueDate DESC"; Query.SetParameter("CurrentDate", CurrentDate()); Return Query.Execute().Upload(); EndFunction

We have dealt with obtaining data from the information register and recording them, now we will teach our reference book to work with the register. To do this, add a common module named " WorkWithTasks". You can do without it, but I immediately want to focus on the possibility of splitting the code into modules. Many 1C developers still neglect this recommendation and describe all the logic in one place, thereby making subsequent code maintenance difficult. Let's create a new procedure in the module " Create New Task» (see Listing 3).

Listing 3. Code for the "Create a New Task" procedure

Procedure CreateNewTask(Reference) Export If Reference.ThisGroup Then Return; EndIf; Request = New Request; Query.Text = "SELECT | TaskStatusLastSlice.Status |FROM | DataRegister.StatusTasks.SliceLast(&CurrentDate, Task = &Task) AS TaskSliceLastStatus"; Query.SetParameter("CurrentDate", CurrentDate()); Request.SetParameter("Task", Link); Result = Query.Execute().Select(); If Result.Next() Then If Result.Status<>Link.Status ThenRegistersInformation.StatusTasks.AddTask(Link); EndIf; Otherwise, DataRegisters.TaskState.AddTask(Reference); EndIf; EndProcedure

Before creating a new record, a check is made for the presence of existing records for the task. If the record already exists, then you need to compare the task statuses. If the status from the register does not differ from the status of the element being written, there is no need to create an additional entry.

With the final touch, open the form of the "Tasks" directory element and create an event handler " AfterRecordingOnServer". In it we will write a call to the procedure described in the third listing:

WorkWithTasks.CreateNewTask(CurrentObject.Reference);

Working on the interface

The main functionality of the application is ready - the user can create tasks, and each new task forms an entry in the periodic information register. Now let's take a look at the interface. Let's bring the work with tasks to the fore. After all, it is logical to display the list immediately after launching the application. closed tasks and the opportunity to create a new one?

Let's find the node " General forms» and add new form With name " Desktop". Let's open the created form in the interface constructor and add an attribute like " Value Table". Let's call it "OpenZachi". The table will contain two columns - " A task" (Reference Link. Tasks) and " Execution Date" (Date of).

The next step is to drag the added attribute onto the form. We should get an interface the simplest table. We will not indicate any dimensions, we will leave the concern about scaling the interface to the platform.

For the created table, in the property inspector, check the box for the property " View only", and the property " Command Bar Position» Specify the value «No». We will fill the table with dynamic information, so there is no point in editing by the user.

Now let's describe the form's event handler "OnCreateOnServer". Let's add one line of code to it:

OpenTasks.Load(InformationRegisters.TaskStatus.GetList of NotClosedTasks());

In the code, we refer to the procedure we described " GetList of Unclosed Tasks” and the result of its execution is placed in the table.

Let's go back to the form constructor and add a group of type "Normal group without display" with two buttons: " Create" And " Refresh". Property " grouping» Set the value of the added group to «Horizontal». For a more expressive design of the buttons, we will add images and change the default font.

Now select the button Create and ask her global team « Tasks: create". This will allow you to create tasks without entering the directory itself. By pressing the second button, we will update the contents of the table with tasks. For this you need to create additional command forms.

All new form commands are created on the tab of the same name " Teams". The principle is simple - we add a new command, describe the action code in it and then associate the command with the interface, in our case with the button.

We should also not forget that we are developing a managed application, so we need to clearly distinguish between client and server code. When the button is clicked, the context will be " OnClient”, and we will receive data from the database from the server. In code it looks like this:

&At the Client Procedure UpdateTaskList(Command) UpdateList(); EndProcedure &OnServer ProcedureOnCreateOnServer(Abandon, StandardProcessing) OpenTasks.Load(InformationRegisters.TaskStatus.GetList of UnclosedTasks()); EndProcedure

Now let's define our desktop shape as an area start page. Open the configuration properties (select the topmost node and click " Alt+Enter”) and for the property “Initial Page Workspace” set the value to “ One column”, then add our form to the list “ Desktop».

The application is completely ready and it's time to test it in operation. Try running the example and create some tasks with a status other than " Completed". The information register has been replenished with new entries (this can be viewed through the menu item " All features”) and some of them are displayed on the desktop.

Landing on Android

The configuration works great on desktop, and now is the time to test it on a mobile OS emulator. To prepare a new emulator, run a shell ( cmd.exe) and go to the "toos" directory of the Android SDK distribution. Execute the command " android.bat avd", which will launch the virtual Android devices. In it, click the "Create" button and in the window that appears, specify the parameters of the virtual device. In my working environment, I decided to emulate Nexus S with Android version 4.2.2. (API Level 17).

After creating the device, we will immediately launch it. While android is loading, let's go back to the configurator and publish our application on the web server. In the main menu of the configurator, select the item " Configuration» -> « Mobile app» -> « Publish". In the publishing settings window, specify the application name (it can be anything), the web server (in our environment, it should be one) and the directory for storing the settings.

Specifying " todo-mobile", the application will be available at the address - " http://host/todo-mobile". Click "ok" and try to access the published application using a browser. If successful, the server will return the XML code of the created configuration.

We return to the emulator and load the application with the developer's mobile platform into it. The application file itself is available along with the developer's mobile platform delivery and is called "1cem-arm.apk". To install this application in the emulator, we will use the utility " adb.exe» from the directory « platform-tools»: adb.exe install –r 1cem-arm.apk.

After successful installation, open the list of applications in the emulator and launch the developer's mobile platform. In the window that opens, click " Add application” and in the “address” field specify the URL to our web server. I have it http://192.0.168.106/todo-mobile. Press " Add” and our configuration is successfully moved to the mobile platform. The application is ready to go. Test the result and return to the configurator, it's time to provide applications with "mobile functionality".

Sending SMS/MMS messages

Functions for working with SMS/MMS Messages are supported differently by mobile platforms. For example, when running an application on Android, the developer has the opportunity to subscribe to SMS and get access to new messages immediately after receiving them. Alas, the same feature is not available on iOS, so the documentation should be at hand during development.

For sending SMS messages provided object SMSMessage. Consider an example:

&OnClient Procedure SendSMSMessage(Recipient,MessageText) NewMessage = New SMSMessage(); NewMessage.Text = MessageText; NewMessage.Recipients.Add(Recipient); Telephony Tools.SendSMS(NewMessage); EndProcedure

The code is quite simple and hardly needs comments. Now let's look at the registration of a subscription to incoming messages:

&OnClient Procedure ConnectMessageReceiveHandler() MessageSubscription = NewNotificationDescription("ProcessingNewMessages", ThisObject); Telephony Tools.ConnectSMSMessageHandler(MessageSubscription); EndProcedure &OnClient Procedure NewMessageProcess(Message, AdditionalParameters) //Process new message //Message.Sender, Message.Text; EndProcedure

Procedure " Handling New Messages” will be called each time a new SMS is received. Through the parameter " Message» an object of type « SMSMessage” and we can easily get the text of the message and information about the sender.

Working with MMS messages is done in a similar way. We first create an SMSMessage and then add an attachment to it (for example, images). With this simple action, SMS turns into MMS:

NewMessage= New SMSMessage(); Attachment = New MMS Attachment; Attachment.Data = Image; Attachment.ContentType = "image/jpeg"; MMSMessage.Attachments.Add(Attachment);

Making calls from a mobile app

A call is made programmatically using the "DialNumber" method of the "Telephony Tools" global object. Before calling the method, it is highly desirable to check the possibility of making a call:

If TelephonyTools.SupportedDial() Then TelephonyTools.DialNumber(PhoneNumber, Call Immediately); EndIf;

Parameter " Call Immediately” affects dialing performance. When it equals True”, the number is dialed automatically via standard application making calls. If set to False, the user will also see standard interface dialing application, but to make a call, you need to press the " summon».

Call log

The mobile platform allows the developer to interact with the call log. For example, you can easily get a list of outgoing, missed or incoming calls. This feature is only supported on Android:

CallLog = TelephonyTools.GetCallLog(); Selection = New DataComposition Selection; Selection Element = Selection.Elements.Add(Type("DataComposition Selection Element")); Selection Element.LeftValue = New DataCompositionField("Call Type"); Selection Element.ComparisonType = DataCompositionComparisonTypeData.Equal; Selection Element.RightValue = CallLogCallType.Missed; SelectionItem.Use = true; List of Call Log Records = Call Log. Find Records (Selection); //In the List of Records of the Call Log there will be a collection of records

Geopositioning

Almost any modern smartphone has the functions of determining the geolocation. You can use this functionality from the built-in 1C language. Obtaining the current coordinates of the device can be conditionally divided into 2 stages: choosing a geopositioning provider and processing the received coordinates:

//Let's let the platform choose the provider IdealProvider = Geolocation Tools.Get Most AccurateProvider(); Coordinates = Geolocation Tools.GetLastLocation(IdealProvider); //If the coordinates were received a long time ago, then update If Coordinates = Undefined OR CurrentDate() - Coordinates.Date > 3600 Then GeopositioningTools.UpdateLocation(IdealProvider, 60); Coordinates = Geolocation Tools.GetLastLocation(IdealProvider); EndIf;

Working with multimedia features

The developer has the opportunity to take pictures, video recordings, audio recordings using the built-in language: Take a photo(), Make a video recording(), Make an audio recording().

Under what mobile OS is it better to develop on 1C?

Despite my love for Apple technology, it is best to create mobile applications using the 1C platform for Android. There are several reasons for this, but the most important of them is the supported functions. Unfortunately, under iOS, many necessary things are not supported. For example, the inability to programmatically subscribe to SMS messages or interact with the call log may make it impossible to implement some ideas. Android is more friendly in this regard. Do not forget about the cost of the devices themselves. Not every company will be ready to splurge on the acquisition of mobile devices from Apple.

Instead of completing

Platform " 1C:Enterprise 8"in practice has proven its willingness to become a simple tool for the development of corp. Applications for mobile platforms. The examples discussed in the article are additional confirmation of this. It is not at all necessary to spend resources on studying native tools if the functionality of the application fits into the capabilities of the mobile platform and the company is dominated by 1C products.

More recently, the mobile platform 1C Enterprise 8.3 was distributed by 1C only among paid subscribers. But not so long ago, 1C revised its policy on this issue and now the electronic version of the mobile platform is distributed free of charge along with .

What is the mobile platform 1C 8.3?

It is possible that you already know that the 1C Enterprise 8.3 platform itself allows you to develop mobile applications. At the same time, the development of a mobile application is carried out in the same way as the development of a "normal" configuration. But how can the configuration developed in this way be launched on a smartphone or tablet? For these purposes, we need the 1C Enterprise 8.3 mobile platform.

Mobile platform 1C Enterprise 8.3 is a set of programs that allow you to install and run configurations (applications) on smartphones and tablets running Google Android or Apple iOS.

The most important advantage of the 1C mobile platform is that the application (configuration) is developed for both mobile operating systems at once, and then simply installed on the mobile device. Thus, having written a mobile application on 1C, we can immediately install it for all employees of the company, regardless of which operating system (Android or iOS) their phone or tablet is running.

Important! For the development of mobile applications, we strongly recommend using the 1C platform of version 8.3.4.482 or higher. The educational version of the 1C Enterprise 8.3.4.482 platform is included in this distribution kit of the 1C mobile platform. You can get acquainted with the limitations of the educational version of the platform

Mobile platform 1C:Enterprise is a set of tools and technologies for rapid development of applications for mobile OS iOS, Android, Windows Phone / 8.1 / 10, using the same development environments (Configurator or 1C:Entrprise Development Tools) and the same development methods, that are used for "normal" 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 "Extension for Pocket Computers". 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 popularity to this software product. iOS and Android devices have occupied almost the entire mobile device market, and it has become clear that support for these operating systems is one of the key points for a system that must be operated in today's mobile world. It also seemed obvious that the main approach of the existing 1C:Enterprise platform should also be used on mobile devices: an applied developer should first of all think about solving applied problems, and secondly, about what features of the OS he uses to solve these problems . In other words, you need a tool that isolates the application developer from the specifics of a specific mobile OS and development tool.

Mobile platform

Based on the experience of developing and operating an extension 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 by Apple and Android by 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 (in the literal sense of the word) using touch screens.
  • the system should provide a uniform programming 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, using a single code for desktop and mobile systems, if possible.
  • the interface of an applied solution running on a mobile device should be similar for different platforms and generally unambiguously 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 iOS, Android, Windows Phone / 8.1 / 10 mobile operating systems using the same development environment (Configurator) and the same development methods 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 well received by the community, various articles on this topic began to appear (for example, and). In order to develop a full-featured application that runs simultaneously on the vast majority of mobile devices, it 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 entry threshold attracts developers who need to provide some basic functionality for employees working on the road, bosses, and other mobile employees who need to work with the corporate system.
It is easy to start developing a mobile application on the 1C:Enterprise platform. In the Configurator, you need to set the configuration property "Purpose of use" to the value "Mobile device". In this case, some of the application configuration objects will become unavailable (characteristics type plans, charts of accounts, etc.), but mobile application-specific properties will become available (for example, built-in multimedia and geolocation tools for a mobile device, etc.).


At the same time, you can debug the main application algorithms (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 the "mobile" functionality is called with appropriate instructions to the preprocessor in order to avoid errors when executing the code on a personal computer:
#If MobileApplicationClient Then Data = GeolocationServer.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 a variety of approaches, but there are a few main points that stand out. From the point of view of building the actual mobile application, its functional richness and role in the IT infrastructure of the enterprise:

  • a mobile application can be an integral and integral part of an existing enterprise information system. The mobile application will provide an interface and other features (including data exchange) tailored to the capabilities of the existing information system. In this case, the mobile application is very tightly connected with the "normal" information system and cannot be operated in isolation from it.
  • the mobile application performs specific tasks that are practically unrelated to the enterprise information system. There is only a minimal set of data that is exchanged between the mobile application and the information system. In this case, most likely, the mobile application will 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. The application developer can independently choose the integration options between the 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 whole 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 comes in the form of regular (which is used during app build for publishing to the app store) and mobile developer platform which is used (surprise) during mobile app development.
  2. A mobile configuration is a configuration of the 1C:Enterprise software system written as an XML file.
  3. The combination of mobile platform and mobile configuration results in a mobile application.
  4. Mobile application assembler is a specialized application solution that can make mobile platform, configuration, splash screens, icons and other components into a ready-made mobile application file that can be uploaded to 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 prohibits making licensing restrictions on apps that are distributed through app stores. For example, if your app downloads executable code (as a script) over the Internet, it will never appear in the Apple app store. However, it should be understood that the ability to download any configuration that is in the developer's mobile platform is not intended for the distribution of mobile applications even within one 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 the personal computer. It is compact and fast enough, but the main thing is that it provides exactly the same behavior that application developers are used to when working on a platform for personal computers.
It is also worth noting that inside the mobile application is built according to the same scheme as the work of a conventional platform with a file version of the infobase: there is a client part, there is a server part, there is a database and there is a 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 features of the mobile device (telephony, GPS, work 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 the application is created. Required permissions are specified when developing a mobile application and are used by the mobile application builder, but more on the builder 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 the “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 the 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, then the application on the mobile device will be automatically updated from the developer's computer every time the developer updates the XML configuration file hosted on the web server.
When the "Debugging enabled" option is enabled, it is possible to debug the application step by step on a mobile device from the Configurator on the developer's computer (in the Configurator, the "Debugging via HTTP protocol" option in the "Tools \ Options" menu must be selected). If you set breakpoints in the code in the Configurator and select the "Mobile application - start debugging" command, then the mobile application on the device will stop when the executable code reaches the breakpoint, and you can view the values ​​of variables, the call stack, etc. in the Configurator.

What can?

So what does the mobile platform do? Enough:)
If you do not use the specific terms of 1C:Enterprise, then the mobile platform provides an opportunity 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 mobile sales program, and the like.
But in addition to the usual functionality that is on the platform for a personal computer, the mobile platform must provide work with specific features that are unique to mobile devices:
  • work with calls and call log;
  • work with short messages (SMS) and their list;
  • contacts;
  • calendars;
  • geopositioning (without laying routes);
  • allows you to take pictures, as well as video and audio recording;
  • respond to screen orientation changes;
  • work with notifications (local and PUSH, both directly and through a special intermediary service);
  • scan barcodes and QR codes with the camera
  • Monetization of mobile applications (i.e. a way to give a mobile application developer opportunities for additional income):
    • Working with Apple In-App Purchase (for iOS OS) and Google Play In-App Billing (for Android OS) purchase services, with which you can organize various kinds of subscriptions, functionality purchases, etc. in a mobile application
    • Show ads in mobile apps (iAd for iOS and AdMob for Android are currently supported).
  • etc.
It is clear that some features may not be available on each specific device, so 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 it is possible to use some kind of opportunity or not, and if possible, we use it:
If TelephonyTools.SupportedDial() Then TelephonyTools.DialNumber(PhoneNumber, Call Immediately); EndIf;
To hide from the application developer details about the mobile OS used, to provide him with unified mechanisms for using mobile functionality is an important task for us. We believe that we have successfully solved the problem. Differences in the implemented mechanisms are either absent or minimized. Except, of course, for cases where there is no functionality in one of the operating systems at all.
For example, the technique for working with push notifications is very different between Google and Apple. We have put a lot of effort into unifying the mechanism for working with PUSH notifications from the application code. In the case of a mobile application, we succeeded almost 100%: the same application code on a mobile device processes the receipt 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 not possible to implement all the features that you want to have in a mobile application right away. And you always have to find a compromise between several very useful things. And if something is missing for you, write to us about what business tasks (after all, the platform is, first of all, a tool for implementing business tasks!) You cannot solve and what mechanism would help you for 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. On the one hand, this imposes some restrictions on the development of the UI (for example, there is no possibility of pixel-by-pixel positioning), but, on the other hand, it allows the platform to render the interface uniformly on screens of different sizes, in thin and web clients. We tried to adhere to the same principle in the mobile platform. How well did we do it? Let's try to figure it out.
In the first versions of the mobile platform (up to and including 8.3.5), the graphical interface of applications looked very familiar to sophisticated 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 the 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 is fully consistent with the design approaches adopted in mobile applications and . The interface fully takes into account the specifics of the mobile world: a small screen size (which means that 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 (layout) turned out to be so successful and timely for the mobile platform that it was released on it 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 the version of the mobile platform 8.3.5:


It is on version 8.3.6:

And this is what the interface of the mobile platform looks like live:

Collector - and what kind of animal is this?

As mentioned earlier, a mobile application consists of several components (the actual mobile platform, configuration, various resources), which must be a single whole in order to place the application in the store. To facilitate the transformation of components into an application, a mobile application assembler has been developed. This is a configuration (application) created on the 1C:Enterprise platform, which stores in its database all the components necessary to form a mobile application. In order for the assembler to perform its work, 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 assembler settings and set some additional parameters (developer keys etc.).


After setting up the collector is ready to work. In general, work with the collector looks like this:
  1. We 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) we need to build, what configuration and platform should be used (in particular, specify which certificate to build for iOS to use if the application works with PUSH- notifications).
  4. We perform “one-click” assembly of a mobile application for all selected platforms
  5. With another click, we send the collected mobile applications to the application stores (if this is an application for iOS or Android). In the Windows Apps / Windows Phone Apps stores, the application must be uploaded manually, because Microsoft does not yet provide an API for hosting an app in the store.
It should be noted separately that the assembler is not needed for developing and debugging a mobile application. To do this, you can use the developer's mobile platform and the Configurator tools to transfer the configuration to a mobile device. But to distribute a mobile application, you need an assembler.

Applications on the mobile platform

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

Conclusion

We tried very superficially to describe the mobile platform, what it allows you to do and why it turned out the way it turned out. In this article, almost nothing is said 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 the 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 (which has long been available in the "large" platform) will allow developers to implement functionality that is not available for any reason in the mobile platform.
Traditionally, the strengths of the 1C:Enterprise technology platform are ease of use for the developer and the speed of creating and modifying business applications. The 1C mobile platform has transferred 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 a wide range of available platform-independent integration tools (Web and HTTP services, etc.), the 1C mobile platform is an opportunity 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 exchange, etc.).

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