Google has advised that I have an unsafe implementation of the interface X509TrustManager in my Android application and need to change my code as follows:
Add the upgraded version of OKttps worked for me crashing in Android 10
implementation 'com.squareup.okhttp3:okhttp:4.8.0'