Plaster

java
package com.example.josh.x_control; import android.os.AsyncTask; import java.io.IOException; public class sendJSON extends AsyncTask<String, Void, Boolean> { // static Singleton singleton = Singleton.getInstance(); //using a singleton to have only 1 instance of the networking and in a threadsafe way //private static Socket mySocket = singleton.getSocket(); @Override protected Boolean doInBackground(String... strings) { try { Singleton.output.write(strings[0]); Singleton.output.flush(); } catch (IOException e) { e.printStackTrace(); } return true; } }