Cordova Doc Sample Code to working example: Connection