Hi is there is way to make an android app for Shoutcast client so i can broadcast audio from the internal or external audio to Icecast and Shoutcast servers? like mediacst app and broadcastmyself app , i would like to use library for Shoutcast client instate of pure code
private boolean connect(int p, boolean retrying) { try { this.sock = new Socket(); this.sock.connect(new InetSocketAddress(this.host, p), 5000); this.sock.setSendBufferSize(AccessibilityEventCompat.TYPE_VIEW_ACCESSIBILITY_FOCUS_CLEARED); this.out = this.sock.getOutputStream(); PrintWriter output = new PrintWriter(this.out); output.println(this.password); output.flush(); BufferedReader in = new BufferedReader(new InputStreamReader(this.sock.getInputStream())); String line = in.readLine(); if (line == null || !line.contains("OK")) { this.sock.close(); if (this.listener != null && retrying) { this.listener.onError("Authentification error, please check the password"); } return false; } while (line != null && line.length() > 0) { line = in.readLine(); } this.headers.put("icy-genre", "N/A"); this.headers.put("icy-pub", "1"); this.headers.put("icy-name", "N/A"); this.headers.put("icy-url", "N/A"); for (Map.Entry<String, String> entry : this.headers.entrySet()) { output.println(String.valueOf(entry.getKey()) + ": " + entry.getValue()); } output.println(""); output.flush(); this.connected = true; if (this.listener != null) { this.listener.onConnected(); } return true; } catch (Exception e) { e.printStackTrace(); try { if (this.sock != null) { this.sock.close(); } } catch (IOException e1) { e1.printStackTrace(); } if (this.listener != null && retrying) { this.listener.onError("Connection error, please check hostname/port"); } return false; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)