Update MainActivity.java

changed method to HttpsURLConnection. untested