Basics

Once you've integrated MimiSDK, there are a few basics to go over before you can fully utilize the features and capabilities.

Client Authentication

We use a client credentials to authenticate you as a partner product with Mimi. These credentials are mandatory, and the SDK will not function without providing them.

So before continuing, make sure you have the following:

  • Client Identifier
  • Client Secret

You can then start using MimiSDK. We recommend starting in your CustomApplication class.

class MyApp: Application() {
    override fun onCreate() {
        super.onCreate()
        
        MimiCore.start(this,
            "MY_CLIENT_ID",
            "MY_CLIENT_SECRET")
    }
}

Extra permissions

Make sure your App's manifest includes the internet permissions, otherwise you won't be able to initialize our services. As of v3.6.0, we also require access to the device's microphone as some of our test paradigms require monitoring the environment noise level:

<uses-permission android:name="android.permission.INTERNET" />

Also we use internally for our network requests OkHttp. This library requires that you enable Java 8 in your builds to function properly. If you have not done so yet, then you will just need to add this snippet to your build.gradle:

compileOptions {
    sourceCompatibility JavaVersion.VERSION_1_8
    targetCompatibility JavaVersion.VERSION_1_8
}

Mimi Events

MimiEvents interface contains a number of functions that any client app using MimiSDK must conform and respond to.

Required Update

In exceptional circumstances, we might need to deprecate and mark older versions of the SDK as unsupported. These decisions will be well communicated far in advance of the notification by our team. However, if a user of your app is using an unsupported version of the MimiSDK or your app, you should respond appropriately to ensure that they have a pleasant upgrade experience.

If you receive a call to the mimiRequiresUpdate() function, you should expect that all functionality of the MimiSDK is now unavailable. We recommend that you display an AlertDialog to your users informing them that they need to update the app to the latest available version which has a newer version of MimiSDK integrated.

override fun mimiRequiresUpdate(errorMsg: String?) {
        lifecycleScope.launch(Dispatchers.Main) {
            AlertDialog.Builder(this@MyActivity, R.style.MyStyle).apply {
                setTitle(R.string.sdk_needs_update_title)
                setMessage(R.string.sdk_needs_update_msg)
                setPositiveButton(R.string.generic_ok, null)
            }.show()
        }
    }

MimiSDK is now set up and ready to go.

Next Steps

With everything set up, you can now move for example onto crafting your Mimi Profile.

© 2023 Mimi Hearing Technologies GmbH