NOTE: This page has been translated automatically from Russian to English. Original page.
Android "Emulator" Genymotion + 1C
What you will need:
- Zip archive with the mobile platform 1C: Enterprise;
- Android SDK;
- Set up a web server Apache or IIS (optional, since the article provides an example to the local IIS web server);
- The configuration of a mobile app for testing.
Installation Genymotion (GM).
Genymotion comes in two versions «Free» (for private, non-commercial use) and «Business». The free version is enough to 1C mobile platform functionality. But in order to download the package from the site https://www.genymotion.com/#!/download need to be registered. Authentication is a prerequisite for download and further use of the program.
- GM works in conjunction with Oracle VM VirtualBox manager. Under each new device GM creates and runs a virtual machine. This primarily affects its speed. The difference is noticeable, for example, in comparison with the emulator consisting SDK. Therefore, if VirtualBox was not previously installed, then download the full distribution of the size of 126.07 MB.
- Perform a standard installation of GM.
- After the first start you will be prompted to add a new device, press «No» and go to settings «Settings» program.
In the «Account» tab, fill in the registration data, and set a mark «Remember my credentials».
On «ADB» tab, specify the path to the Android SDK. - Now add the image to the new device. Push the button «Add» and choose the appropriate option from the list of available devices. Click «Next» and wait until the "deploy" virtual copy.
Important! If you want to add a device that supports, for listings, API 19, then you must make sure that the appropriate platform has been installed in the SDK manager'e. - When finished, the new device appears in the list of GM of the main window. On the icon with a wrench, you can make adjustments to the configuration of the device. I have changed the number of processes and the amount of RAM to bring the image to the characteristics of corporate phones. Finally, check the box «Show Android navigation bar», and «Use virtual keyboard for text input» - remove, because text input will be available directly from the keyboard. "OK".
Done!
Setting 1C (8.3.5 and higher).
- Run 1C mobile app configuration in the "configurator" mode.
- In the "Tools" main menu, go to "Settings" section. On the "Running the 1C: Enterprise" open page "mobile application".
- Put a tick "Use" Android Debug Bridge "To run the mobile application";
- Specify the directory with Android SDK (Latin);
- Specify the directory with zip-file of the mobile platform (Latin);
- Under "In the absence of available devices" select the option "Wait for connection" (*) and save settings - "OK".
Installation and upgrade of mobile solutions configurator 1C.
- Go back to the GM box and run the device on the button «Start» (the first run takes longer follow-up).
Note! To adjust the language in Android OS, you need to run applications from the field of «Settings» - find the section «Personal» - select «Language & input» - and «Language» parameter is set to "Russian". - Next, set the mobile platform 1C on the device. The configurator in the main menu "Configuration" select "Mobile Application" - "Using the Android Debug Bridge» - «establish a mobile platform." As a result, the menu of the emulator will be a shortcut to launch 1C: Enterprise.
- Without closing the window of the virtual device in the configurator 1C in the menu "Debug" - "Start Debugging" select "Mobile app: run". There will be a restart and update the mobile application, which will open the home page of our solutions.
Thus, the updated mobile solutions and debugging can be performed directly from the configurator.
Important! 1C debugger does not execute start Genymotion virtual device. Before testing, make sure that you are tuned in the configurator n. 2 (*), and the device is active.
Installing and updating mobile solutions with mobile devices.
- First, mobile solutions vvypolnim publication template. To do this, upload the configuration to a file and determine the path to the file in the web server settings: the main menu "Configuration" - "Mobile Application" - "Post". In the Publish Settings dialog, define the following settings and click "Publish."
We turn off the configurator window. - Proceed to step deployment of mobile applications in the emulator on the basis of a published template. Open the zip-file to the mobile platform in the «Android» folder find the apk file for the x86 platform, and simply drag it to the virtual device window.
- After installation is complete, run yarylk 1C: Enterprise. This opens an empty list of applications. Click on "Add Application".
To connect to the web server PC with a virtual mobile device must use a predetermined external ip-address 10.0.3.2 (hostname localhost and the standard ip-address 127.0.01 will not work). Therefore, in the field of online publication addresses write http://10.0.3.2/auditMA/1cema.xml and click "Upload."
Done! Testing! Since we have established the settings mark "Update mobile app when you update the configuration database", then to activate the update on your mobile device in the list is enough to click on the application name and hold until "Refresh" command.
Besides the fact that Genymotion running faster than their peers, it can conveniently test the functionality associated with the GPS and camera work.
ps A detailed user-guide here https://www.genymotion.com/#!/developers/user-guide