1Ci Support Help Center home page
Submit a request
Sign in
  1. 1Ci Support
  2. Hello, 1C
  3. 5. Fine-tune your application for several platforms

Mobile platforms

  • 5. Fine-tune your application for several platforms
    • Cross-platform design
    • Desktop platforms
    • Web client
    • Mobile platforms

<< Prev

One more interesting thing is that the application that you have developed with almost no efforts can be started on iOS or Android mobile devices. This feature is provided by the mobile platform that is a part of 1C:Enterprise 8.3 platform.

The look and feel of applications for Android and iOS devices can be a slight different.

Notice: Systematic instructions on how to create a mobile application for end users you can find in 1C mobile application rapid application development tutorial. In this tutorial, you are going to start your application in the mobile platform for developers.

Details on features of applications based on 1C:Enterprise platform for mobile devices you can see in Chapter 25. Developing solutions for the mobile platform of 1C:Enterprise Developer Guide.

1C:Enterprise 8 mobile platform is a set of tools that let you to create applications that work on Android or iOS mobile devices. Those devices are mostly smartphones and tablet PCs.

The 1C:Enterprise mobile application that you install on the mobile device is a combination of the mobile platform and the infobase. The mobile infobase is similar to the file infobase. It consists of a database that stores data in a file and a mobile applied solution that is a program, which can be started on a mobile device and manage data in the database.

Figure 1-241. 1C:Enterprise 8 mobile platform

Thanks to the mobile platform you can right now, without using any third-party IDE, install, start, and see how works your application on the mobile device. As an example, you will do this for the Android device.

For this, you will need following:

  • Make your applied solution compatible with the mobile platform. You will have to do a few changes for that.
  • The mobile platform for developers installed on an Android mobile device.
  • The web server running on the computer where you develop the application, and accessible by IP from your mobile device.

Start the application in Designer mode and verify it for capability of being started on mobile devices. For this, in Main menu click Configuration, and then click Check configuration...

Figure 1-242. Open Configuration check

You can set the name for the current set of configuration verification options to make it easier to repeat this verification later. Let it be Mobile. Select following check boxes:

  • Verifying configuration integrity and consistency;
  • Find unresolved references;
  • Mobile application - client;
  • Mobile application - server;
  • Search for unsupported functionality.

Click OK.

Figure 1-243. The Configuration check window

The configuration will be verified for compatibility with the mobile platform. The result of this verification will be 11 errors.

Figure 1-244. The result of verification

Those errors should not make you worry. Here they are:

Figure 1-245. The list of errors

If you look carefully, you might mention that there are several unsupported by the mobile platform features used in your application. This happened because until this moment you did not take care of compatibility with mobile devices and used all features that you needed.

Now, as a simplest way, you will delete the use unsupported by the mobile platform features and configure Mobile desktop that will be compatible with the mobile platform.

Notice: To backup the current application, you can in Designer mode in Main menu click Administration, and then click Dump infobase... In the opened dialog select a file name and click Save. To restore the application, in Main menu click Administration, and then click Restore infobase... In the opened dialog select the previously saved DT file, and click Open.

So, delete all subsystems, functional options, and reports.

Figure 1-246. Deleting unsupported metadata objects

In Properties of the root of the Configuration tree, click Select, and in Use purposes list select Mobile device check box, and clear Personal computer check box. Then click OK.

Figure 1-247. Adjusting Use purposes

Notice: Unsupported by the mobile platform application objects are disabled now.

The Mobile desktop of the mobile application is not configured yet. After it will be done, the application will be compatible for the mobile platform.

Create a common form.

Figure 1-248. Creating a common form

Name it MobileDesktop and set Synonym to Hello, 1C. The form type should stay Generic form as for default. After that, click Finish.

Figure 1-249. Adjusting the common form

It seems reasonable that users would like to see the most often used People and Events lists on the Mobile desktop. To provide this information to users, create two attributes of the DynamicList type. The first one will be People. To add the form attribute, in the top right panel of the form editor click Add attribute (Ins). In Properties of the new attribute set Name value to People, and then click Select of the Type property, then select DynamicList.

Figure 1-250. Adding the People attribute of the common form

For the MainTable property, click Select, then in Select table select the People catalog, and then click OK.

Figure 1-251. Selecting the main table of the dynamic list

In the same way, add the Events attribute. With the only difference, the MainTable property will be the Events catalog.

Figure 1-252. Adding the Events form attribute

Now, drag both attributes to the Form node on the top left panel of the form editor. You can select more than one form attribute by holding the Ctrl key and clicking form attributes, and then drag them all at a time to the destination.

Figure 1-253. Placing form attributes on the form

On the opened confirmation dialog, click Yes to agree that columns of both tables will be added to the form automatically.

Figure 1-254. The confirmation of that columns will be added automatically

After that, you will have two tables on the form, displaying all attributes of the Events and the People catalogs.

Delete not required columns from the form. For that, in the People table holding the Ctrl key select PeopleCode, PeopleGender, and PeopleRelationType and then click Delete current item (Del).

Figure 1-255. Deleting not required columns from the People table

From the Events table delete the EventCode and the EventCategory columns.

Figure 1-256. Deleting not required columns from the Events table

Open the Home page work area editor (see Figure 8-19). For that, right-click the root node of the Configuration tree and then click Open home page work area. Delete the Financial transactions accumulation register list form from the Left column and the People catalog list form from the Right column. In Home page template, select One column. After that, add the MobileDesktop common form to the list of forms.

Figure 1-257. The single MobileDesktop form on the Home page

Now, you are done with the configuration changes. To save them press the F7 key. You can check the configuration again (see Figure 12-2), this time there will be no errors found.

The last step is to upload and start this application on the mobile device. You will use the tool that is similar to publication on the web server that was described in Web client chapter.

The web server will keep the application as a single XML file. The mobile platform for developers connects to this web server, downloads that XML file and installs on the mobile device. After that, the application can be started on the mobile device.

In Designer mode in Main menu click Configuration, then click Mobile application, and then click Publish...

Figure 1-258. Opening Mobile application publishing

In the opened window select the Create virtual directory on web server and Update mobile application when a database configuration is updated check boxes, and input hello_1c_mob in Name. See that the last folder in Directory is also changed to hello_1c_mob. Then, click Publish.

Figure 1-259. Publishing the mobile application

Confirm all actions that the platform will ask confirmation for, and your application will be published.

To install and start the application on iOS devices in the developer mode you will need the developer account. Moreover, you will need a Macintosh computer with XCode developer environment.

For Android devices, you only need to install 1C:Enterprise mobile platform for developers using packages that are available in the distribution kit of 1C:Enterprise mobile platform.

For this, upload one of APK installation packages to the mobile device, for example using USB cable. These files are available in Android folder of the distribution kit. Install 1cem-arm.apk if you have a device with ARM processor (suits for most devices) or 1cem-x86.apk if you have a device with x86 processor.

Figure 1-260. Mobile application for developer installation packages for Android

Then, run the installation package.

Figure 1-261. Running the installation package

It will require an access to several system features.

Figure 1-262. Starting the installation

After that, it will install in a few moments.

Figure 1-263. Installing the mobile application

When you will have the mobile platform for developers installed, tap 1C:Enterprise icon to start it.

Figure 1-264. Starting the mobile platform for developers

If you start the mobile platform for the first time, it will show you an empty list of applications. To add a new application, tap Add application.

Figure 1-265. Adding a new mobile application

In Address input http://<your computer IP>/hello_1c_mob. Instead of <your computer IP> insert IP of the computer where you have the web server with published mobile application.

Notice: To find out the computer IP, see its network connection properties. The mobile device and the server should be in the same network. The easiest way of doing that is using a Wi-Fi router. Both, the computer with web server, and the mobile device should be connected to it.

Then, tap Download.

Figure 1-266. The mobile application URL

The mobile platform will download the application.

Figure 1-267. Downloading the mobile application

Then, the mobile platform will suggest you to adjust some properties. Leave Application name as it is and select the Restart from designer check box. Then, tap Done.

Figure 1-268. The mobile application startup parameters

The application will be installed.

Figure 1-269. Installing the mobile application

You will see the application in the list of applications. To start it, tap the application name.

Figure 1-270. Starting the mobile application

The first screen that you see after that is the Mobile desktop form.

Figure 1-271. The Mobile desktop form

If you tap menu button of your mobile device you will see the application menu. Notice that the command interface of the Main section is displayed in the application menu in mobile platform.

Figure 1-272. The mobile application menu

The important notice: the application that you developed and filled with data, when opened on the mobile device contains no data. This is not an error. The data synchronization between several applications is an interesting, but separate topic. The 1C:Enterprise platform can solve these problems with ease. For an example, see Homework 3 of 1C mobile application rapid application development tutorial.

In this chapter spending only a few minutes you developed a mobile version of your CRM application, which is compatible with Android and iOS mobile devices.

To distribute your application for end users you need to create a solid package containing the mobile platform, the applied solution, and the database. For this, 1C:Enterprise platform has packing tools. You can read more about it in Mobile application building example chapter of 1C mobile application rapid application development tutorial. The packed application can be published in Google Play and Apple App Store.

Figure 1-273. Publishing the mobile application for end users

<< Prev

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