8/18におこなわれたCSS Nite in OSAKA, Vol.32での発表用スライドです。4/27のCSS Nite in OSAKA, Vol.29で使用したスライドをベースに、若干の追記・修正をした内容となっています。Read less
googleは公式ドキュメントとしてAndroid開発におけるパフォーマンス設計のベストプラクティスを公開しています。 Designing for Performance | Android Developers どんなに優れたUIであってもパフォーマンスの悪いアプリはユーザにとって使いにくいものになってしまいます。 アプリのパフォーマンスチューニングは重要です。 今回は公式ドキュメントをベースにパフォーマンス設計のベストプラクティスのご紹介です。 Javaの世界で当たり前だったものが、Androidの世界では通用しないものも多々あるので覚えておきたいです。 基本的な考え方 Androidで良好なパフォーマンスを得るための基本的な考え方は 無駄な処理はしない 無駄なメモリは使わない ことです。以降に出てくる原則はすべてこれにのっとったものです。 オブジェクト生成は避ける オブジェク
ProGuardはJavaコードを最適化/難読化するためのツールです。apkのサイズが少なくなったり、apk解析された際に解析され難くなります。 今回は難読化のさせ方がよく分からなかったので整理しておきました。 なお、ProGuardのバージョンは4.5を使用しています。 前準備 ProGuardの導入に関しては他ブログを参照ください。 公式のここやここのブログの方が綺麗に導入方法をまとめています。 一応ハマりポイントだけまとめておきます。 ADTをr7に上げる proguard.dirはProGuardのlibまでのパス androd-sdk内のantファイルでjavacタグ内のencodingをUTF-8にする プロジェクト内にて以下のコマンドを実行すると正常に処理されたら準備OK。 $ ant release ここまでで出来ている必要があるもの。 obf以下にdump.txtやmap
googleのAndroid開発者向け ブログに「Memory Analysis for Android Applications」という記事があったため、自分のために訳しました。参考になれば幸いです。本エントリを見るうえで、eclipse の基本的な使い方を理解している必要があります。 Androidアプリのメモリ解析手法 Dalvikランタイムは、ガベージコレクトしてくれるかもしれませんが、それはメモリ管理を行わなくてもよいというわけではありません。モバイル端末上でのメモリ利用状況は特に注意を払わなければなりません。本投稿では、開発するアプリのメモリ利用状況の把握を支援する Android SDK で提供しているメモリプロファイリングツール群のいくつかを紹介させて頂きます。 メモリ利用時の問題はいくつか明らかになっています。例えば、もしあなたのアプリがユーザの画面タッチ操作のたびにメモ
December 18th, 2008, Android. Android applications are, at least on the T-Mobile G1, limited to 16 MB of heap. It’s both a lot of memory for a phone and yet very little for what some developers want to achieve. Even if you do not plan on using all of this memory, you should use as little as possible to let other applications run without getting them killed. The more applications Android can keep i
I have an activity using an xml layout where a WebView is embedded. I am not using the WebView in my activity code at all, all it does is sitting there in my xml layout and being visible. Now, when I finish the activity, I find that my activity is not being cleared from memory. (I check via hprof dump). The activity is entirely cleared though if I remove the WebView from the xml layout. I already
http://d.hatena.ne.jp/shimobayashi/20080719/1216428993で書いた電脳フィギュアがTGSで発表されていたらしい。http://japan.cnet.com/video/story/0,2000056064,20372008,00.htmARisという名前になったらしい。動画を見てみたけど、フレームレートの低さが気になる。周りの手の動きとかを見ると動画自体のフレームレートが低いわけではなさそう。複数マーカーのトラッキングはやっぱ重たいのかな。まあ電脳フィギュアの是非は置いといて、ARの技術はぼちぼち応用していく時期なんじゃないかと思っているので、色んな製品が出てくることを勝手に楽しみにしています。
ゴールデンウィークから作り始め、1週間くらい前にようやく"鉄Qプリンセス"(https://market.android.com/details?id=name.shimobayashi.tekkyu)をリリースすることができました。大体2週間でゲーム製作に飽きる自分としてはかなりの長丁場になったのですが、その分色々と得られるものはあったので適当にメモしておこうと思います。個人ゲーム製作に興味がある方はどうぞ。 基本的なゲームプログラミングに関する話題は、Androidゲーム開発入門、私が2Dアクションゲームをつくるまでに蓄積されたTips - shimobayashiの日記http://d.hatena.ne.jp/shimobayashi/20110410/1302442681に以前にまとめているので、非技術的な話題が中心になるのかな。 Androidの音周りは本当にクソメディアの音量
本格的にAndroidアプリの開発をするとなるとやはり開発標準が必要になると思います。 ガチガチに決める必要はありませんが、開発標準があれば複数人開発にも一定の秩序ができてやりやすくなるかと思います。 UI標準D_PAD_CENTERまたはバックボタンで代用できる場合は極力ボタンを使用しないことCloseボタン、Cancelボタンは使用しないことDialogからActivityを起動したり別のDialogを起動しないことActivityを使うかDialogを使うかの指針は以下を参考にすることActivityにする場合(ひとつでも当てはまればよい)アプリケーションの起点(HOMEから呼ばれる)となる画面画面いっぱいに表示する必要がある処理した結果を呼び出し元に渡したい呼び出後に後続処理が必要画面遷移が必要な場合オブジェクトが状態を保持する必要がある場合Dialogにする場合上記以外クラス名の
おもしろそうなので、まずはドキュメントをみる。 Google Projects for Android: C2DM 処理の流れは、 Androidアプリを起動して受信登録する。 外部アプリ上でAndroidにメッセージを送信しようとボタンなどを押す。 AndroidアプリがC2DMサーバからメッセージを受信する。 だと書いてる。 C2DMサーバを経由するようだ。 Enabling C2DM. An Android application running on a mobile device registers to receive messages. Sending a message. A third-party application server sends messages to the device. Receiving a message. An Android applica
こんにちは! iPhone/Androidエンジニアのgaoohです! 好きなExceptionはUnsupportedOperationExceptionです! みなさん、Android開発ではエディタは何をつかってますか? やっぱJavaといえばEclipseですよね! 個人的にはEclipseが大好きっ子です。好きすぎてEclipseでPerlを書いてたらまわりから変な目でみられたけど、それにもめげずに今日もワークスペースを開きます。 そんなEclipse好きなので、Androidで開発するときに抑えておくべきことをまとめてYo! とリーダーにいわれたので、まとめてみました。 これだけはいれとけ! 必須plugin ADT 当たり前ですが、これをいれないと話になりません。 http://developer.android.com/sdk/eclipse-adt.html EGit G
ここ1週間くらいずっとAndroidゲーム開発を手探りで進めていた。そして、めでたく、ようやく、初のAndroid向け2Dアクションゲームをリリースすることができました。 Fire Rescue - Android マーケットhttps://market.android.com/details?id=name.shimobayashi.firerescue内容としては http://www.shimobayashi.name/ のBurningPanicというゲームをAndroid向けに移植した感じです。なお、ゲームのBGMはuzzuさん(http://twitter.com/uzzu)につくっていただきました、感謝。(スクリーンショットが若干おかしいですが、OpenGLを使った画面をPCでうまくキャプチャーできないようです。無念。) つきましては、またもやヘドロのごとくTipsが蓄積され
Androidアプリを多国語対応するやり方は? Androidは、実に色んな言語のサポートをしています。 自分で作ったAndroidアプリを、色んな国の人に使ってもらいたい!と思っている方も多いと思います。 Android端末の表示言語設定に合わせて、自分で作っているAndroidアプリの言語を切り替える事ができます。 但し、勝手に翻訳してくれるというわけではありませんケド。 Androidアプリでは、アプリ内で使用する文字列のリソースは、基本的にはXMLファイルにて定義します。 通常、これらのXMLファイルは以下に作成します。 Androidプロジェクト->res->values この「values」というフォルダにあるstring.xmlに、文字列を定義していきます。 例えば、下記のような言語対応をしたいとします。 ・日本語モードの場合は、日本語用の文字列を使用する ・それ以外は、英語
2010年冬、携帯キャリア各社から続々とAndroidスマートフォンが発売されました。シンメトリックでは新発売スマートフォンのスペックを調査しており、私も実機を使っての調査に携わっています。2010年秋以降は、この調査ワークが忙しくなり、世のスマートフォンブームを実感しています。 調査するスマートフォンの機種スペック項目には、実機を触らなくても情報収集でほぼ確実に予測できるものもあります。それらには、一定の法則性や制約が存在するからです。しかし壁紙サイズは、実機で調査しなければ判らない項目でした。なぜなら私が調査に関わり始めた2010年夏頃は、Androidスマートフォンがまた2,3機種程度と少なく、三者三様で何の法則性もないように思えたからです。 あれから半年ほど、モバイル業界はAndroidで一層盛り上がっています。2010年秋冬は次々とAndroidスマートフォンが発売されました。私
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く