I want to check that if my radio button is checked than on another activity it should use local ip and if my radio button is not checked then it should use ip provided by user i m doing it through bundle. I used following code but if condition is giving error Required boolean
Found java.lang.String
so how could i do this thing. I m beginner in Android Studio so don't know much.
Following is the code i used:
SelectRoomActivity
if(rb.isChecked()){
rb.setChecked(true);
SelectRoomActivity.bundle.putString("local","true");
}else{
rb.setChecked(false);
SelectRoomActivity.bundle.putString("local","false");
}
EntranceActivity
if (SelectRoomActivity.bundle.getString("false")){ //error is generated if condition
serverAdress = address; //abc.ddns.net
}
else{
serverAdress = lan; //192.168.1.101
}