lib/src/main/java/edu/berkeley/boinc/rpc/RpcClient.java
public synchronized boolean reportDeviceStatus(DeviceStatusData deviceStatus) {
		mLastErrorMessage = null;
		mRequest.setLength(0);
		mRequest.append("<report_device_status>\n <device_status>\n  <on_ac_power>");
		mRequest.append(deviceStatus.on_ac_power ? 1 : 0);
		mRequest.append("</on_ac_power>\n  <on_usb_power>");
		mRequest.append(deviceStatus.on_usb_power ? 1 : 0);
		mRequest.append("</on_usb_power>\n  <battery_charge_pct>");
		mRequest.append(deviceStatus.battery_charge_pct);
		mRequest.append("</battery_charge_pct>\n  <battery_state>");
		mRequest.append(deviceStatus.battery_state);
		mRequest.append("</battery_state>\n  <battery_temperature_celsius>");
		mRequest.append(deviceStatus.battery_temperature_celcius);
		mRequest.append("</battery_temperature_celsius>\n  <wifi_online>");
		mRequest.append(deviceStatus.wifi_online ? 1 : 0);
		mRequest.append("</wifi_online>\n  <user_active>");
		mRequest.append(deviceStatus.user_active ? 1 : 0);
		mRequest.append("</user_active>\n </device_status>\n</report_device_status>\n");
		try {
			sendRequest(mRequest.toString());
			SimpleReplyParser parser = SimpleReplyParser.parse(receiveReply());
			if (parser == null)
				return false;
			mLastErrorMessage = parser.getErrorMessage();
			return parser.result();
		}
		catch (IOException e) {
			if(Logging.WARNING) Log.w(Logging.TAG, "error in networkAvailable()", e);
			return false;
		}
	}
/**
	 * Reports the current device state to the BOINC core client,
	 * if not called frequently, BOINC core client will suspend
	 * @return true for success, false for failure
	 */
Reports the current device state to the BOINC core client,
if not called frequently, BOINC core client will suspend
@return true for success, false for failure
Reports the current device state to the BOINC core client if not called frequently BOINC core client will suspend @return true for success false for failure
public synchronized boolean reportDeviceStatus(DeviceStatusData deviceStatus) {
		mLastErrorMessage = null;
		mRequest.setLength(0);
		mRequest.append("<report_device_status>\n <device_status>\n  <on_ac_power>");
		mRequest.append(deviceStatus.on_ac_power ? 1 : 0);
		mRequest.append("</on_ac_power>\n  <on_usb_power>");
		mRequest.append(deviceStatus.on_usb_power ? 1 : 0);
		mRequest.append("</on_usb_power>\n  <battery_charge_pct>");
		mRequest.append(deviceStatus.battery_charge_pct);
		mRequest.append("</battery_charge_pct>\n  <battery_state>");
		mRequest.append(deviceStatus.battery_state);
		mRequest.append("</battery_state>\n  <battery_temperature_celsius>");
		mRequest.append(deviceStatus.battery_temperature_celcius);
		mRequest.append("</battery_temperature_celsius>\n  <wifi_online>");
		mRequest.append(deviceStatus.wifi_online ? 1 : 0);
		mRequest.append("</wifi_online>\n  <user_active>");
		mRequest.append(deviceStatus.user_active ? 1 : 0);
		mRequest.append("</user_active>\n </device_status>\n</report_device_status>\n");
		try {
			sendRequest(mRequest.toString());
			SimpleReplyParser parser = SimpleReplyParser.parse(receiveReply());
			if (parser == null)
				return false;
			mLastErrorMessage = parser.getErrorMessage();
			return parser.result();
		}
		catch (IOException e) {
			if(Logging.WARNING) Log.w(Logging.TAG, "error in networkAvailable()", e);
			return false;
		}
	}
public synchronized boolean reportDeviceStatus ( DeviceStatusData deviceStatus ) { mLastErrorMessage = null ; mRequest . setLength ( 0 ) ; mRequest . append ( "<report_device_status>\n <device_status>\n  <on_ac_power>" ) ; mRequest . append ( deviceStatus . on_ac_power ? 1 : 0 ) ; mRequest . append ( "</on_ac_power>\n  <on_usb_power>" ) ; mRequest . append ( deviceStatus . on_usb_power ? 1 : 0 ) ; mRequest . append ( "</on_usb_power>\n  <battery_charge_pct>" ) ; mRequest . append ( deviceStatus . battery_charge_pct ) ; mRequest . append ( "</battery_charge_pct>\n  <battery_state>" ) ; mRequest . append ( deviceStatus . battery_state ) ; mRequest . append ( "</battery_state>\n  <battery_temperature_celsius>" ) ; mRequest . append ( deviceStatus . battery_temperature_celcius ) ; mRequest . append ( "</battery_temperature_celsius>\n  <wifi_online>" ) ; mRequest . append ( deviceStatus . wifi_online ? 1 : 0 ) ; mRequest . append ( "</wifi_online>\n  <user_active>" ) ; mRequest . append ( deviceStatus . user_active ? 1 : 0 ) ; mRequest . append ( "</user_active>\n </device_status>\n</report_device_status>\n" ) ; try { sendRequest ( mRequest . toString ( ) ) ; SimpleReplyParser parser = SimpleReplyParser . parse ( receiveReply ( ) ) ; if ( parser == null ) return false ; mLastErrorMessage = parser . getErrorMessage ( ) ; return parser . result ( ) ; } catch ( IOException e ) { if ( Logging . WARNING ) Log . w ( Logging . TAG , "error in networkAvailable()" , e ) ; return false ; } }
Reports the current device state to the BOINC core client,
 if not called frequently, BOINC core client will suspend
 @return true for success, false for failure
Reports the current device state to the BOINC core client if not called frequently BOINC core client will suspend @return true for success false for failure