code: static SSLContext createSSLContext() {
      try {
        SSLContext sc = SSLContext.getInstance("SSL");
        TrustManager[] tm = {
            new X509TrustManager() {
              @SuppressLint("TrustAllX509TrustManager") @Override
              public void checkClientTrusted(X509Certificate[] paramArrayOfX509Certificate,
                  String paramString) {
              }
  
              @SuppressLint("TrustAllX509TrustManager") @Override
              public void checkServerTrusted(X509Certificate[] paramArrayOfX509Certificate,
                  String paramString) {
              }
  
              @Override public X509Certificate[] getAcceptedIssuers() {
                return new X509Certificate[] {};
              }
            }
        };
        sc.init(null, tm, new SecureRandom());
        return sc;
      } catch (NoSuchAlgorithmException | KeyManagementException e) {
        e.printStackTrace();
      }
  
      return null;
    }
docs: Create {@link SSLContext} for https.
  
  @return {@link SSLContext}