标签云

微信群

扫码加入我们

WeChat QR Code

I've started getting the following Volley error right after adding Push functionality through Parse.com:com.android.volley.NoConnectionError: javax.net.ssl.SSLPeerUnverifiedException: Cannot verify hostname: xxxxx.yyxxxxx.yy is the host that I'm communicating with using HTTPS. The way the connection is set up is quite usual. E.g. this is a caller function:public static void login(final String token, final Activity activity) {String requestUrl = AppConstant.LOGIN;final HashMap<String, String> params = new HashMap<String, String>();if (token != null && !token.isEmpty()) {params.put("token", token);}params.put("useragent", AppConstant.USER_AGENT);params.put("version", getVersionName(activity));JsonFormRequest myRequest = new JsonFormRequest(Request.Method.POST,requestUrl,params,new Response.Listener<JSONObject>() {@Overridepublic void onResponse(JSONObject jsonObject) {...}},new Response.ErrorListener() {@Overridepublic void onErrorResponse(VolleyError volleyError) {...}});MfApplication.getInstance().addToRequestQueue(myRequest, "tag_login_phone");}It adds request to a queue:public <T> void addToRequestQueue(Request<T> req, String tag) {getRequestQueue().add(req);}The queue is created once in the following way:mRequestQueue = Volley.newRequestQueue(getApplicationContext());If I remove the following Parse initialization code from my Application class the error is gone:Parse.initialize(this);ParseInstallation.getCurrentInstallation().saveInBackground();ParsePush.subscribeInBackground("general");What's the reason of the issue and what can be done?