Advertisement
Guest User

Untitled

a guest
Mar 24th, 2017
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.09 KB | None | 0 0
  1. {
  2.  
  3. "resultCode":"OK",
  4. "configs":[
  5. {
  6. "configID":"1",
  7. "configName":"Data Limit",
  8. "configValue":"5000000"
  9. },
  10. {
  11. "configID":"2",
  12. "configName":"Connectivity Settings Frequency",
  13. "configValue":"55"
  14. },
  15. {
  16. "configID":"3",
  17. "configName":"User Tracking Frequency",
  18. "configValue":"56"
  19. },
  20. {
  21. "configID":"4",
  22. "configName":"Data Monitoring Frequency",
  23. "configValue":"57"
  24. },
  25. {
  26. "configID":"5",
  27. "configName":"User Device Frequency",
  28. "configValue":"58"
  29. },
  30. {
  31. "configID":"6",
  32. "configName":"Telephony Settings Frequency",
  33. "configValue":"59"
  34. },
  35. {
  36. "configID":"7",
  37. "configName":"Restrictions Settings Frequency",
  38. "configValue":"60"
  39. },
  40. {
  41. "configID":"8",
  42. "configName":"DateTime Settings Frequency",
  43. "configValue":"61"
  44. },
  45. {
  46. "configID":"9",
  47. "configName":"Advanced Settings Frequency",
  48. "configValue":"62"
  49. }
  50. ],
  51. "companyInfo":{
  52. "companyID":"1",
  53. "companyName":"Test Company",
  54. "webServiceGuid":"11E0662D-6672-406C-977A-4BE9124B3E35",
  55. "url":"http://devreach2.yourofficeanywhere.co.uk/",
  56. "portNumber":"51000"
  57. },
  58. "user":{
  59. "userID":"8",
  60. "samsungApiKey":"ABC",
  61. "surname":"Womersley"
  62. }
  63.  
  64. }
  65.  
  66. JSONObject mainObject = new JSONObject(result);
  67. Log.e(TAG, "mainObject = " + mainObject);
  68.  
  69. resultCode = mainObject.get("resultCode").toString();
  70. Log.e(TAG, "resultCode = " + resultCode);
  71. cv.put("resultcode", resultCode);
  72.  
  73.  
  74. JSONObject user = mainObject.getJSONObject("user");
  75. Log.e(TAG, "user object = " + user);
  76. String userID = user.getString("userID");
  77. Log.e(TAG, "userID = " + userID);
  78. cv.put("userid", userID);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement