Overview

Product Overview

The Bluefletch Messaging package allows for communicating with the device by displaying notification messages within the drawer or passing messages to device applications. This communication utilizes the MQTT protocol.

The Messaging service will handle connecting to one or many MQTT Broker services. By default, the launcher is configured to connect to the BlueFletch cloud MQTT Service.

Features

During Launcher boot process, Launcher will communicate with the Messaging application to start. Then, it will register the MQTT Brokers, per configuration values.

If enableNotificationsAlwaysOn is true, the MQTT broker will be connected.

Once the user logs into the device, additional connections can be made where enableNotificationsAlwaysOn is false.

By default, the Messaging service will register for the following topics:

  • Device Serial Number

  • User Role

  • Location

  • Groups

Additonal Information on the MQTT Protocol can be found at https://github.com/mqtt/mqtt.github.io/wiki.

Application Details

Package: com.bluefletch.ems.messaging

Configurations

Notifications

Field Description
notifications Array The collection of notification broker objects

Broker Object

Represents the MQTT Broker and related behaviors.

Field Description
brokerId string Unique id that represents the broker settings
url string Represents the URL connection string to the MQTT broker. Should contain protocol, hostname (and port number, if applicable).
name string Name to be displayed when showing connection status
enableOrganizationGroup boolean Indicates to use Organization Id part of Topic
useEnhancedMessaging boolean true/ false. If True, when a message is received, the message will be broadcast out, so that other applications can process.
muteNotificationsOnCall boolean true / false (defaults true). If Sound is in use (by phone call), when a message is received, no notification sound will be played.
notificationAcquireWakelocks boolean true/false (defaults true). If true, once a connection is made to the notification service, a CPU Wake lock will be acquired, in an attempt to allow for notifications when the device is asleep.
receiveOfflineMessages boolean true / false (default true). If the device goes offline and reconnects, the device will resubscribe for messages.
mqttUserName string user id to be used for MQTT Broker Service login
mqttPassword string encrypted password to be used for MQTT Broker Service login
enableNotificationsAlwaysOn boolean true or false. If true, will register the device Serial Number with MQTT, and keep connection to MQTT server. Otherwise connections are only done AFTER the user is logged in.
enableHeadsUpNotifications boolean true or false. if Kitkat or above and true, enable heads up display of notification received

Example

"notifications" : [
    {
      "brokerId" : "deviceManager",
      "url": "tcp://ems-notifications-prd.bluefletch.com:1883",
      "name" : "Device",
      "enableOrganizationGroup" : true,
      "useEnhancedMessaging" : true,
      "muteNotificationsOnCall" : true,
      "notificationAcquireWakelocks" : true,
      "receiveOfflineMessages" : true,
      "mqttUserName" : "admin",
      "mqttPassword" :  "V4E0CTsCt2wt8I7kAdcM9w==",
      "enableNotificationsAlwaysOn" : true,
      "enableHeadsUpNotifications" : true
    },{
      "brokerId" : "StoreTest",
      "url": "tcp://ems-notifications-prd.bluefletch.com:1883",
      "name" : "Store",
      "enableOrganizationGroup" : true,
      "useEnhancedMessaging" : true,
      "muteNotificationsOnCall" : true,
      "notificationAcquireWakelocks" : true,
      "receiveOfflineMessages" : true,
      "mqttUserName" : "admin",
      "mqttPassword" :  "V4E0CTsCt2wt8I7kAdcM9w==",
      "enableNotificationsAlwaysOn" : false,
      "enableHeadsUpNotifications" : true
    }
  ],