yuriykulikov / AlarmClock

Most popular open source Android Alarm Clock App
514 stars 173 forks source link

Question: How does the app get "Show on lock screen" and "Display pop-up windows while running in the background" permissions? #328

Closed DeNatur closed 4 years ago

DeNatur commented 4 years ago

Hi,

Could you tell me how did you manage to get Xiaomi permissions "Show on lock screen" and "Display pop-up windows while running in the background"? permissions2 I could not find any source of those permissions and saw that this app automatically grants them. I looked through the source code I did not see how to do this.

Thanks!

yuriykulikov commented 4 years ago

Hi, I don't use these permissions. Take a look at https://github.com/yuriykulikov/AlarmClock/blob/develop/app/src/main/java/com/better/alarm/background/NotificationsPlugin.kt

It is a high-prio notification with an activity attached to it.

I hope this helps.

Best wishes, Yuriy

On Tue, Sep 1, 2020 at 2:27 PM Szymon Stasik notifications@github.com wrote:

Hi,

Could you tell me how did you manage to get Xiaomi permissions "Show on lock screen" and "Display pop-up windows while running in the background"? [image: permissions] https://user-images.githubusercontent.com/28963517/91851238-1fee9880-ec5f-11ea-8a21-32ee0c0ddff7.jpg I could not find any source of those permissions and saw that this app automatically grants them. I looked through the source code I did not saw how to do this.

Thanks!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/yuriykulikov/AlarmClock/issues/328, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGKDESZFRQ7POAB3YMBM23SDTSBVANCNFSM4QRVAUPA .

yuriykulikov commented 4 years ago

@DeNatur Since Android 10 a new Permission is required. Check this out: https://developer.android.com/reference/android/app/Notification.Builder#setFullScreenIntent(android.app.PendingIntent,%20boolean)