I need to get a content from website through https connection. I have used 
the below code to connect the website with desktop application but its 
getting failed on Android 6. I have searched for many days however found no 
result(I tried to add intermediate CA and root CA but the same result). 
Please anyone help me out.

String url = "https://www.coles.com.au";try{
            URL urlObj = new URL(url);
            HttpsURLConnection urlConnection =
                    (HttpsURLConnection)urlObj.openConnection();
            InputStream in = urlConnection.getInputStream();

            BufferedReader reader = new BufferedReader(new 
InputStreamReader(in));

            while(null != (content = reader.readLine())){
                System.out.println(strStoreList);
            }
        }
        catch (IOException e){
            String exception = e.getMessage();
            System.out.println(exception);
        }

Above code ends up with SSL handshake exception - handshake failed thrown 
out.

-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/a35ff4c4-a958-4075-b369-b386d1de8b30%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to