I want to make an application to display Wi-Fi on my Android phone (HongMi). My phone version for Android 4.2.2
I modified the WiFiDirectActivity example and tried to combine it with this Miracast-Sample project . I know that I need to connect two devices via Wi-Fi Direct (Wi-Fi P2P) before mirroring the screen to another (Wi-Fi display). I register DisplayListener in onResume () (and unregister in onPause ()). I also register BroadcastReceiver to listen to a P2P Wi-Fi message.
I can get a Wi-Fi P2P message whenever I connect / disconnect via Wi-Fi P2P. But I can not get anything with my DisplayListener after connecting. My DisplayListener doesn't even work.
My problem is that after I connected the two devices, a new second screen may be displayed, or why DisplayListener does not start.
thanks for the help
source
share