Installing prerequisites

It is possible to use the functionnalities of the e-mission-server without having to use the phone app provided by e-mission. However, there is some prerequisites.

Installing and configuring the Cordova environment

Currently, to use e-mission Cordova plugins, you must use the version 8.1.2 of Cordova. You can install it using npm by typing the following command in your terminal:

$ npm install -g cordova@8.1.2

After a succesful installation, you will need to create a Cordova project. You can now do it in your terminal with the command below:

$ cordova create <folder name> <package> <app name>

When you will be in your new project folder, you will now be able to add platforms (iOS or/and Android) and plugins to your Cordova project. You can add the platforms by either adding the following lines in your config.xml file (between the <widget> tag) or typing the command cordova platforms add.

    <engine name="ios" spec="^4.5.5" />
    <engine name="android" spec="^6.4.0" />


For now, it is mandatory to use the 6.4.0 for Android and 4.5.5 for iOS. You can specify them when using the command line by adding @^<version number> right after the platform.

Installing e-mission Cordova plugins

There are a total of 11 mandatory plugins to use a phone app in par with an e-mission server. The plugins are the following:

You can find most of them on the GitHub of e-mission: and install them by either typing cordova plugin add <url of the plugin> or by adding the following lines in the config.xml:

<plugin name="cordova-plugin-customurlscheme" spec="~4.3.0">
    <variable name="URL_SCHEME" value="emission" />
<plugin name="cordova-plugin-inappbrowser" spec="" />
<plugin name="de.appplant.cordova.plugin.local-notification-ios9-fix" spec="" />
<plugin name="edu.berkeley.eecs.emission.cordova.auth" spec="" />
<plugin name="edu.berkeley.eecs.emission.cordova.comm" spec="" />
<plugin name="edu.berkeley.eecs.emission.cordova.datacollection" spec="">
    <variable name="LOCATION_VERSION" value="11.0.1" />
<plugin name="edu.berkeley.eecs.emission.cordova.serversync" spec="" />
<plugin name="edu.berkeley.eecs.emission.cordova.settings" spec="" />
<plugin name="edu.berkeley.eecs.emission.cordova.transitionnotify" spec="" />
<plugin name="edu.berkeley.eecs.emission.cordova.unifiedlogger" spec="" />
<plugin name="edu.berkeley.eecs.emission.cordova.usercache" spec="" />

Connecting your Cordova application to the server


You can find the supported authentication modes in Configuring authentication and configuration exemples can be found there.

To connect to the server, you will need to set the settings by using the function setSettings(connectionConfig)of the plugin ConnectionSettings where connectionConfig is a JSON object. To achieve that, you can add the following line into the onDeviceReady function:

onDeviceReady: function () {

You can now create a login function and add the following lines to connect your phone app users to the server.

function login() {
    window.cordova.plugins.BEMJWTAuth.signIn().then(function (userEmail) {
        window.cordova.plugins.BEMServerComm.getUserPersonalData("/profile/create", function (success) {

        }, function (errorResult) {
    }, function (error) {


/profile/create will create a user profile only if the email address is not already in the database.