'how can i use android wifi-display native source in my app?

I want to use miracast in my app without going to system setting, and find miracast device and connect to them in my app. Two class that was in setting classes that can help me are hidden in android SDK:

import android.hardware.display.WifiDisplay;
import android.hardware.display.WifiDisplayStatus;

so I think to use native source code of them in android media framework on this. I want to know if this is the best way, if so how can I use this native code in my app? Android how to use this native code in android SDK ?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source