Bonjour

Comment gérer les problème de connexion sur android j'ai mis ça mais malheureusement ne marche plus
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
 
try{ 
HttpClient httpclient = new DefaultHttpClient(); 
HttpPost httppost = new HttpPost(strURL); 
httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs)); 
HttpResponse response = httpclient.execute(httppost); 
HttpEntity entity = response.getEntity(); 
is = entity.getContent(); 
} 
 
catch(Exception e){ 
Toast.makeText(parent.getContext(),"Problème de connection au serveur",Toast.LENGTH_SHORT).show(); 
}
Merci de me proposer une solution pour mon problème