0

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.

Janusz
  • 187,060
  • 113
  • 301
  • 369
  • What happens when you execute same code from desktop or any other client than your device. Did you check if otherwise, the request gets served? – Tushar Tarkas Aug 16 '10 at 11:34

2 Answers2

1

It's probably the typical error with certificate being signed for another domain. See question Https Connection Android

Community
  • 1
  • 1
Adrian Spinei
  • 550
  • 5
  • 15
0

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.

DonSteep
  • 1,075
  • 10
  • 10