Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Object are destroy by garbage collector. Your object still exists when you call data for the second time. Reset your parser with null for example before you call data and test the result. Post your some code for more answers</p> <p>here some of code with Json wich works fine</p> <pre><code> protected String doInBackground(String... args) { //affectation des valeurs pour passage à PHP String email = getEmail(); // Building Parameters List&lt;NameValuePair&gt; params = new ArrayList&lt;NameValuePair&gt;(); params.add(new BasicNameValuePair("email", email)); // getting JSON Object String url = SingletonParametres.getUrlConnexion() + "get_selectuser.php"; JSONObject json = null; try { json = jsonParser.makeHttpRequest(url, "GET", params); } catch (HttpException e) { e.printStackTrace(); } // check for success tag try { String Variablepourvoir = json.getString(TAG_SUCCESS); success = json.getInt(TAG_SUCCESS); switch (success) { case 1: { /* user retrouvé avec succes */ // successfully select user setCodeRetour(1); setMsgRetour("user existe MyApplication ok"); // sauvegarde des données User dans la classApplication // successfully received product details JSONArray JsonUserArray = json.getJSONArray("user"); // JSON Array // get first user object from JSON Array JSONObject JsonUserObject = JsonUserArray.getJSONObject(0); // user with this email found //save data in MyApplication MyApplication.setIdUser(JsonUserObject.getInt("iduser")); MyApplication.setEmail(JsonUserObject.getString("email")); MyApplication.setPseudo(JsonUserObject.getString("pseudo")); if ( JsonUserObject.getInt("autorisation_upload") ==1 ) { MyApplication.setAutorisationUpload(true); } else { MyApplication.setAutorisationUpload(false); } break; } case 0: { /* oops ! ... un probleme est survenu */ setCodeRetour(ECHEC); setMsgRetour("user non trouvé MyApplication echec"); break; } } } catch (JSONException e) { e.printStackTrace(); } return null; } </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload