My problem is basically that Android Studio wont deploy my app with my changes in the new code. Heres my case scenario:
I have a wifi direct code working like this (just testing with its methods):
public void peerDiscovery(){
mWifiDirectManager.discoverPeers(mChannel,
new WifiP2pManager.ActionListener() {
@Override
public void onSuccess() {
Log.v(TAG,"Discovery Peers Success");
}
@Override
public void onFailure(int reason) {
Log.e(TAG,"Error on Discovery Peers, code: "+reason);
}
});
}
The above code works and then I decided to change it by adding the method: setPeerDiscoveryHandler(boolean isSuccess);
After the changes my code was as follows:
public void peerDiscovery(){
mWifiDirectManager.discoverPeers(mChannel,
new WifiP2pManager.ActionListener() {
@Override
public void onSuccess() {
setPeerDiscoveryHandler(true);
Log.v(TAG, "Message Sent");
}
@Override
public void onFailure(int reason) {
Log.e(TAG,"Error on Discovery Peers, code: "+reason);
setPeerDiscoveryHandler(false);
}
});
}
But guess what, even after doing this new code and clicking on the Run button, it was like I didnt do nothing! And I realized that was happening after I started to check my logcat and the message:
"Discovery Peers Success"
was being printed, but I had it removed from the code (as you can see in my new code). I tried to rebuild and clean the project, uninstall the application from the mobile before deploying it again, but nothing seems to take effect. Any thoughts about it ?
Thanks in advance for all help guyz.