0

There is a public method connectWifiDisplay(String deviceAdress) in AOSP (DisplayManagerService class), but not in Android SDK.

How to call this method?

1 Answers1

5

The entire class you've linked to has been marked with @hide, which means it is not accessible through the SDK.

However, you could still technically execute the code you want using Reflection, but it is advised against this, as classes not part of the SDK are prone to changes, and the method may be altered in functionality, or cease to exist entirely in future version of Android.

Community
  • 1
  • 1
Raghav Sood
  • 81,899
  • 22
  • 187
  • 195
  • 2
    There are actually three potential issues here: constructs which are invisible to the SDK at compile time, which can be found later with reflection. Next, constructs only present in objects which cannot be obtained by application code at runtime - reflection will not help. Lastly, code which simply cannot do what it needs to when run with the limited permissions of an application userid, and instead must run as a privileged system userid. – Chris Stratton Feb 18 '14 at 17:09
  • To expand on @ChrisStratton's comment, an excellent guide on how to access hidden and internal constructs can be found here: http://devmaze.wordpress.com/2011/01/18/using-com-android-internal-part-1-introduction/ – Andrew T. Feb 19 '14 at 21:46