10-17 21:49:58.732 6664 6686 E Unity : AndroidJavaException: **java.lang.NullPointerException: Attempt to invoke virtual method 'android.net.wifi.p2p.WifiP2pDevice edu.rit.se.wifibuddy.DnsSdService.getSrcDevice()' on a null object reference
10-17 21:49:58.732 6664 6686 E Unity : java.lang.NullPointerException: Attempt to invoke virtual method 'android.net.wifi.p2p.WifiP2pDevice edu.rit.se.wifibuddy.DnsSdService.getSrcDevice()' on a null object reference
10-17 21:49:58.732 6664 6686 E Unity : at edu.rit.se.wifibuddy.WifiDirectHandler.initiateConnectToService(WifiDirectHandler.java:583)**
10-17 21:49:58.732 6664 6686 E Unity : at com.gmail.jeffersonlee2000.unitywifidirect.UnityWifiDirect.connectToService(UnityWifiDirect.java:82)
I'm using a Unity3D wrapper, but the NPE is in Java code. This error prevents the connection from being established.
The source of the error comes from this file, where getDnsSdServiceMap is not returning any Service.
Can anyone spot where the error is in the above implementation?
I'm using a Unity3D wrapper, but the NPE is in Java code. This error prevents the connection from being established.
The source of the error comes from this file, where
getDnsSdServiceMap
is not returning any Service.Can anyone spot where the error is in the above implementation?