Android: continuación de pruebas con la GUI. Optimización en la gestión de usuarios

parent c9b7c9a6
......@@ -55,11 +55,9 @@ public class RestapiWrapper {
public void ask(String operation, Hashtable<String, String> params, String postOrGet, iRestapiListener listener) {
// call AsynTask to perform network operation on separate thread
String url = this.server + '/' + operation;
Log.d("BORRAR ",url+" T:"+token);
if (token != null) {
if (params == null) {
if (this.token != null) {
if (params == null)
params = new Hashtable<>(1);
}
params.put("token", this.token);
}
new HttpAsyncTask(listener, params).execute(postOrGet, url);
......
......@@ -117,9 +117,9 @@ public class PictogramActivity extends Activity implements iVocabularyListener,
// Init PCB DB
this.vocabulary=PCBcontext.getVocabulary();
// Open websocket connection
PCBcontext.getVocabulary().listen(PCBcontext.getRoom(),this);
vocabulary.listen(PCBcontext.getRoom(),this);
......
......@@ -170,7 +170,7 @@ public class SerialActivity extends Activity implements iRestapiListener, iImgDo
//String _MODEL = android.os.Build.MODEL;
Hashtable<String, String> postDataParams = new Hashtable<String, String>();
postDataParams.put("username", username);
postDataParams.put("email", username);
postDataParams.put("password", password);
/*
postDataParams.put("idFirmware", _ANDROIDID);
......@@ -257,7 +257,6 @@ public class SerialActivity extends Activity implements iRestapiListener, iImgDo
JSONObject user = result.getJSONObject(TAG_USER);
st_id = user.getInt(TAG_ID);
int st_id_int = st_id.intValue();
String st_username = user.getString(TAG_USERNAME);
String st_name = user.getString(TAG_NAME);
String st_surname = user.getString(TAG_SURNAME);
String st_pic = user.getString(TAG_PIC);
......
No preview for this file type
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment