RemindMe icon indicating copy to clipboard operation
RemindMe copied to clipboard

`SYSTEM_ALERT_WINDOW` Permission Explanation (if you know a better way, LMK!)

Open VishnuSanal opened this issue 11 months ago • 4 comments

SYSTEM_ALERT_WINDOW permission is used because Android wouldn't let me start an activity from the background. Hence, I display a transparent system overlay for a very small duration (500 ms), then open the alarm activity as soon as the overlay gets drawn, and close the overlay later. I have added the reason to full description too for full transparency.

if you know/finds a better way to do this, please LMK. :) keeping this thread open for inputs and discussions.

VishnuSanal avatar Jan 25 '25 16:01 VishnuSanal

Why not use Alarm Manager?

rtdany10 avatar Feb 05 '25 02:02 rtdany10

What not use Alarm Manager?

hi @rtdany10, thanks for reaching out. actually, we are using AlarmManager to trigger alarms; but launching a new activity from PendingIntent from AlarmManager is not allowed by by android.

VishnuSanal avatar Feb 05 '25 11:02 VishnuSanal

Not sure, but I believe exact alarms are exempted from it? Image

Also - https://developer.android.com/guide/components/activities/background-starts#sender-pendingintent

rtdany10 avatar Feb 06 '25 04:02 rtdany10

Not sure, but I believe exact alarms are exempted from it? Also - https://developer.android.com/guide/components/activities/background-starts#sender-pendingintent

thanks, I will check & update here.

VishnuSanal avatar Feb 06 '25 05:02 VishnuSanal