matrix-android-sdk icon indicating copy to clipboard operation
matrix-android-sdk copied to clipboard

Unrecognized certificate with unknown fingerprint

Open amiraelsayed opened this issue 6 years ago • 1 comments

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

amiraelsayed avatar Sep 06 '19 19:09 amiraelsayed

Hello, how could you decided it?

TonyLead avatar Oct 18 '19 13:10 TonyLead