Message Access Profile (MAP)

MAP supports the exchange of messages between paired devices.

The MAP profile allows you to read the SMS, MMS, and email content on a connected mobile device from the head unit. For a mobile device (e.g., a smartphone), two accounts are typically available:

Each of these accounts will be entered into the accounts table of the messages database. Note that you'll need to reference the account_id when making any requests.

Connecting

To connect via MAP, simply send the connect_service command with the MAC address as the data parameter and the profile number (0x1134) as data2 to the /pps/services/bluetooth/control object. For example:

echo "command::connect_service\n
      data::BA:C3:32:AD:55:CC\n
      data2::0x1134" >>
      /pps/services/bluetooth/control

In response to commands sent to the control object, the Bluetooth Manager publishes appropriate events (e.g., BTMGR_EVENT_CONNECT_ALL_SUCCESS) in the /pps/services/bluetooth/status object.

Using MAP

The MAP profile allows you to browse an account's folder. You can view the messages listed and fetch the one you want.

Note: Our MAP implementation currently has these limitations:
  • You can't send messages
  • You can sync only the default mail folders, not any nested folders
  • You can sync only 100 messages per folder per account

You can also mark messages as read or unread or you can delete them.

To perform any of these actions, you must write the appropriate command to the /pps/services/bluetooth/messages/control object.

Monitoring messaging activity

Besides browsing an account's folder, you can read the /pps/services/bluetooth/messages/notification object to know when a new message is received, when a message is deleted, when a message is moved to a different folder, and other details.

Reading MAP status

You can read the /pps/services/bluetooth/messages/status object to learn the paired device's connection state and the profile's command-processing status (i.e., whether a command is currently being processed and the outcome of the last MAP command).

Automated initiator

An automated initiator program (bluetooth-map-initiator) will sync the MAP profile before its state will transition to connected. For each email account, the initiator will sync the first 100 messages from these folders:

Disconnecting

To disconnect, simply send the disconnect_service command using the same parameters you used to connect. For example:

echo "command::disconnect_service\n
      data::BA:C3:32:AD:55:CC\n
      data2::0x1134" >>
      /pps/services/bluetooth/control