2010年8月31日火曜日

[AndroidFace v1.1.3 Beta] was Released.

[AndroidFace v1.1.3 Beta] をリリースしました。 Faceパターンで5つ以上のパーツを表示するようになりました。

[AndroidFace v1.1.3 Beta] was Released. Five or more display parts of the Face-Pattern.


Faceパターンのパーツの表示を5つまでしか対応をしていませんでした。
一部のFaceパターンでは6以上のパーツを使用しているものがありましたので、表示できるように対応したものです。

2010年8月11日水曜日

android.content.ReceiverCallNotAllowedException: IntentReceiver components are not allowed to bind to services

IntentReceiver から Serviceをbindすることは出来ない。

08-11 07:14:51.487: ERROR/AndroidRuntime(1614): Caused by: android.content.ReceiverCallNotAllowedException: IntentReceiver components are not allowed to bind to services

Receiver call not allowed Exception <- レシーバはコールすることが出来ない例外
IntentReceiverコンポーネントがサービスにバインドすることはできません

AppWidgetはIntennt Receiverなので

onUpdate()メソッドの中で、

Intent serviceIntent = new Intent(IService.class.getName());
context.bindService(serviceIntent, conn, Context.BIND_AUTO_CREATE);

とすると例外が発生する。


BroadcastReceiverのドキュメントは、

If this BroadcastReceiver was launched through a tag, then the object is no longer alive after returning from this function.This means you should not perform any operations that return a result to you asynchronously -- in particular, for interacting with services, you should use startService(Intent) instead of bindService(Intent, ServiceConnection, int). If you wish to interact with a service that is already running, you can use peekService(Context, Intent).

とあります。


Intent serviceIntent = new Intent(context, MyService.class);
context.startService(serviceIntent);
IBind bind = peekService(context, serviceIntent);

としてみても、bindはNULLになります。

はてさてどうしたものか...

2010年8月10日火曜日

AndroidFace Liteをリリースしています。

AndroidFaceの簡易版AndroidFace Liteをリリース。

AndroidFaceのブラッシュアップする為に作成したものです。
MacFace対応とか削り、基本機能のみとなってます。

Serviceまわりをリコーディングしたので、挙動は安定しているはず。。。


2010年8月7日土曜日

Android向けコードスタイル

Android向けコードスタイルを日本語訳されてる方がいたのでメモ

Code Style Guidelines for Contributors | Android Open Source <http://source.android.com/source/code-style.html>

コントリビュータのためのAndroidコードスタイルガイドライン 日本語訳 | textdrop <http://www.textdrop.net/android/code-style-ja.html>