I've tried overriding onMasterRegisterFailure in onStart() method. It was still not working as expected. App keeps crashes if users connect to Valid IP but failed to connect to Master.
publisher.addListener(new DefaultPublisherListener<std_msgs.String>() {
@Override
public void onMasterRegistrationSuccess(Publisher<std_msgs.String> registrant) {
Log.w("Publisher:", "Publisher succeed to register: " + registrant);
}
@Override
public void onMasterRegistrationFailure(Publisher<std_msgs.String> registrant) {
Log.w("Publisher:", "Publisher failed to register: " + registrant);
}
});
I've tried overriding onMasterRegisterFailure in onStart() method. It was still not working as expected. App keeps crashes if users connect to Valid IP but failed to connect to Master.