Code example for HttpHost

0
		// Set Click Listener 
		btnLogin.setOnClickListener(this);
	} 
 
	public void getStatus() { 
		HttpHost host = new HttpHost(server, port, "https");
		JSONRPCClient client = JSONRPCClient.create(host, "/", username, password);
		client.setConnectionTimeout(2000);
		client.setSoTimeout(2000);
		 
		String[] params = {};
		 
		SimpleDateFormat formatter = new SimpleDateFormat("yyyy.MM.dd G 'at' hh:mm:ss a zzz");
		Date currentTime_1 = new Date();
		String dateString = formatter.format(currentTime_1);
				 
		tv.setText(dateString + "\n------------\n");
		try { 
			String out = client.callString("getinfo", (Object[]) params);
			org.json.JSONObject object = new JSONObject(out);
			double balance = object.getDouble("balance");