Evam Demo Tool

Here are all available commands you can send through the Demo Tool’s Developer zone.

You can access it here: Evam Demo Tool.

Location

This will update the location of the vehicle in Vehicle Services.

{"type": "location", "value": {"latitude": 59.356065,"longitude": 17.968331}}

Route

This will update the location of the vehicle along a route.

{
    "type": "route",
    "value": [
        {"latitude": 59.363155, "longitude": 18.025612, "sleep": 6000},
        {"latitude": 59.363493, "longitude": 18.02568, "sleep": 1000},
        {"latitude": 59.363717, "longitude": 18.025761, "sleep": 1000},
        {"latitude": 59.364143, "longitude": 18.025904, "sleep": 1000},
        {"latitude": 59.364146, "longitude": 18.026173, "sleep": 1500},
        {"latitude": 59.364153, "longitude": 18.026436, "sleep": 1500},
        {"latitude": 59.364211, "longitude": 18.026603, "sleep": 1500},
        {"latitude": 59.364274, "longitude": 18.026719, "sleep": 1500}
    ]
}

The sleep field specifies how long (in ms) should the application wait until moving to the next location.

Com-coder

This will inject an Operation using the same format as the Dispatch from SOS Alarm in Sweden.

This is an example “10200” profile intended for fire and rescue usage:

{
    "type": "comcoder", 
    "raw": "{0x12}10200{0x13}18{0x13}1358263{0x13}1{0x13}{CURDATE} {CURTIME+0}{0x13}{CURDATE} {CURTIME-20}{0x13}1{0x13}Trafikolycka{0x13}Personbil{0x13}Övrigt{0x13}{0x13}Tre bilar inblandade. Två skadade. En person fastklämd enligt ambulans på plats. Avvakta skyddsfordon vid brytpunkt.{0x13}E4 Norrgående{0x13}Stockholm{0x13}Stockholm{0x13}{0x13}La = 59° 22,0949'N    Lo = 018° 1,2303'E{0x13}{0x13}101-0090{0x16}Framme{0x16}Stockholm{0x13}240-1-9230022{0x16}230 RtjIns-1{0x15}240-1-9030011{0x16}Sthm RAPS-01{0x13}{0x13}{0x13}{0x13}La = 59° 21,8576'N    Lo = 018° 1,6015'E{0x13}Parkering avfart Haga Norra{0x13}{0x13}{0x13}{0x13}{0x13}{0x13}{0x13}{0x13}{0x14}"
}

And an example “10036” profile for ambulance usage:

{
    "type": "comcoder", 
    "raw": "{0x12}10036{0x13}3{0x13}34{0x13}1{0x13}{CURDATE} {CURTIME+0}{0x13}Test{0x13}Testkort{0x13}Man ca 60{0x13}1{0x13}Bröstsmärtor{0x13}Smärtor i skuldror, armar eller käkar{0x13}Övrigt{0x13}Hög risk av hjärtinfarkt. Andningsproblem, osammanhängande tal.{0x13}E4 Norrgående{0x13}Stockholm{0x13}Stockholm{0x13}{0x13}{0x13}{0x13}La = 59° 22,0949'N    Lo = 018° 1,2303'E{0x13}{0x13}{CURDATE} {CURTIME+0}{0x13}Eugeniavägen{0x13}164{0x13}Stockholm-Karolinska{0x13}Stockholm{0x13}{CURDATE} {CURTIME+300}{0x13}{0x13}La = 59° 21,0136'N  Lo = 18° 2,0541'E{0x13}{0x13}Test Medicinsk{0x13}Framme infart{0x13}240-1-9230022{0x16}230 SjvIns-1{0x15}240-1-9888565{0x16}Sthm RAPS-01{0x13}{0x13}{CURDATE} {CURTIME+30}{0x13}08-123456{0x13}314-9610{0x16}Framme{0x16}Stockholm{0x13}{0x13}Händelsen inträffade under lunchen{0x13}{0x14}"
}

You can specify placeholder elements in “raw” that will be substituted when injected:

  • {0x...}: Delimiter bytes, specific to the profile - you should not need to modify them from the examples above,

  • {CURDATE}: Inject today’s date,

  • {CURTIME+N} or {CURTIME-N}: Inject the current time, plus or minus N seconds.

Sideloaded certified app settings

Minimum version

Make sure you use Vehicle Services version 5.2.4 or above to use this feature.

You can set the sideloaded certified app settings, they will be passed to the certified app over the Evam SDK through onNewOrUpdatedSettings.

The settings shall be defined in your Evam manifest, see the article below for more information:

Using the Evam SDK

For instance, if you define those your Evam manifest as such:

{
    "applicationId": "com.example.application",
    "applicationName": "Demo application",
    "settings": [
        {
            "id": "debug",
            "name": "Debug mode",
            "description": "Enable debug mode by displaying logs on screen",
            "value": {
                "type": "bool",
                "default": false
            }
        },
        {
            "id": "backendUrl",
            "name": "URL to the backend server",
            "description": "The URL to the backend server to be used",
            "value": {
                "type": "string",
                "default": "https://example.com/"
            }
        }
    ],
    // ...
}

Then you can simulate a settings update with this:

{ 
    "type":"devAppSettings", 
    "value": {
        "id": "com.example.application", 
        "settingsString": {"backendUrl": "https://other-example.com/" }, 
        "settingsLong": { }, 
        "settingsDouble": { }, 
        "settingsBoolean": {"debug": true }, 
        "policies": [] 
    }
}

Your certified app, using onNewOrUpdatedSettings, will have its callback triggered with:

  • When the app starts: {"debug": false, "backendUrl": "https://example.com/"},

  • When your run the command above: {"debug": true, "backendUrl": "https://other-example.com/"}.