<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>cap&#039;n webb &#187; Android</title>
	<atom:link href="http://blog.dataich.com/tag/android/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.dataich.com</link>
	<description>almost all things about it</description>
	<lastBuildDate>Thu, 12 Jan 2012 03:38:00 +0000</lastBuildDate>
	<language>ja</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>SuppApp &#8211; モバイルアプリユーザサポートサイトを手軽に作れる</title>
		<link>http://blog.dataich.com/2010/06/01/supp-app-mobile-app-user-support-site-was-released/</link>
		<comments>http://blog.dataich.com/2010/06/01/supp-app-mobile-app-user-support-site-was-released/#comments</comments>
		<pubDate>Tue, 01 Jun 2010 13:39:32 +0000</pubDate>
		<dc:creator>dataich</dc:creator>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[Android]]></category>
		<category><![CDATA[iPad]]></category>
		<category><![CDATA[iPhone]]></category>

		<guid isPermaLink="false">http://blog.dataich.com/?p=900</guid>
		<description><![CDATA[タイトルの通りなのですが、会社でSuppAppというサービスを立ち上げました。個人的な内容が入るので会社のブログではなく、こちらに書かせてもらいます。 個人でiPhoneアプリをリリースした際にしているのですが、Appl [...]]]></description>
			<content:encoded><![CDATA[<p>タイトルの通りなのですが、会社でSuppAppというサービスを立ち上げました。個人的な内容が入るので会社のブログではなく、こちらに書かせてもらいます。</p>
<p>個人でiPhoneアプリをリリースした際にしているのですが、Appleにアプリを申請する際にサポートサイトのURLが必要になります。またアプリの紹介ページも必要になってきます。そこで私は下記のような作業を行いました。</p>
<ul>
<li>サポートサイトをgetsatisfaction.comで作成<br />
非常に良くできたサイトで、一通りの機能は揃ってます。</li>
<li>アプリの紹介ページを当ブログ内に作成<br />
<a href="http://www.teehanlax.com/blog/2009/06/18/iphone-gui-psd-30/" onclick="pageTracker._trackPageview('/outgoing/www.teehanlax.com/blog/2009/06/18/iphone-gui-psd-30/?referer=');">iPhonePSD</a>を使わせていただいて、iPhone端末画像にスクリーンショットをはめ込み（<a href="http://blog.dataich.com/lang/en/iphone-app/easy-beat/">参照</a>）</li>
</ul>
<p>そして、現在とあるiPadアプリの開発を行っているのですが、リリース時にまた上記のような事をしなくてはいけないのかと思うと、少々面倒臭くなってきました。そこでこの一連の流れをモバイルアプリに特化してサービスにしてしまおうと考え、会社で業務としてやらせてもらうことになりました。</p>
<p>登録は数分で済むと思いますので、是非皆様にも登録していただければ幸いです。</p>
<p><a href="http://supp-app.com/" onclick="pageTracker._trackPageview('/outgoing/supp-app.com/?referer=');">SuppApp</a></p>
<div style="float: right; margin-left: 10px;"><a href="http://twitter.com/share?url=http://blog.dataich.com/2010/06/01/supp-app-mobile-app-user-support-site-was-released/&via=dataich&text=SuppApp - モバイルアプリユーザサポートサイトを手軽に作れる&related=:&lang=en&count=vertical" class="twitter-share-button" onclick="pageTracker._trackPageview('/outgoing/twitter.com/share?url=http_//blog.dataich.com/2010/06/01/supp-app-mobile-app-user-support-site-was-released/_via=dataich_text=SuppApp_-_related=_lang=en_count=vertical&amp;referer=');">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script></div>]]></content:encoded>
			<wfw:commentRss>http://blog.dataich.com/2010/06/01/supp-app-mobile-app-user-support-site-was-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Android &#8211; サンプルアプリケーションの概要</title>
		<link>http://blog.dataich.com/2008/06/09/android-%e3%82%b5%e3%83%b3%e3%83%97%e3%83%ab%e3%82%a2%e3%83%97%e3%83%aa%e3%82%b1%e3%83%bc%e3%82%b7%e3%83%a7%e3%83%b3%e3%81%ae%e6%a6%82%e8%a6%81/</link>
		<comments>http://blog.dataich.com/2008/06/09/android-%e3%82%b5%e3%83%b3%e3%83%97%e3%83%ab%e3%82%a2%e3%83%97%e3%83%aa%e3%82%b1%e3%83%bc%e3%82%b7%e3%83%a7%e3%83%b3%e3%81%ae%e6%a6%82%e8%a6%81/#comments</comments>
		<pubDate>Mon, 09 Jun 2008 06:14:00 +0000</pubDate>
		<dc:creator>dataich</dc:creator>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[Android]]></category>
		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://dataich.s15.coreserver.jp/blog/2008/06/09/android-%e3%82%b5%e3%83%b3%e3%83%97%e3%83%ab%e3%82%a2%e3%83%97%e3%83%aa%e3%82%b1%e3%83%bc%e3%82%b7%e3%83%a7%e3%83%b3%e3%81%ae%e6%a6%82%e8%a6%81/</guid>
		<description><![CDATA[前回作成したサンプルアプリケーションのディレクトリ構成を見てみると、下記のようになっています。 anroid src com lancard tasklist R.java TaskList.java res drawa [...]]]></description>
			<content:encoded><![CDATA[<p>前回作成したサンプルアプリケーションのディレクトリ構成を見てみると、下記のようになっています。<br />
anroid</p>
<ul>
<li> src
<ul>
<li> com
<ul>
<li> lancard
<ul>
<li> tasklist
<ul>
<li> R.java</li>
<li> TaskList.java</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li> res
<ul>
<li>
<ul>
<li> drawable
<ul>
<li> icon.pnh</li>
</ul>
</li>
<li> layout
<ul>
<li> main.xml</li>
</ul>
</li>
<li> values
<ul>
<li> strings.xml</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li> AndroidManifest.xml</li>
</ul>
<p>まずは、resから見ていきます。</p>
<p><strong>drawable</strong><br />
ここには、アプリケーションで使用する画像ファイルを配置します。</p>
<p><strong>layout</strong><br />
ここには、アプリケーションで使用する画面定義ファイルを配置します。<br />
デフォルトではmain.xmlが作成されていますが、アプリケーションによっては複数の画面を使用したい場合もあります。<br />
その場合には、ここにxmlを追加することになります。</p>
<p><strong>values</strong><br />
ここには、アプリケーションで使用する、文字列定義等のファイルを配置します。デフォルトではstrings.xmlが用意されていますが、他にもarrays.xml、colors.xmlなどを配置できます。</p>
<p>次に、srcを見てみます。</p>
<h4>R.java</h4>
<p>res配下の各種定義ファイルに書かれているリソースにアクセスするためのクラスで、自動生成され、直接編集してはいけません。<br />
ソースを見てみると下記のようになっているかと思います。<br />
res配下のディレクトリ構成と同じように、クラスが作成されているかと思います。<br />
res/drawable/icon.pnfの場合は、R.drawable.iconとなっています。<br />
res/strings.xmlの場合は、xml 内のresources/stringの属性app_nameが読み込まれています。<br />
これを使用して、各種リソースにアクセスすることになります。</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">package</span> <span style="color: #006699;">com.lancard.tasklist</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">final</span> <span style="color: #000000; font-weight: bold;">class</span> R <span style="color: #009900;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #000000; font-weight: bold;">final</span> <span style="color: #000000; font-weight: bold;">class</span> attr <span style="color: #009900;">&#123;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #000000; font-weight: bold;">final</span> <span style="color: #000000; font-weight: bold;">class</span> drawable <span style="color: #009900;">&#123;</span>
        <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #000000; font-weight: bold;">final</span> <span style="color: #000066; font-weight: bold;">int</span> icon<span style="color: #339933;">=</span>0x7f020000<span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #000000; font-weight: bold;">final</span> <span style="color: #000000; font-weight: bold;">class</span> layout <span style="color: #009900;">&#123;</span>
        <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #000000; font-weight: bold;">final</span> <span style="color: #000066; font-weight: bold;">int</span> main<span style="color: #339933;">=</span>0x7f030000<span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #000000; font-weight: bold;">final</span> <span style="color: #000000; font-weight: bold;">class</span> string <span style="color: #009900;">&#123;</span>
        <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #000000; font-weight: bold;">final</span> <span style="color: #000066; font-weight: bold;">int</span> app_name<span style="color: #339933;">=</span>0x7f040000<span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<h4>TaskList.java</h4>
<p>メインクラスになります。ソースを見てみます。<br />
基本的にメインクラスは、android.app.Activityを継承して作成します。<br />
もちろん、 Activityクラスを継承した別クラスも用意されています。<br />
onCreateメソッドは、アプリケーション実行時に最初に呼ばれるメソッドで、メソッドの最初で親クラスのonCreateメソッドを呼び出す必要があります。<br />
その後、setContentView(R.layout.main)として、メイン画面のビュー定義をセットしています。</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">package</span> <span style="color: #006699;">com.lancard.tasklist</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">android.app.Activity</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">android.os.Bundle</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> TaskList <span style="color: #000000; font-weight: bold;">extends</span> Activity <span style="color: #009900;">&#123;</span>
&nbsp;
    <span style="color: #008000; font-style: italic; font-weight: bold;">/** Called when the activity is first created. */</span>
    @Override
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> onCreate<span style="color: #009900;">&#40;</span>Bundle icicle<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000000; font-weight: bold;">super</span>.<span style="color: #006633;">onCreate</span><span style="color: #009900;">&#40;</span>icicle<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        setContentView<span style="color: #009900;">&#40;</span>R.<span style="color: #006633;">layout</span>.<span style="color: #006633;">main</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>次に、AndroidManifest.xmlを見てみます。<br />
アプリケーション全体の設定ファイルになっており、デフォルトでは下記のようになっているかと思います。</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
</pre></td><td class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;manifest</span> <span style="color: #000066;">xmlns:android</span>=<span style="color: #ff0000;">&quot;http://schemas.android.com/apk/res/android&quot;</span> <span style="color: #000066;">package</span>=<span style="color: #ff0000;">&quot;com.lancard.tasklist&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;application</span> <span style="color: #000066;">android:icon</span>=<span style="color: #ff0000;">&quot;@drawable/icon&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;activity</span> <span style="color: #000066;">android:name</span>=<span style="color: #ff0000;">&quot;.TaskList&quot;</span> <span style="color: #000066;">android:label</span>=<span style="color: #ff0000;">&quot;@string/app_name&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;intent-filter<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;action</span> <span style="color: #000066;">android:name</span>=<span style="color: #ff0000;">&quot;android.intent.action.MAIN&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;category</span> <span style="color: #000066;">android:name</span>=<span style="color: #ff0000;">&quot;android.intent.category.LAUNCHER&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/intent-filter<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/activity<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/application<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/manifest<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></td></tr></table></div>

<p>3行目の android:icon=&#8221;@drawable/icon&#8221; は、R.drawable.iconを指定していることになります。</p>
<div style="float: right; margin-left: 10px;"><a href="http://twitter.com/share?url=http://blog.dataich.com/2008/06/09/android-%e3%82%b5%e3%83%b3%e3%83%97%e3%83%ab%e3%82%a2%e3%83%97%e3%83%aa%e3%82%b1%e3%83%bc%e3%82%b7%e3%83%a7%e3%83%b3%e3%81%ae%e6%a6%82%e8%a6%81/&via=dataich&text=Android - サンプルアプリケーションの概要&related=:&lang=en&count=vertical" class="twitter-share-button" onclick="pageTracker._trackPageview('/outgoing/twitter.com/share?url=http_//blog.dataich.com/2008/06/09/android-_e3_82_b5_e3_83_b3_e3_83_97_e3_83_ab_e3_82_a2_e3_83_97_e3_83_aa_e3_82_b1_e3_83_bc_e3_82_b7_e3_83_a7_e3_83_b3_e3_81_ae_e6_a6_82_e8_a6_81/_via=dataich_text=Android_-_related=_lang=en_count=vertical&amp;referer=');">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script></div>]]></content:encoded>
			<wfw:commentRss>http://blog.dataich.com/2008/06/09/android-%e3%82%b5%e3%83%b3%e3%83%97%e3%83%ab%e3%82%a2%e3%83%97%e3%83%aa%e3%82%b1%e3%83%bc%e3%82%b7%e3%83%a7%e3%83%b3%e3%81%ae%e6%a6%82%e8%a6%81/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Android &#8211; 開発環境</title>
		<link>http://blog.dataich.com/2008/06/09/android-%e9%96%8b%e7%99%ba%e7%92%b0%e5%a2%83/</link>
		<comments>http://blog.dataich.com/2008/06/09/android-%e9%96%8b%e7%99%ba%e7%92%b0%e5%a2%83/#comments</comments>
		<pubDate>Mon, 09 Jun 2008 06:14:00 +0000</pubDate>
		<dc:creator>dataich</dc:creator>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[Android]]></category>
		<category><![CDATA[Eclipse]]></category>

		<guid isPermaLink="false">http://dataich.s15.coreserver.jp/blog/2008/06/09/android-%e9%96%8b%e7%99%ba%e7%92%b0%e5%a2%83/</guid>
		<description><![CDATA[開発環境を構築する Android SDKのインストール Android SDKをダウンロードし、任意ディレクトリに解凍します。 Eclipse Pluginのインストール Help&#62;Software Update [...]]]></description>
			<content:encoded><![CDATA[<h3>開発環境を構築する</h3>
<ol>
<li>Android SDKのインストール<br />
Android SDKをダウンロードし、任意ディレクトリに解凍します。</li>
<li>Eclipse Pluginのインストール<br />
Help&gt;Software Updates&gt;Find and Installにて、下記URLを追加し、インストールします。</li>
<li>Windows&gt;Preference&gt;AndroidのSDK LocationにAndroid SDKを解凍したディレクトリを指定します。 これで開発環境構築は完了となります。</li>
</ol>
<h3>サンプルプロジェクト作成</h3>
<p>EclipseにてFile&gt;New&gt;Projectを選択し、Android&gt;Android Projectを選択。<br />
下記のように入力して、プロジェクトを作成します。</p>
<ul>
<li> Project name android
<ul>
<li> Eclipseでのプロジェクト名</li>
</ul>
</li>
<li> Package name com.lancard.tasklist
<ul>
<li> アプリケーションのパッケージ名</li>
</ul>
</li>
<li> Activity name TaskList
<ul>
<li> アプリケーションのメインクラス名</li>
</ul>
</li>
<li> Application name Task List
<ul>
<li> アプリケーション名（画面に表示するタイトルとしても使用）</li>
</ul>
</li>
</ul>
<h3>エミュレータを実行する</h3>
<p>Eclipse上で、プロジェクトを右クリック、Run As&gt;Android Applicationを選択。<br />
下記のように、エミュレータが起動すれば成功です。</p>
<p><a href="http://blog.dataich.com/wp-content/uploads/android.png" rel="lightbox[23]"><img class="alignnone size-full wp-image-159" title="android" src="http://blog.dataich.com/wp-content/uploads/android.png" alt="android" width="400" height="334" /></a></p>
<div style="float: right; margin-left: 10px;"><a href="http://twitter.com/share?url=http://blog.dataich.com/2008/06/09/android-%e9%96%8b%e7%99%ba%e7%92%b0%e5%a2%83/&via=dataich&text=Android - 開発環境&related=:&lang=en&count=vertical" class="twitter-share-button" onclick="pageTracker._trackPageview('/outgoing/twitter.com/share?url=http_//blog.dataich.com/2008/06/09/android-_e9_96_8b_e7_99_ba_e7_92_b0_e5_a2_83/_via=dataich_text=Android_-_related=_lang=en_count=vertical&amp;referer=');">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script></div>]]></content:encoded>
			<wfw:commentRss>http://blog.dataich.com/2008/06/09/android-%e9%96%8b%e7%99%ba%e7%92%b0%e5%a2%83/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

