termux-api icon indicating copy to clipboard operation
termux-api copied to clipboard

Question: Open a directory in the default file manager

Open nozwock opened this issue 2 years ago • 3 comments

I'm aware of xdg-open and termux-open for opening files in their respective default applications, but how could I go on about opening some directory in the default file manager?

nozwock avatar Jul 05 '23 16:07 nozwock

I activated ssh daemon on port 2221, and used Cx File Manager sftp feature to access termux home directory on localhost. Screenshot_20230809-110649

drui9 avatar Aug 09 '23 08:08 drui9

maybe you can create wrapper will default app activities and based on extension regex use am start to open files in those default app using case ba

tathastu871 avatar May 18 '24 03:05 tathastu871

@nozwock

am start -a android.intent.action.VIEW -d '/storage/emulated/0/Download' -t 'resource/folder'  -n com.cxinventor.file.explorer/com.alphainventor.filemanager.activity.LaunchActivity
  • -d ... is for the directory
  • Omit the -n ... to open in default app/show app chooser

elig0n avatar Aug 11 '24 11:08 elig0n