1

Using the following code I can open Samsung's My Files file browser:

Intent samsungIntent= new Intent("com.sec.android.app.myfiles.PICK_DATA");
samsungIntent.putExtra("CONTENT_TYPE", "*/*");
samsungIntent.addCategory(Intent.CATEGORY_DEFAULT);
startActivityForResult(samsungIntent, 123);

I have tried the following to open a specific location:

File root = new File( Environment.getExternalStorageDirectory( ).getPath( ) + "/myFolder" );
Uri uri = Uri.fromFile(root);
samsungIntent.setData(uri);

I get the following message within a new activity:

All apps associated with this action have been turned off, blocked, or not installed.

Is it possible to specify the start location of My Files Samsung file browser?

I found the following question with no answers:

Samsung My Files explorer: Pick file from specified folder

Community
  • 1
  • 1
Darush
  • 11,403
  • 9
  • 62
  • 60

1 Answers1

1

You can set specify the startlocation in samsungIntent by specifying the FOLDERPATH like below.

Intent intent = new Intent("com.sec.android.app.myfiles.PICK_DATA");
intent.putExtra("CONTENT_TYPE", "*/*");    
intent.putExtra("FOLDERPATH", path);   
intent.addCategory(Intent.CATEGORY_DEFAULT);       
((Activity)Forms.Context).StartActivityForResult(intent, 0);
Darush
  • 11,403
  • 9
  • 62
  • 60
Santyy
  • 166
  • 1
  • 12