public void startEndpoint(int id) { if (this.clients.get(id) == null) { Endpoint endpoint = this.endpoint_manager.get(id, true); Client client = new Client(endpoint); client.setLogger(this); this.clients.put(id, client); endpoint.enabled = true; client.start(); Toast.makeText( this, String.format( Locale.ENGLISH, this.getString(R.string.endpoint_started), endpoint.toConnectionString()), Toast.LENGTH_SHORT) .show(); } }