BroadcastReceiver receiver = new BroadcastReceiver() {
[USER=69643]@override[/USER]
public void onReceive(Context context, Intent intent) {
if(intent.getAction().equals
(WifiP2pManager.WIFI_P2P_THIS_DEVICE_CHANGED_ACTION)){
wifiP2pManager.requestGroupInfo(channel,
new WifiP2pManager.GroupInfoListener() {
[USER=69643]@override[/USER]
public void onGroupInfoAvailable(WifiP2pGroup group) {
if(group != null){
// clients require these
String ssid = group.getNetworkName(),
String passphrase = group.getPassphrase()
}
}
});
}
}
};