Android lower version devices (4.*) gives SSL error. Works perfectly on high versions of Android
I use a class that processes JSON requests, But in Android 4.4, no information about Json is loaded
public static ApiInterface createAPI() {
OkHttpClient.Builder builder = new OkHttpClient.Builder();
builder.connectTimeout(30, TimeUnit.SECONDS);
builder.writeTimeout(30, TimeUnit.SECONDS);
builder.readTimeout(30, TimeUnit.SECONDS);
builder.cache(null);
OkHttpClient okHttpClient = builder.build();
Retrofit retrofit = new Retrofit.Builder()
.baseUrl(Constant.'https://example.com/alljson')
.addCallAdapterFactory(RxJava2CallAdapterFactory.create())
.addConverterFactory(GsonConverterFactory.create())
.client(okHttpClient)
.build();
return retrofit.create(ApiInterface.class);
}
}
Please simply explain what I should do to make Jason load from HTTPS Addresses on all devices Thanks all