I upload the sdk version from 27 to 28 and the app is not working properly.
I debugged the app and the problem is Android Studio does not execute this and jumps to the return.
What I do here is connect to an http address and retrieve it's data to a list.
JsonArrayRequest jsonArrayRequest = new JsonArrayRequest(ConfigRed.INF_USERS_URL,
response -> {
//Calling method parseData to parse the json response
parseData(response);
},
error -> {
// Toast.makeText(ActividadPrincipal.this, "No se puede descargar usuarios, Obteniendo usuarios locales", Toast.LENGTH_LONG).show();
DatabaseHelper db;
db = new DatabaseHelper(getApplicationContext());
listUsuarios = db.getMuestreadoresConMuestrasCargadas();
if (listUsuarios.size() == 0) {
Toast.makeText(ActividadPrincipal.this, "No hay registros previos de usuarios. Conectate al laboratorio", Toast.LENGTH_LONG).show();
no_internet.setVisibility(View.VISIBLE);
} else {
adapter.setUsuarios(listUsuarios);
adapter.notifyDataSetChanged();
}
db.closeDB();
});
//Returning the request
return jsonArrayRequest;
I tried this solution but i still retrieving an empty list
Volley Not making request on latest version of Android
I think is because I'm trying to access an http site despite https but I don't know what to do because with the sdk 27 the app runs with no problems but I need using sdk because of google play politics.
Can you help me, please?