matrix-android-sdk
matrix-android-sdk copied to clipboard
Unrecognized certificate with unknown fingerprint
Hello
I have build an app using matrix sdk android, it is working fine on Android 8 and when I try to test it on Android 6 it gives me this error
Unrecognized certificate with unknown fingerprint while I am getting the session
here is my code to create session
private fun getSession(context: Context): MXSession {
Log.i("AMIRA3333" , "getSession")
var preference = EnsofiaPreference(context)
var credentials = Credentials()
credentials.userId = preference.readString(MATRIX_USER_ID)
credentials.accessToken = preference.readString(MATRIX_ACCESS_TOKEN)
credentials.deviceId = preference.readString(MATRIX_DEVICE_ID)
credentials.homeServer = preference.readString(MATRIX_HOME_SERVER)
var hsConfig = HomeServerConnectionConfig.Builder()
.withHomeServerUri(Uri.parse(ENSOFIA_MATRIX_HOME_SERVER))
.withIdentityServerUri(Uri.parse(ENSOFIA_MATRIX_IDENTIFY_SERVER))
.withCredentials(credentials)
.build()
var store = MXMemoryStore(credentials, context)
return MXSession.Builder(hsConfig, MXDataHandler(store, credentials), context)
.withPushServerUrl("")
.withFileEncryption(false)
.withLegacyCryptoStore(false)
.build()
}
please anyone advice I have been in this for so long
Hello, how could you decided it?