I want to start two threads at the same time. A thread that receives a video and stores it on the smartphone and one that plays the video. Neither are getting but it works separately. How can i do this?
 public void startProgress(View view) {
    ConcurrentLinkedDeque<OutputStream[]> list = new ConcurrentLinkedDeque<>();
  /*  Executor executor = new Executor() {
        @Override
        public void execute(Runnable command) {
            command.run();
        }
    };*/
    Thread t1 = new Thread(new Task2(list));
    Thread t2 = new Thread(new Task(list));
    t1.start();
    t2.start();
   /* executor.execute(t1);
    executor.execute(t2);*/
}
Thank you.