Skip to content

Connected Headphone Identification

Warning

These APIs have been deprecated since MSDK 10.2.0. Please refer to Supporting PTT Hearing Tests for the latest APIs.

This guide explains how the connected headphone identification information can be provided to the SDK to enable certain hearing test paradigms e.g. PTT.

This feature can be skipped if the partner app is not aware of the connected headphone model; in that case the Test Flow will continue to work as before.

Introduction

In Android MimiSDK 8.0.0, we introduced the PTT test type.

Accurate headphone selection is highly desirable for PTT, as accounting for the headphone's characteristics through appropriate correction factors applied to the hearing assessment ultimately leads to a more suitable sound personalization experience.

For this reason, a headphone identification mechanism has been implemented which enables the partner app to provide the model identifier of the connected headphone.

Prerequisites

  • This feature is mostly relevant for partner apps that are aware of the headphone model they are currently connected with.
  • The partner and Mimi need to be aligned on the headphone model name, since Mimi creates configuration on Mimi backend with that model name.

Providing the headphone identifier

Note: The headphone identifier needs to be available before the test flow is launched.

The headphone identifier can be provided to the SDK as follows:

Implementing the MimiConnectedHeadphoneProvider

The MimiConnectedHeadphoneProvider returns the model identifier of the currently connected headphone.

The value returned by the getMimiHeadphoneIdentifier() method is matched against the headphone model names configured on the Mimi backend to determine the suitability of the headphone for each of the hearing test types.

An example of a class conforming to the interface is shown below:

class MyAppsHeadphoneProvider : MimiConnectedHeadphoneProvider {
    override fun getMimiHeadphoneIdentifier(): MimiHeadphoneIdentifier? {
        // if connected to a headphone, return the headphone identifier, else null
        return MimiHeadphoneIdentifier(model = "example-headphone-identifier")
    }
}

Updating TestsController with the MimiConnectedHeadphoneProvider instance

The conforming implementation from the example above can now be set on the TestsController as follows:

MimiCore.testsController.connectedHeadphoneProvider = MyAppsHeadphoneProvider()

Once this is done, the MSDK TestFlow will be able to use the headphone identifier when retrieving the supported test types.