{"id":2161,"date":"2022-08-30T15:22:33","date_gmt":"2022-08-30T15:22:33","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/01\/04\/cannot-implement-rest-webservice-in-android-app-collection-of-common-programming-errors\/"},"modified":"2022-08-30T15:22:33","modified_gmt":"2022-08-30T15:22:33","slug":"cannot-implement-rest-webservice-in-android-app-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2022\/08\/30\/cannot-implement-rest-webservice-in-android-app-collection-of-common-programming-errors\/","title":{"rendered":"canno&#39;t implement rest webservice in android app-Collection of common programming errors"},"content":{"rendered":"<ul>\n<li>\n<p>This could be due to a lot of errors.<\/p>\n<p>Are you sure it does not crash because of your two EditTexts not being found? etdit.setText would cause NullPointerExceptions.<\/p>\n<\/li>\n<li>\n<p>Did u try to check the response Its something like this:<\/p>\n<p>[{&#8220;id&#8221;:&#8221;755&#8243;,&#8221;level&#8221;:&#8221;1&#8243;,&#8221;time_in_secs&#8221;:&#8221;3&#8243;,&#8221;par&#8221;:&#8221;0&#8243;,&#8221;initials&#8221;:&#8221;KiB&#8221;,&#8221;quote&#8221;:&#8221;Got&#8217;cha!&#8221;,&#8221;time_stamp&#8221;:&#8221;2012-04-09 22:50:52&#8243;},{&#8220;id&#8221;:&#8221;977&#8243;,&#8221;level&#8221;:&#8221;1&#8243;,&#8221;time_in_secs&#8221;:&#8221;3&#8243;,&#8221;par&#8221;:&#8221;0&#8243;,&#8221;initials&#8221;:&#8221;WJF&#8221;,&#8221;quote&#8221;:&#8221;dats right numero uno&#8221;,&#8221;time_stamp&#8221;:&#8221;2013-03-11 02:29:36&#8243;},{&#8220;id&#8221;:&#8221;874&#8243;,&#8221;level&#8221;:&#8221;1&#8243;,&#8221;time_in_secs&#8221;:&#8221;3&#8243;,&#8221;par&#8221;:&#8221;0&#8243;,&#8221;initials&#8221;:&#8221;WJF&#8221;,&#8221;quote&#8221;:&#8221;Look, Ma. No hands!&#8221;,&#8221;time_stamp&#8221;:&#8221;2012-05-25 15:44:10&#8243;},{&#8220;id&#8221;:&#8221;59&#8243;,&#8221;level&#8221;:&#8221;1&#8243;,&#8221;time_in_secs&#8221;:&#8221;4&#8243;,&#8221;par&#8221;:&#8221;0&#8243;,&#8221;initials&#8221;:&#8221;TMF&#8221;,&#8221;quote&#8221;:&#8221;Hey hey ole &#8216; hickery&#8221;,&#8221;time_stamp&#8221;:&#8221;2012-03-03 04:36:15&#8243;},{&#8220;id&#8221;:&#8221;61&#8243;,&#8221;level&#8221;:&#8221;1&#8243;,&#8221;time_in_secs&#8221;:&#8221;4&#8243;,&#8221;par&#8221;:&#8221;0&#8243;,&#8221;initials&#8221;:&#8221;WJF&#8221;,&#8221;quote&#8221;:&#8221;I&#8217;m on a boat!&#8221;,&#8221;time_stamp&#8221;:&#8221;2012-03-03 04:38:54&#8243;}]<\/p>\n<p>As you can see its not <strong>ResponseString its a ResponseArray<\/strong>. Modify it accordingly.<\/p>\n<p>Also check whether it type is POST or GET<\/p>\n<\/li>\n<\/ul>\n<p id=\"rop\"><small>Originally posted 2014-01-04 02:49:06. <\/small><\/p>","protected":false},"excerpt":{"rendered":"<p>This could be due to a lot of errors. Are you sure it does not crash because of your two EditTexts not being found? etdit.setText would cause NullPointerExceptions. Did u try to check the response Its something like this: [{&#8220;id&#8221;:&#8221;755&#8243;,&#8221;level&#8221;:&#8221;1&#8243;,&#8221;time_in_secs&#8221;:&#8221;3&#8243;,&#8221;par&#8221;:&#8221;0&#8243;,&#8221;initials&#8221;:&#8221;KiB&#8221;,&#8221;quote&#8221;:&#8221;Got&#8217;cha!&#8221;,&#8221;time_stamp&#8221;:&#8221;2012-04-09 22:50:52&#8243;},{&#8220;id&#8221;:&#8221;977&#8243;,&#8221;level&#8221;:&#8221;1&#8243;,&#8221;time_in_secs&#8221;:&#8221;3&#8243;,&#8221;par&#8221;:&#8221;0&#8243;,&#8221;initials&#8221;:&#8221;WJF&#8221;,&#8221;quote&#8221;:&#8221;dats right numero uno&#8221;,&#8221;time_stamp&#8221;:&#8221;2013-03-11 02:29:36&#8243;},{&#8220;id&#8221;:&#8221;874&#8243;,&#8221;level&#8221;:&#8221;1&#8243;,&#8221;time_in_secs&#8221;:&#8221;3&#8243;,&#8221;par&#8221;:&#8221;0&#8243;,&#8221;initials&#8221;:&#8221;WJF&#8221;,&#8221;quote&#8221;:&#8221;Look, Ma. No hands!&#8221;,&#8221;time_stamp&#8221;:&#8221;2012-05-25 15:44:10&#8243;},{&#8220;id&#8221;:&#8221;59&#8243;,&#8221;level&#8221;:&#8221;1&#8243;,&#8221;time_in_secs&#8221;:&#8221;4&#8243;,&#8221;par&#8221;:&#8221;0&#8243;,&#8221;initials&#8221;:&#8221;TMF&#8221;,&#8221;quote&#8221;:&#8221;Hey hey ole &#8216; hickery&#8221;,&#8221;time_stamp&#8221;:&#8221;2012-03-03 04:36:15&#8243;},{&#8220;id&#8221;:&#8221;61&#8243;,&#8221;level&#8221;:&#8221;1&#8243;,&#8221;time_in_secs&#8221;:&#8221;4&#8243;,&#8221;par&#8221;:&#8221;0&#8243;,&#8221;initials&#8221;:&#8221;WJF&#8221;,&#8221;quote&#8221;:&#8221;I&#8217;m on [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-2161","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/2161","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=2161"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/2161\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=2161"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=2161"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=2161"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}