I have a small problem. Thanks to another partner here is how to prepare inserts prepared in the databases, but with that same model I do not know how to recover a prepared query and recover it in Android.
Problem 1 the query: Generally when implementing in the Response.Listener class it allowed me to recover a JSONObject and not here.
//Cargamos los anuncios
public void iniciarSesionAnuncios(){
String url="https://gatos.com/anuncios.php?";
stringRequest = new StringRequest(Request.Method.POST, url, new Response.Listener<String>() {
@Override
public void onResponse(String response) {
}
}, new Response.ErrorListener() {
@Override
public void onErrorResponse(VolleyError error) {
}
}){
@Override
protected Map<String, String> getParams() throws AuthFailureError {
Map<String,String> parametro = new HashMap<>();
String gatoID="12";
parametro.put("gatoID",gatoID);
return parametro;
}
};
}
Problem 2: How do I create a php json object that can be recovered with a ready query?