public boolean toggleProfile ( Boolean enabled ) { // TODO: make this return values properly BasicNameValuePair [ ] params = { new BasicNameValuePair ( "active" , enabled . toString ( ) ) } ; try { String uri = BASE_PROFILE + uriEncode ( this . _profileName ) + "/" + BASE_CLIENTS + "/" ; if ( _clientId == null ) { uri += "-1" ; } else { uri += _clientId ; } JSONObject response = new JSONObject ( doPost ( uri , params ) ) ; } catch ( Exception e ) { // some sort of error System . out . println ( e . getMessage ( ) ) ; return false ; } return true ; }
Turn this profile on or off