Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Firewall temporary allowance notification is not displayed #966
Reproduced on Samsung s7
Could be a foreground detection issue.
Here's what we should do
In order to detect if the app is in foreground or not, we should be using the UsageStatsManager: https://developer.android.com/reference/android/app/usage/UsageStatsManager.html
The only question is when should we ask for the necessary permissions. I suggest doing it every time user decides to block network access for some app (or a list of apps via the batch action).
This problem is not solve now. Android 7 restrict access to folder /proc for other processes, but solve this problem help use UsageStatsManager.
Information about UsageStatsManager: https://developer.android.com/reference/android/app/usage/UsageStatsManager.html.