简体   繁体   中英

Programatically enable/disable screen mirroring in Android. [root]

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM