Commit 90cd21c2ba361d9d266b3351bc2eeefcf9038496

Authored by Dinh Chu
1 parent 9c431985f7
Exists in master

update handle register account

Showing 3 changed files with 17 additions and 6 deletions Side-by-side Diff

app/src/main/java/com/dinhcv/lifelogpedometer/activity/RegisterActivity.java
... ... @@ -252,6 +252,7 @@
252 252 mRegisterInfo.setAddress(provinceInfo.getName());
253 253 mRegisterInfo.setEmail(email);
254 254 mRegisterInfo.setProfileImage(profileImagePath);
  255 + mRegisterInfo.setDescription(comment);
255 256  
256 257 return true;
257 258 }
app/src/main/java/com/dinhcv/lifelogpedometer/model/structure/RegisterInfo.java
... ... @@ -17,6 +17,7 @@
17 17 private String address;
18 18 private String profileImage;
19 19 private String email;
  20 + private String description;
20 21  
21 22  
22 23 public String getUsername() {
... ... @@ -114,6 +115,15 @@
114 115  
115 116 public void setEmail(String email) {
116 117 this.email = email;
  118 + }
  119 +
  120 +
  121 + public String getDescription() {
  122 + return description;
  123 + }
  124 +
  125 + public void setDescription(String description) {
  126 + this.description = description;
117 127 }
118 128 }
app/src/main/java/com/dinhcv/lifelogpedometer/portal/LLAPIManager.java
... ... @@ -374,22 +374,22 @@
374 374 jsonObject.put("password", registerInfo.getPassword());
375 375 jsonObject.put("password_confirmation", registerInfo.getPassword());
376 376 jsonObject.put("full_name", registerInfo.getFullName());
377   - //jsonObject.put("nickname", registerInfo.getNickname());
  377 + jsonObject.put("nickname", registerInfo.getNickname());
378 378 jsonObject.put("birthday", Utils.dateToStringFormatDayMonthYear(registerInfo.getBirthday()));
379 379 jsonObject.put("height", ""+registerInfo.getHeight());
380 380 jsonObject.put("weight", ""+registerInfo.getWeight());
381 381 jsonObject.put("fat_rate", ""+registerInfo.getFatRate());
382 382 jsonObject.put("gender", ""+registerInfo.getGender());
383   - //jsonObject.put("address", registerInfo.getAddress());
384   - //jsonObject.put("desciption", "");
  383 + jsonObject.put("address", ""+registerInfo.getAddress());
  384 + jsonObject.put("desciption", ""+registerInfo.getDescription());
385 385 jsonObject.put("receive_notification", "0");
386   - //jsonObject.put("phone", "+84986940999");
387   - jsonObject.put("share_data", "1");
  386 + jsonObject.put("phone", "0123-849-869");
  387 + jsonObject.put("share_data", "0");
388 388 jsonObject.put("profile_image", ""+registerInfo.getProfileImage());
389 389 //jsonObject.put("delete_flag", "0");
390 390 jsonObject.put("email", registerInfo.getEmail());
391 391 jsonObject.put("physical_activity", "0");
392   - //jsonObject.put("remember", "1");
  392 + jsonObject.put("remember_me", "1");
393 393  
394 394 Debug.warn("Json data: " + jsonObject.toString());
395 395 } catch (JSONException e) {