How to send data from fragment to recycler view

So i am trying to pass the amplitude data from fragment to recycler view and update the visualiser but i am not able to send the amplitude continuously it goes for the first time and that’s it here is what i have used
I am able to get the continue data in the onVolumeChanged method but i am not able to send it to the recycler view
fragment code

    public void onVolumeChanged(int volume) {
    try {
        waveview.updateAmplitude((float) volume / 20, true);
        audiolists.get(first_view.visible_pos).setWaveamp(volume);

        Log.e("wavedata", volume + "");
        Log.e("wavedata_volumedata",audiolists.get(first_view.visible_pos).getWaveamp()+"");
      //  first_view.notifyDataSetChanged();
        first_view.notifyItemChanged(first_view.visible_pos);

    } catch (Exception e) {

    }

}

recycler view code

 if (holder.waveview.getVisibility() == View.VISIBLE) {
                holder.waveview.updateAmplitude((float) all_folder.get(position).getWaveamp() / 20, true);
                Log.e("wavedata1", all_folder.get(position).getWaveamp() + "");
            }

Source: Android Questions

LEAVE A COMMENT