Customize Consent Preferences

We use cookies to help you navigate efficiently and perform certain functions. You will find detailed information about all cookies under each consent category below.

The cookies that are categorized as "Necessary" are stored on your browser as they are essential for enabling the basic functionalities of the site. ... 

Always Active

Necessary cookies are required to enable the basic features of this site, such as providing secure log-in or adjusting your consent preferences. These cookies do not store any personally identifiable data.

No cookies to display.

Functional cookies help perform certain functionalities like sharing the content of the website on social media platforms, collecting feedback, and other third-party features.

No cookies to display.

Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics such as the number of visitors, bounce rate, traffic source, etc.

No cookies to display.

Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.

No cookies to display.

Advertisement cookies are used to provide visitors with customized advertisements based on the pages you visited previously and to analyze the effectiveness of the ad campaigns.

No cookies to display.

Android のマルチタスキング


iPhone OS 4.0 でマルチタスクが導入されることもあってか、Android や iPhone のマルチタスクを解説する記事をよく見かけるようになった。Advance Task Manager などでバックグラウンドプロセスを自動的に終了させることは不必要である、というのがどうやら正しいようだ。

iPhoneOS4.0がマルチタスクになるらしいのでAndroidのマルチタスクの話をしてみる(1)

Multitasking the Android Way

【Giz Explains】スマートフォンごとに違うマルチタスキング、どうなってるの?

私なりにまとめると:
・AndroidのActivity(ユーザから見える画面)は裏に回ると停止するので(*)、表で動いているアプリのもっさりの原因にはならない
・Android はメモリが足りなくなると、不要な裏に回ったActivityを終了させる仕組みを持っている
・Activityは裏に回る時に最後の状態を保存するので、終了させられた後の再起動時でもそこから再開できる
・音楽の再生やネットとの各種通信は Broadcast Receiver と Service という2種類の裏でも動くプロセスが担っている
・Broadcast Receiverはアラーム通知、位置情報の変化など特定のイベントが起きたときに10秒以内で処理をする
・Service はネットとの通信や音楽再生などを行うため、もっと長い時間、バックグラウンドでも動作できる
・Service がいつどのように動作するかを制御するのはアプリの責任
・Service はいつまででも動くので、Androidはメモリが足りなくなったら Serviceを終了させるがあとで再起動する
・バックでの音楽再生のようにOSが終了させない状態の Service もある

(*) WEBページのダウンロード中などは裏に回っても続行する

というような背景があって、タスクマネージャの類でプロセスを殺す必要は無いと言っているのが次の記事。

Google and Cyanogen comments imply task killer/manager apps are pointless

でも、HT-03A時代にはタスクマネージャ系のアプリは結構流行ったし、効果もあったような気がするのだけれど、あれは何だったのとなるが、たぶん:

・Launcher (Homeアプリ)が終了してしまうのを防げていた
・メモリ不足時にアプリ起動に時間がかかるのを防げていた
・プラシーボ効果

といったところか。

最近の端末は、少し前に起動したアプリがかなりの時間残っているくらいメモリも潤沢なので、タスク管理系のアプリはもう要らないかもね。

1件のコメント

  1. 生ぴーまん コメント

    バッテリを持たせるには必須
    タスクマネージャでプロセスを殺す必要はあると思います。
    メモリ使用量を着目した限りはその通りなんでしょうが、バッテリ使用量を着目すると話は違ってきます。
    Xperia なんかはユーザが望まないのにかなりの数のアプリ/サービスが動いています。
    実際、多くのプロセスを殺す事によって 24 時間経過してもバッテリが 60% 近く残っていた事がありました。

コメントは受け付けていません。

PAGE TOP