{"id":14,"date":"2010-12-02T06:04:14","date_gmt":"2010-12-02T06:04:14","guid":{"rendered":"http:\/\/android.follis.net\/?p=14"},"modified":"2010-12-02T06:11:07","modified_gmt":"2010-12-02T06:11:07","slug":"14","status":"publish","type":"post","link":"http:\/\/android.follis.net\/?p=14","title":{"rendered":"IntentService and Toasts"},"content":{"rendered":"<p>One of the biggest pains in developing the latest FW and FWL releases was getting toasts to display properly. I could get them on the screen fine, but when started from my notification service they would <em>never go away<\/em>. In previous releases I punted and did some dirty hacks to get around the problem, but after much trolling of newsgroups and piecing together random bits of info I finally figured it out. Do <em>NOT<\/em> send a toast from an intent service. An intent service will launch it&#8217;s own thread, do it&#8217;s work and <em>it and its thread go away. <\/em>Apparently, if android can&#8217;t find the component (or thread, I haven&#8217;t figured that one out) that displayed your toast, it doesn&#8217;t know how to hide it. Hence it stays on the screen until you reboot.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>One of the biggest pains in developing the latest FW and FWL releases was getting toasts to display properly. I could get them on the screen fine, but when started from my notification service they would never go away. In &hellip; <a href=\"http:\/\/android.follis.net\/?p=14\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-14","post","type-post","status-publish","format-standard","hentry","category-android-development"],"_links":{"self":[{"href":"http:\/\/android.follis.net\/index.php?rest_route=\/wp\/v2\/posts\/14","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/android.follis.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/android.follis.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/android.follis.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/android.follis.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=14"}],"version-history":[{"count":0,"href":"http:\/\/android.follis.net\/index.php?rest_route=\/wp\/v2\/posts\/14\/revisions"}],"wp:attachment":[{"href":"http:\/\/android.follis.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=14"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/android.follis.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=14"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/android.follis.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=14"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}