search

Home  >  Q&A  >  body text

为何Android中大部分锁屏APP都要手动勾选“通知使用权”(Notification Access)?

是为了获得其他APP的通知内容从而在自己的锁屏界面上显示?
可是部分没有这功能的APP也是需要手动勾选。
如果说是为了防止APP进程被系统杀掉,那又是如何实现的?

ringa_leeringa_lee2772 days ago812

reply all(3)I'll reply

  • 阿神

    阿神2017-04-17 14:57:36

    From the official documentation, it should be to obtain the notification content of other apps and display it on your own lock screen.

    Lock Screen Notifications

    With the release of Android 5.0 (API level 21), notifications may now appear on the lock screen. Your app can use this functionality to provide media playback controls and other common actions. Users can choose via Settings whether to display notifications on the lock screen, and you can designate whether a notification from your app is visible on the lock screen.

    http://developer.android.com/guide/topics/ui/notifiers/notifications.html#lockscreenNotification

    reply
    0
  • 黄舟

    黄舟2017-04-17 14:57:36

    You can get the notification without displaying it and upload it secretly

    reply
    0
  • 高洛峰

    高洛峰2017-04-17 14:57:36

    is displayed as a system notification layer window. You can take a look at the type attribute of WindowManager.LayoutParams. I have done a similar function, which is to set my own level to TYPE_SYSTEM_ERROR to ensure that I am at the top of all windows.

    reply
    0
  • Cancelreply