title: Recycler View pass specific Extras to specific Item
body: <p>I've got an issue with recycler view and service. Each row of recycler view is timer, and i've successfully implemented this construction. Now my service passes extras back, to update my timer but it takes them to each example view holder. I mean if a had added two timers (one minute and two minutes just for example) both of my timers will start flickering. It will take extas chaotically from both of timers and countdown will look like (on each timer) 0:59 1:59 0:58 1:58 and so on here is the code of my rv. Is there a way to pass specific information for specific item? Please help me to solve this issue</p>
  
  <p>Task (model class)</p>
  
  <pre><code>public class Task {
  private String title;
  private String time;
  public String timeLeft;
  
  public Task() {
  }
  
  public Task(String title, String description, String time) {
      this.title = title;
      this.time = time;
  }
  
  public String getTitle() {
      return title;
  }
  
  public void setTitle(String name) {
      this.title = name;
  }
  
  public String getTime() {
      return time;
  }
  
  public void setTime(String time) {
      this.time = time;
  }}
  </code></pre>
  
  <p>My adapter and view holder implementations</p>
  
  <pre><code>public class TaskAdapter extends RecyclerView.Adapter&lt;TaskAdapter.MyViewHolder&gt; {
  
  private Context context;
  private List&lt;Task&gt; taskList;
  private int position;
  private Task task;
  private BroadcastReceiver broadcastReceiver;
  
  
  private enum TimerStatus {
      STARTED,
      STOPPED
  }
  
  public TaskAdapter(List&lt;Task&gt; taskList, Context context) {
      this.taskList = taskList;
      this.context = context;
  }
  
  @Override
  public MyViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
      View itemView = LayoutInflater.from(parent.getContext())
              .inflate(R.layout.cardview_layout, parent, false);
      MyViewHolder holder = new MyViewHolder(itemView);
  
      return holder;
  }
  
  @Override
  public void onBindViewHolder(MyViewHolder holder, int position)
  {
      task = taskList.get(position);
      holder.title.setText(task.getTitle());
      holder.textViewTimeCV.setText(task.getTime());
      holder.startStop(task.getTime());
      holder.startAlert(Long.parseLong(String.valueOf(task.getTime())));
      this.position = position;
  }
  
  
  @Override
  public int getItemCount() {
      return taskList.size();
  }
  
  
  public class MyViewHolder extends RecyclerView.ViewHolder {
  
      private long timeCountInMilliSeconds = 1 * 60000;
  
      public long timeLeft = 0;
  
      public TextView title;
      private TimerStatus timerStatus = TimerStatus.STOPPED;
      private ProgressBar progressBarCV;
      public TextView textViewTimeCV;
      private CountDownTimer countDownTimer;
  
      public MyViewHolder(View view) {
          super(view);
          initViews(view);
      }
  
      private void initViews(View view) {
          title = (TextView) view.findViewById(R.id.title);
          progressBarCV = (ProgressBar) view.findViewById(R.id.progressBarCV);
          textViewTimeCV = (TextView) view.findViewById(R.id.textViewTimeCV);
      }
  
      public void startStop(String minutes) {
          if (timerStatus == TimerStatus.STOPPED) {
  
              // call to initialize the timer values
              setTimerValues(minutes);
              // call to initialize the progress bar values
              setProgressBarValues();
              // changing the timer status to started
              timerStatus = TimerStatus.STARTED;
              // call to start the count down timer
              startCountDownTimer();
  
          } else {
  
              // changing the timer status to stopped
              timerStatus = TimerStatus.STOPPED;
              stopCountDownTimer();
          }
      }
  
      private void setTimerValues(String minutes) {
          int time = 0;
          if (!minutes.isEmpty() || Integer.parseInt(minutes) != 0) {
  
              time = Integer.parseInt(minutes);
          }
  
          // assigning values after converting to milliseconds
          timeCountInMilliSeconds = time * 60 * 1000;
      }
  
  
      private void startCountDownTimer() {
  
  
          Intent startServiceIntent = new Intent(context, TimerService.class);
          startServiceIntent.putExtra(EXTRAS_TIME, timeCountInMilliSeconds);
          context.startService(startServiceIntent);
          Log.d("Service", "startService");
  
          broadcastReceiver = new BroadcastReceiver() {
              @Override
              public void onReceive(Context context, Intent intent) {
                  long millisUntilFinished = intent.getLongExtra(EXTRAS_COUNTDOWN, 0L);
  
                  Log.d("Service", "Smthisreceived");
  
                  task.timeLeft = String.valueOf(timeLeft); // here add left time for timer
  
                  textViewTimeCV.setText(hmsTimeFormatter(millisUntilFinished)); // just handling status bar values
  
                  progressBarCV.setProgress((int) (millisUntilFinished / 1000));
              }
          };
  
          context.registerReceiver(broadcastReceiver, new IntentFilter(COUNTDOWN_BROADCAST_RECEIVER));
          Log.d("Service", "receiverRegistered");
  
      }
  
      private void stopCountDownTimer() {
          countDownTimer.cancel();
      }
  
      private void setProgressBarValues() {
  
          progressBarCV.setMax((int) timeCountInMilliSeconds / 1000);
          progressBarCV.setProgress((int) timeCountInMilliSeconds / 1000);
      }
  
      private String hmsTimeFormatter(long milliSeconds) {
  
          String hms = String.format("%02d:%02d:%02d",
                  TimeUnit.MILLISECONDS.toHours(milliSeconds),
                  TimeUnit.MILLISECONDS.toMinutes(milliSeconds) - TimeUnit.HOURS.toMinutes(TimeUnit.MILLISECONDS.toHours(milliSeconds)),
                  TimeUnit.MILLISECONDS.toSeconds(milliSeconds) - TimeUnit.MINUTES.toSeconds(TimeUnit.MILLISECONDS.toMinutes(milliSeconds)));
  
          return hms;
      }
      private void startAlert(long minutes)
      {
          Intent intent = new Intent(context, MyAlarmReceiver.class);
          intent.putExtra(EXTRAS_NAME, task.getTitle());
          intent.putExtra(EXTRAS_REQUEST_CODE, System.currentTimeMillis());
          PendingIntent pendingIntent = PendingIntent.getBroadcast(context, (int)System.currentTimeMillis(), intent, 0);
          AlarmManager alarmManager = (AlarmManager)context.getSystemService(Context.ALARM_SERVICE);
          alarmManager.setExact(AlarmManager.RTC_WAKEUP, System.currentTimeMillis()+(minutes*MINUTES_TO_MILLIS), pendingIntent);
          Toast.makeText(context, "Alarm set in " + minutes, Toast.LENGTH_SHORT).show();
      }
  }}
  </code></pre>
  
  <p>My Service class</p>
  
  <pre><code>public class TimerService extends Service {
  
  private CountDownTimer ctd;
  private Intent broadcastIntent;
  private int requestCode;
  private long timeCountInMillis;
  
  @Nullable
  @Override
  public IBinder onBind(Intent intent) {
      return null;
  }
  
  @Override
  public int onStartCommand(Intent intent, int flags, int startId) {
  
      new Thread(new Runnable() {
          @Override
          public void run() {
  
          }
      }).start();
  
      Intent notificationIntent = new Intent(this, MainActivity.class);
      requestCode =  (int)(intent.getLongExtra(EXTRAS_TIME, 0L));
  
      timeCountInMillis = intent.getLongExtra(EXTRAS_TIME, 0L);
  
      broadcastIntent = new Intent(COUNTDOWN_BROADCAST_RECEIVER);
  
      PendingIntent pendingIntent = PendingIntent.getActivity(this, requestCode, notificationIntent, 0);
  
      Notification.Builder notification = new Notification.Builder(this)
              .setContentTitle(getTextFromResource(this, R.string.app_name))
              .setContentText(getTextFromResource(this, R.string.your_timer) + " "
                      + getTextFromResource(this, R.string.is_currently_running))
              .setSmallIcon(ic_launcher)
              .setContentIntent(pendingIntent);
  
      startForeground(requestCode, notification.build());
  
      ctd = new CountDownTimer(timeCountInMillis , 1000) {
          @Override
          public void onTick(long millisUntilFinished) {
              broadcastIntent.putExtra(EXTRAS_COUNTDOWN, millisUntilFinished);
              sendBroadcast(broadcastIntent);
          }
  
          @Override
          public void onFinish() {
              stopForeground(true);
  
          }
      }.start();
  
      return START_STICKY;
  }}
  </code></pre>