Salesforce

Mobile Development Environment (Magic xpa 3.x)

« Go Back

Information

 
Created ByKnowledge Migration User
Approval Process StatusPublished
Objective
Description

Mobile Development Environment (Magic xpa 3.x)

The Android, iOS and Windows 10 Mobile platforms provide a managed, controlled process for installing native applications on the mobile devices. Each Magic application that you want to deploy on these platforms must be packaged as a separate, self-contained application with its unique name, icon and application properties. The process of building an application involves editing configuration files and running a “build” tool that creates a new, unique application that embeds the Magic RIA client engine. This application can then be deployed on the mobile devices using the supported distribution mechanisms.

Minimum requirements for mobile devices

Information about the minimum requirements is listed in the Compatibility Guide.

Android prerequisites

JDK

The JDK is installed automatically during the Magic xpa installation when you installed the Web Services Framework component.

If you did not install the Web Services Framework component, you can download the JDK and the Android SDK from:

Android SDK Manager

Download the Android SDK from:

During the installation of the Android SDK, the Android SDK Manager will be launched.

Select the Android versions that you want to use for compiling your application. For each version you need to select at least the SDK Platform component.

To create a custom application, you need to install the items listed below **:

  • Tools folder:

  • Android SDK Tools (revision 24.x)

  • Android SDK Platform-tools (revision 23.x)

  • Android SDK Build-tools (revision 23.0.1)

  • Android 6.0 (API 23) folder:

  • SDK Platform

  • Extras folder:

  • Android Support Repository

  • Google Play Services

  • Google Repository

  • Google USB Driver

Continue with the installation by clicking on the Install XXX Packages button.

Note:

Gradle Settings

** If you installed a later version than the ones defined above, you might need to update the version number in the gradle setting file. To do this, open the build.gradle file (located at RIAModules\Android\Source\app). In this file, change the version numbers in the compileSdkVersion and buildToolsVersion parameters to the version that you installed. For example:

android {

compileSdkVersion 23

buildToolsVersion "23.0.3"

The compileSdkVersion parameter is the version number of the SDK platform and the buildToolsVersion parameter is the version number of the Android SDK Build-tools.

Note: If a proxy needs to be used, define it in the gradle.properties file as defined at: https://docs.gradle.org/current/userguide/build_environment.html#sec:accessing_the_web_via_a_proxy.

iOS prerequisites

A Mac with Xcode.

Windows 10 Mobile prerequisites

  • Windows 10 operating system.

  • Visual Studio 2015 (you can install any edition, including the community edition) with the Universal Windows App Development Tools. Refer to the Download or Update Visual Studio section at: https://msdn.microsoft.com/en-us/windows/uwp/get-started/get-set-up.

  • SQLite for Universal Windows Platform. To install it, run the sqlite-uwp-3130000.vsix file from the %EngineDir%\RIAModules\Windows10Mobile folder.

Magic xpa server configuration

The Magic xpa server must run in Background deployment mode in order to handle requests from the mobile RIA client.

Connecting your mobile device to the server

To run your application on a mobile device, the device must have access to your server.

You can do this in several ways:

  1. Use the WiFi capabilities of the device to connect your device to the same network as your local machine.

  2. If your device supports USB tethering you can connect the device to your machine, enable the USB tethering and then use the IP address that was given to your machine as the server address.

  3. If you develop on a machine that has WiFi capabilities, you can use that WiFi to turn your machine into a wireless hotspot and connect your device to that hotspot.

For further information, refer to the Testing an Application on a Mobile Device Technical Note.

Mobile device simulators

You can use the platforms’ device simulators to test your application. However, the simulators’ features are limited compared to real devices and the simulators might behave differently. Therefore, it is recommended to develop and, especially, test your application using a real device.

Android

The Android emulator can run on any Windows desktop.

To run the Android emulator, you need to download and install the Java SE Development Kit (JDK) 6 and the Android SDK.

To see a video demonstration about installing the Android emulator, click here.

After installing the SDK platforms, click the Tools menu and start the Manage AVDs entry in order to configure the Android emulator and virtual environment.

Android Virtual Device Manager

In the Android Virtual Device Manager screen’s Android Virtual Devices tab, add a new device and specify:

  • Name – The name for the virtual device.

  • Device – The device itself.

  • Target – Choose the Android version, for example: Android 4.0. You will see different Android versions depending on the SDK versions installed in the SDK Manager.

  • SD Card Size – Define a size for the SD card, for example: 20.

You can also define these settings in the Device Definitions tab and then click the Create AVD button.

After the device creation is complete, the device will be added to the list. Select the device and click Start to run the emulator.

Note:

iOS

The iOS simulator runs only on Mac OS computers and requires the latest version of the iOS development environment (Xcode).

To run the simulator, open the project in Xcode, set the Scheme combo box (on the top left side) to the required device (for example: iPad 5.0 Simulator) and click the Run button.

Windows 10 Mobile

To run the simulator, open the project in Visual Studio, set the Platform combo box (on the top menu bar) to the required device and click the Run button.

Reference
Attachment 
Attachment