3

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?

Aldridge1991
  • 1,326
  • 6
  • 24
  • 51
  • 1
    Do you want to protect your app from screen mirroring? If thats the case have a look [here](http://stackoverflow.com/questions/18889685/how-to-detect-screen-mirroring). – Jonas Köritz Apr 20 '16 at 15:04
  • 1
    Honestly I don't know which is the purpose of this action. I've been asked if I could do this and in how much time. I know there's an option in some device in which you can enable/disable this option. But I've not been able to find documentation about this. I'll have a look at your link ;) – Aldridge1991 Apr 20 '16 at 15:07
  • 1
    @Aldridge1991 long time but will be helpful for new ones: https://stackoverflow.com/a/64876664/11390822 – Sorry IwontTell Nov 17 '20 at 13:57

1 Answers1

1

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

Sorry IwontTell
  • 466
  • 10
  • 29