You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Automatically pause when installing APKs
Darker detects when an APK is attempting to install and temporarily pauses.
This would indeed be very useful, and I've been looking into how to accomplish this. It seems that up to Android Lollipop (API 21) it was fairly easy to get the info of the foreground app with ActivityManager.getRunningTasks, however as of API 21+ this only returns 'non sensitive' tasks, making it unusable for this purpose.
According to this StackOverflow answer a workaround on later versions of Android is using android UsageStatsManager and filter out the last used application. A problem with this approach is that UsageStatsManager isn't implemented on Samsung phones according to the comments on that question.
Lastly I'm not sure how Red Moon would register changes to the foreground activity. There doesn't seem to be a listener framework for the UsageStats or the ActivityManager and constantly polling for changes may be a drain on the battery life of a phone.
That said, I'm quite a fan of this feature. I think it would be a huge usability improvement (especially for F-Droid users). However it seems that it would be quite complex and time consuming to implement this correctly, which I don't have right now. If someone else is willing to implement this, I would love to see a pull request 😄.
The text was updated successfully, but these errors were encountered:
Here's an idea, albeit one that makes me a little uncomfortable.
We could allow users to set red moon as the default application for installing apks, rather than the package installer. Then red moon disables the filter, calls the package installer so the user can install the apk. When the package installer completes, red moon will automatically return to the foreground. Then it can re-enable the filter and close itself. There's an Antivirus app that comes with the galaxy S7 that does this.
I've implemented a solution to this in v2.9.0. If you enable "Automatic suspend" in this version, Red Moon polls the current package every second that the filter is active and the screen is on and suspends the filter when a 'protected' app is detected. See: efa1e05.
fine :) When you open "grant permissions dialog", is it suspended? not sure how these APIs handle current app, since "grant permissions dialog" is started by some app, but dialog comes from Package Installer.
Originally discussed in #61.
This would indeed be very useful, and I've been looking into how to accomplish this. It seems that up to Android Lollipop (API 21) it was fairly easy to get the info of the foreground app with ActivityManager.getRunningTasks, however as of API 21+ this only returns 'non sensitive' tasks, making it unusable for this purpose.
According to this StackOverflow answer a workaround on later versions of Android is using android UsageStatsManager and filter out the last used application. A problem with this approach is that UsageStatsManager isn't implemented on Samsung phones according to the comments on that question.
Lastly I'm not sure how Red Moon would register changes to the foreground activity. There doesn't seem to be a listener framework for the UsageStats or the ActivityManager and constantly polling for changes may be a drain on the battery life of a phone.
That said, I'm quite a fan of this feature. I think it would be a huge usability improvement (especially for F-Droid users). However it seems that it would be quite complex and time consuming to implement this correctly, which I don't have right now. If someone else is willing to implement this, I would love to see a pull request 😄.
The text was updated successfully, but these errors were encountered: