use of de.geeksfactory.opacclient.apis.OkHttpBaseApi in project opacclient by opacapp.
the class CoverDownloadTask method getImage.
protected byte[] getImage() throws IOException {
try {
OpacApi api = ((OpacClient) context.getApplicationContext()).getApi();
if (api instanceof ApacheBaseApi) {
return getImageApacheClient(((ApacheBaseApi) api).http_client);
} else if (api instanceof OkHttpBaseApi) {
return getImageOkHttpClient(((OkHttpBaseApi) api).http_client);
}
} catch (OpacClient.LibraryRemovedException e) {
}
HttpClient httpClient;
httpClient = new AndroidHttpClientFactory().getNewApacheHttpClient(false, true, false, false);
return getImageApacheClient(httpClient);
}
Aggregations