为何Android中大部分锁屏APP都要手动勾选“通知使用权”(Notification Access)?
ringa_lee
ringa_lee 2017-04-17 14:55:36
0
3
805

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

ringa_lee
ringa_lee

ringa_lee

reply all(3)
阿神

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

黄舟

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

小葫芦

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.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template