Reputation: 11
my code is this to post data to server
MakeValue = (String) s2.getSelectedItem();
MakeValue = MakeValue.replace(" ", "%20");
DefaultHttpClient hc=new DefaultHttpClient();
ResponseHandler res=new BasicResponseHandler();
HttpPost postMethod=new HttpPost(AppUrl.AppUrl+"dealer_service.php?action=saveCreateNewInventory");
List nameValuePairs = new ArrayList(2);
nameValuePairs.add(new BasicNameValuePair("POSTDATA", Login.GetUserID +"~"+ VinNumber.getText()
. . .
postMethod.setEntity(new UrlEncodedFormEntity(nameValuePairs));
response=hc.execute(postMethod,res);
but after executing this i have an exception of ssl not trusted so please help me to solve my probs please help i spent too many days in this. how can i remove this exception.
Upvotes: 0
Views: 1519
Reputation: 550
It's probably the typical error with certificate being signed for another domain. See question Https Connection Android
Upvotes: 1
Reputation: 1075
One cause can be the clock on your device. If the time is years off, SSL certificates will be invalid. So if that's the case, fix is as easy as setting your device to the correct date.
Upvotes: 0