title: How to open certain path in the Samsung Android My Files Programmatically
body: <p>I'm using the following code to allow the user to access My Files from a Samsung android device.  I'm trying to open certain path in the My Files when the user press the button.  Right now it will open the default path.  Can you tell me if it is possible to pass the path through when open My Files from Android?  Below is the code that I use. Can you give me the code that will open My Files into certain Path?  Thank you in advance for your help.</p>
  
  <pre><code>public void AccessingFiles(View view) {
      Intent intent = new Intent(Intent.ACTION_GET_CONTENT);
      intent.setType("*/*");
      intent.addCategory(Intent.CATEGORY_OPENABLE);
  
      // special intent for Samsung file manager
      Intent sIntent = new Intent("com.sec.android.app.myfiles.PICK_DATA");
       // if you want any file type, you can skip next line 
      sIntent.putExtra("CONTENT_TYPE", "*/*"); 
      sIntent.addCategory(Intent.CATEGORY_DEFAULT);
  
      Intent chooserIntent;
      if (getPackageManager().resolveActivity(sIntent, 0) != null){
          // it is device with samsung file manager
          chooserIntent = Intent.createChooser(sIntent, "Open file");
          chooserIntent.putExtra(Intent.EXTRA_INITIAL_INTENTS, new Intent[] { intent});
      }
      else {
          chooserIntent = Intent.createChooser(intent, "Open file");
      }
  
      try {
          startActivityForResult(chooserIntent, CHOOSE_FILE_REQUESTCODE);
      } catch (android.content.ActivityNotFoundException ex) {
          Toast.makeText(getApplicationContext(), "No suitable File Manager was found.", Toast.LENGTH_SHORT).show();
      }
  }
  </code></pre>