Androidで常駐型アプリケーションを作成する場合に便利なServiceについてライフサイクル・使い方を解説します。サービスの利用例はステータス通知(Notification)を変化させる等をご確認ください。Serviceを使う(1)では簡単化のため、Remote Messenger Serviceを次回以降として、LocalServiceに特化して解説します。 Serviceのライフサイクル onCreate / onStartCommand / onDestroyの3つの状態遷移 サービスの実行方法によってライフサイクルが異なる サービスの実行方法はContext#startServiceとContext#bindServiceの2種類 startService/stopService Service全般として実行中はServiceからActivityへIntentの発行が可能 サー
I have a BroadcastReceiver which is called every so often, and I have noticed many people use android: process =":remote" in their receiver. Mine is used to check a few things and if the conditions match then activate an alarm. My question is should I use the line I had posted above in my manifest? And if so what are the benefits of doing so?
2011年02月02日21:43 カテゴリRemoteViews RemoteViewsの仕組み AppWidgetProviderで使っているRemoteViewsクラスの仕組みについて調べてみた。 Widgetは、表示領域を提供するAppWidgetHost(大抵はホームアプリ)に、部品を提供するAppWidgetProviderから表示情報を送る形で構成されている。 ホームアプリとAppWidgetProviderは別プロセスなので、AppWidgetManager~AppWidgetSeriveを通してBinderでIPCで情報を送っている。 AppWidgetHostではMessageを使って別スレッドで動作しているが、細かいところを省略すると以下のシーケンスになる。 要するにAppWidgetManagerに渡したRemoteViewsがHost側まで渡され、そこでapply(
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く