LoginSignup
1
1

More than 5 years have passed since last update.

Android 4.2.2から通知の挙動が若干変わっていた.

Last updated at Posted at 2015-05-15

結論

Notification.PRIORITY_MINを設定すると4.2.2以降では

  • 音が鳴らない
  • LEDが光らない
  • ステータスバーにアイコンが出ない

4.2.1以前では音がなることは確認しています。

詳細

4.2.2に入っているCommit Commentは以下の通りです。

commit 526fa0e6d5cfe6ca3f390982c169b43fcb7d6f78
Author: Daniel Sandler <dsandler@android.com>
Date:   Tue Dec 4 14:51:50 2012 -0500

PRIORITY_MIN notifications should be truly ambient.

If your notification is set to MIN priority, it will never
attempt to interrupt the user, either by an icon (already
implemented), or (new in this patch) by LED, vibration, or

上記は4.2.2_r1から入っている模様。

公式ドキュメントには全くビヘイビアについては触れられていないのでPRIORITY_MINを使う際には注意が必要となります。

public static final int PRIORITY_MIN

Added in API level 16
Lowest priority; these items might not be shown to the user except under special circumstances, such as detailed notification logs.

Constant Value: -2 (0xfffffffe)
1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1