先日記載したセンテンスばらばらの試行記録を消費電力対策の部分だけ整理しました。 今後も、何か見つけたらエントリ起こしていきたいと思います。 消費電力に対して影響を与えうる内容。 AppWidgetProviderの更新周期をres/xml/*.xml側のandroid:updatePeriodMillis定義によって行っている。 そのことによるメリット 実装が非常に楽。(onUpdateをオーバーライドして実装を記述するだけでよい) そのことによって起こる現象とバッテリーへの影響 Homeがアクティブ状態になくても更新リクエストを繰り返す。 そのため、デバイスがスリープ状態でも更新処理が走り、電池を消耗する。 対策方法概要 res/xml/*.xml側のandroid:updatePeriodMillisに値ゼロ[0]を指定し、システムからのonUpdate呼び出しを停止する。 AppWi
アクティビティから別のアクティビティを呼び出すには //アクティビティを呼び出す Intent intent = new Intent(this,hogehoge.class); startActivity(intent); みたいにしますが、サービスなどのアクティビティ以外から同様にstartActivity()を実行すると Calling startActivity() from outside of an Activity context requires the FLAG_ACTIVITY_NEW_TASK flag. Is this really what you want? と言われてAndroidRuntimeExceptionとなります。 アクティビティ以外からは「FLAG_ACTIVITY_NEW_TASK」フラグを設定した方がいんじゃね?的な事を言っていると思っ
In my previous two posts, I explained how you would implement Tabs using Fragments and then how to implement page swiping using ViewPager. In this post, I’ll bring those two nuggets together and show you how to implement Swipe-able Tabs (i.e switch between tabs using the swipe gesture). * Caveat Alert * At the time of this posting, there is no way of implementing MapView as a fragment, which may
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く