<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>phicdy</author_name>
  <author_url>https://blog.hatena.ne.jp/phicdy/</author_url>
  <blog_title>phicdy devlog</blog_title>
  <blog_url>https://phicdy.hatenablog.com/</blog_url>
  <categories>
    <anon>Android</anon>
  </categories>
  <description>Androidアプリ内で重たい処理を行う場合、処理をメインスレッドで行うと処理が終わるまで画面が止まってしまう。 そのため、スレッドを分けて処理を行わせる。 その際に、処理結果を別スレッドから受け取るときの一つの方法としてHandlerとMessageを使う方法がある。 Handler handler = new Handler() { @override public void handleMessage(Message msg) { switch(msg.what) { case 1: // msg.objはObject型なのでキャストする必要がある Log.d(&quot;Handler&quot;, (S…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fphicdy.hatenablog.com%2Fentry%2F2014%2F09%2F02%2F220457&quot; title=&quot;【Android】HanlderとMessageを使ってマルチスレッドの処理結果を受け取る - phicdy devlog&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2014-09-02 22:04:57</published>
  <title>【Android】HanlderとMessageを使ってマルチスレッドの処理結果を受け取る</title>
  <type>rich</type>
  <url>https://phicdy.hatenablog.com/entry/2014/09/02/220457</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
