How to remove unnecessary Android permissions from React Native apps — 1x05
This story is part of a series where I am sharing my experiences on React Native: how I approached and worked with RN Components, APIs, external packages and all sorts of issues. I hope that this series of posts will prove useful to the React Native community and provide helpful insights. For app development enquiries check us out or contact me here.
The “drawing over other apps” permission
If you are developing in React Native, chances are you have seen the following screen:
It’s a screen that appears when users/developers execute their app for the first time in a device/emulator where the built application asks for permission. Permission to be able to “draw over other apps”. When I saw it for the first time I wondered:
What is that permission? And where did it come from?
After doing some web research, it turns out that this Android permission is called SYSTEM_ALERT_WINDOW and is needed from React Native when executing the app in debug mode only. But besides the fact that it is needed for debug mode only, it also appears in the list of permissions of the release mode APK. And after looking at the Android permissions’ documentation we notice that it is a special permission which is…