I'd rather see startMaster() simply wrap the RosCore methods (i.e. newPublicMaster(), newPrivateMaster(), etc.). Additionally, this should happen in a separate thread so that the UI is definitely not blocked. I see you're doing this in the activity. But, if you're doing to do it thee, you may as well not provide a startMaster method here and instead use RosCore directly in the activity.