returns interger values for boolean callback responses
use a background thread for connect to prevent it blocking the ui thread