Why Do I Always Get Busy When Using Wifip2pmanager?
I am trying to connect two Android-Devices using Wi-Fi Direct. On my HTC-Phone (One SV) it seems to work, but with my second device a LG Optimus 4xhd it doesnt work. In my onResume
Solution 1:
you using mainLooper
so don't create any thread and do all the , and do some thing like this:
public boolean onOptionsItemSelected(MenuItem item) {
// TODO Auto-generated method stub
switch(item.getItemId()){
case R.id.search_devices:
if(!isWifiP2pEnabled){
Toast.makeText(this, "enable wifi p2p", Toast.LENGTH_LONG).show();
return true;
}
onInitiateDiscovery();
manager.discoverPeers(channel, MainActivity.this);
default:
return super.onOptionsItemSelected(item);
}
Post a Comment for "Why Do I Always Get Busy When Using Wifip2pmanager?"