title: How I can prompt a file manager into a known path in an android app?
body: <p>I have the following activity in my application:</p>
  <pre><code>public class DisplaySettingsActivity extends AppCompatActivity implements View.OnClickListener {
      
      Button saveIntoFile;
      TextView msg;
  
      private ActivityResultLauncher&lt;String&gt; requestPermissionLauncher;
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_display_settings);
          
          requestPermissionLauncher = registerForActivityResult(new ActivityResultContracts.RequestPermission(), isGranted -&gt; {
              Log.d(&quot;H300s&quot;,&quot;Permissions Callback&quot;);
  
              if (isGranted) {
                  Log.d(&quot;H300s&quot;,&quot;Permission Accepted 2&quot;);
                  saveFile();
              } else {
                  permissionSaveDenied();
              }
          });
  
          this.saveIntoFile = (Button)findViewById(R.id.save);
          this.saveIntoFile.setOnClickListener(this);
      }
  
      private void saveFile(){
          Log.d(&quot;Η300s&quot;,&quot;Saving&quot;);
          String state = Environment.getExternalStorageState();
          if (!Environment.MEDIA_MOUNTED.equals(state)) {
              Log.e(&quot;H300s&quot;,&quot;Unable to detect external storage&quot;);
              saveMsgHandler(null);
              return;
          }
  
          this.saveIntoFile.setEnabled(false);
  
          DateTimeFormatter pattern = DateTimeFormatter.ofPattern(&quot;yyyMMdd&quot;);
          File file = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS);
  
          file = new File( file.getAbsolutePath(),&quot;voip_h300s_&quot;+pattern.format(LocalDate.now())+&quot;.txt&quot;);
          Log.d(&quot;H300s&quot;,file.toString());
          try {
              file.createNewFile();
  
              PrintWriter out = new PrintWriter(new FileWriter(file));
              out.println(&quot;SOME VALUES&quot;);
              out.close();
  
              saveMsgHandler(file.getAbsolutePath());
          } catch (Exception e) {
              saveMsgHandler(null);
          }
      }
  
      @Override
      public void onBackPressed() {
          return;
      }
  
      private void saveMsgHandler(String savePath){
          if (savePath == null) {
              msg.setText(R.string.could_not_save_settings);
              int errorColor = ContextCompat.getColor(this, R.color.error);
              msg.setBackgroundColor(errorColor);
          } else {
              String string = String.format(getString(R.string.save_success),savePath);
              msg.setText(string);
              int success = ContextCompat.getColor(this, R.color.success);
              msg.setBackgroundColor(success);
          }
          msg.setVisibility(View.VISIBLE);
          this.saveIntoFile.setEnabled(true);
      }
  
      private void permissionSaveDenied(){
          msg.setVisibility(View.VISIBLE);
          msg.setText(R.string.could_not_save_settings);
          int errorColor = ContextCompat.getColor(this, R.color.error);
          msg.setBackgroundColor(errorColor);
          this.saveIntoFile.setEnabled(true);
      }
  
      @Override
      public void onClick(View v) {
          if (ContextCompat.checkSelfPermission(this, Manifest.permission.WRITE_EXTERNAL_STORAGE) == PackageManager.PERMISSION_GRANTED) {
              Log.d(&quot;H300s&quot;,&quot;Permission Accepted&quot;);
              saveFile();
          } else {
              requestPermissionLauncher.launch(Manifest.permission.WRITE_EXTERNAL_STORAGE );
          }
      }
  }
  </code></pre>
  <p>And I want once I save the file to be able to prompt into androids file manager and list the saved file. Any provided solution tells me hot to select a path before saving as seen in this <a href="https://stackoverflow.com/a/64123158/4706711">answer</a> or in this <a href="https://stackoverflow.com/questions/59987936/how-to-open-a-file-explorer-and-get-selected-file-path-using-implicit-intent-kot">question</a>, but instead I want just to show the file into device's file manager after I successfully saving it.</p>
  <p>So far, what I've developed is this method:</p>
  <pre><code>public void displayFileIntoFileManager(String path){
          Intent intent = new Intent(Intent.ACTION_GET_CONTENT);
          intent.setType(&quot;*/*&quot;);
          startActivity(intent, 7);
  }
  </code></pre>
  <p>As a method to call from a button, once I saved the file in <code>saveFile</code> method. But how I can provide the path to the intent in order to be shown?</p>
  <p>I just want to list the file into device's file manager.</p>