Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to Download Image with AndroidNetworking.download #83

Closed
singhdd93 opened this issue Feb 5, 2017 · 2 comments
Closed

Unable to Download Image with AndroidNetworking.download #83

singhdd93 opened this issue Feb 5, 2017 · 2 comments

Comments

@singhdd93
Copy link

I am trying to download and save image to data.
Here is my code

AndroidNetworking.download("https://vigaas.com/wp-content/themes/vigaas/images/logo.png", Environment.getDataDirectory().getAbsolutePath(),imgName)
                .setTag(imgName)
                .setPriority(Priority.HIGH)
                .build()
                .setDownloadProgressListener(new DownloadProgressListener() {
                    @Override
                    public void onProgress(long bytesDownloaded, long totalBytes) {
                        Log.d("LOGO_PROGRESS", "Downloaded: "+bytesDownloaded+"/"+totalBytes);
                    }
                })
                .startDownload(new DownloadListener() {
                    @Override
                    public void onDownloadComplete() {
                        Helper.hideProgressDialog();
                        Intent i = new Intent(LoginActivity.this, MainActivity.class);
                        startActivity(i);
                        finish();
                    }

                    @Override
                    public void onError(ANError anError) {
                        Log.e("LOGO_ERROR",anError.getErrorCode()+"    "+ anError.getErrorDetail());
                        Helper.hideProgressDialog();
                    }
                });

I get connectionError in Log
E/LOGO_ERROR: 0 connectionError

@amitshekhariitbhu
Copy link
Owner

Refer this link
square/okhttp#1628

Thanks
Amit Shekhar

@amitshekhariitbhu
Copy link
Owner

The better suggestion that I read on the referred link is that: get your HTTPS server to use a more modern cipher suite.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants