I'm trying to develop an Android app which detects if screen mirroring is currently ON and enables/disables this functionality.
Is there any API I can use in order to achieve this?
I'm trying to develop an Android app which detects if screen mirroring is currently ON and enables/disables this functionality.
Is there any API I can use in order to achieve this?
You can remove functionality which mirrors.
No software can mirror if developer option is disabled.
This code will tell whether android can mirror or not.
int CanMirror = Settings.Secure.getInt(this.getContentResolver(), Settings.Global.DEVELOPMENT_SETTINGS_ENABLED , 0);
//returns 1 if can mirror
//returns 0 if can't mirror
Reference : https://stackoverflow.com/a/63971764/11390822