Search code examples
javaandroidstorageexternal

Alternate methods to access external downloads folder on sdcard android studio


To the point. I've tried using this to a button on my app to access the sdcard downloads folder but the only thing i get in return is the sound of tapping a button and nothing more:

btPastaVideos.setOnClickListener(new View.OnClickListener(){
         @Override
         public void onClick(View v){
         Environment.getExternalStoragePublicDirectory(DIRECTORY_DOWNLOADS);
         }
      }
    );

Any suggestions?


Solution

  • Try,

    startActivity(new Intent(DownloadManager.ACTION_VIEW_DOWNLOADS));