MimiSDK 4 Migration Guide¶
This document outlines the various changes required to migrate to MimiSDK 4 from a previous version of MimiSDK.
MimiSDK 4 introduces several API-breaking changes to be aware of.
What is new¶
Changes¶
The following section describes all changes that are considered breaking API or significant behavioral changes.
ProcessingParameter and MimiTestResults types¶
Due to incompatibilities with the new Android R8 code compiler and shrinking tool we had to rename some ProcessingParameter
types and move MimiTestResult
and MimiTestResultData
interfaces outside of MimiTestResults
class.
- ProcessingParameter.Readable
-> ReadableProcessingParameter
.
- ProcessingParameter.Writable
-> WritableProcessingParameter
.
These changes will require updates to an existing ProcessingHandler
implementation.
Test Insights¶
The former Insights
model class that only supported MT tests is now replaced by MimiTestResults
which may contain both MT and PTT results.
The Insights
model and the related TestsController.insights(String)
API call have been removed.
The latest MimiTestResults
may be retrieved via TestsController.latestTestResults()
instead.
Results of a specific test may be accessed at the MimiTestResults.[mt|ptt].results
list.
TestController.submitTestsResults
with a callback¶
Test submission supports the immediate return of results as an embedded object if provideResults = true
.
If TestController.submitTestsResults
is used with a callback function the provideResults
has to be specified.
To keep the current behavior replace submitTestResults(hearingTest, callback)
with submitTestResults(hearingTest, false, callback)
UserControllerListener¶
UserControllerListener.didChange(mimiUser)
has been replaced with UserControllerListener.didChange(oldUser, currentUser)
to provide additional information about the changes between both users.
To keep the current behavior replace your listeners didChange(mimiUser)
by didChange(oldUser, mimiUser)
and ignore the oldUser
.
Configuration¶
It is no longer possible to change configuration flags after MimiCore.start
has been called. Also the method MimiCore.start(ctx:, environment:, clientId:, clientSecret: )
has been removed.
The mutable flags MimiHearingTestFragment.showHearingTipsButton
, ConfigurationController.showHearingHealthTips
,
ConfigurationController.alwaysShowHearingResults
and ConfigurationController.allowRemoteDeviceAuthorization
flag have been removed.
To configure the these Mimi features now, you will need to pass the equivalent MimiConfiguration
object to the MimiCore.start()
call.