mirekk36 Member Licensed User Longtime User Oct 7, 2015 #1 Hi, I would like to open a specified folder for example file.DirRootExternal&/myfolder/" with default android applications like "My Files" or something else I try with such code Code: Dim i As Intent i.Initialize(i.ACTION_VIEW, "file://" & File.DirRootExternal&"/myFolder/" ) StartActivity(i) but there is error
Hi, I would like to open a specified folder for example file.DirRootExternal&/myfolder/" with default android applications like "My Files" or something else I try with such code Code: Dim i As Intent i.Initialize(i.ACTION_VIEW, "file://" & File.DirRootExternal&"/myFolder/" ) StartActivity(i) but there is error
Erel B4X founder Staff member Licensed User Longtime User Oct 8, 2015 #2 You should post the error message. Android tries to hide the file system from the user. There isn't any app that can handle this intent. You might be able to open the folder if you use SetComponent to start a specific file manager. Upvote 0
You should post the error message. Android tries to hide the file system from the user. There isn't any app that can handle this intent. You might be able to open the folder if you use SetComponent to start a specific file manager.
mirekk36 Member Licensed User Longtime User Oct 8, 2015 #3 Erel said: There isn't any app that can handle this intent. You might be able to open the folder if you use SetComponent to start a specific file manager. Click to expand... thx, for reply ok but is there some standard name for filemanager in android ? (something like Explorer.exe in windows?) Upvote 0
Erel said: There isn't any app that can handle this intent. You might be able to open the folder if you use SetComponent to start a specific file manager. Click to expand... thx, for reply ok but is there some standard name for filemanager in android ? (something like Explorer.exe in windows?)
Erel B4X founder Staff member Licensed User Longtime User Oct 8, 2015 #4 Based on this answer: http://stackoverflow.com/questions/...der-via-intent-and-show-its-content-in-a-file Try to set the type to "resource/folder" Upvote 0
Based on this answer: http://stackoverflow.com/questions/...der-via-intent-and-show-its-content-in-a-file Try to set the type to "resource/folder"
mirekk36 Member Licensed User Longtime User Oct 8, 2015 #5 Big thanks Erel, now there it's code that is working almost good for me Code: Try Dim i As Intent i.Initialize(i.ACTION_VIEW, "file://" & File.DirRootExternal&"/myFolder/" ) i.SetType( "resource/folder" ) StartActivity(i) Catch Msgbox("Missing default file explorer", "Error") End Try On older Samsung Galaxy S2 I have always error that there isn't any intent to do that, so I put try catch BTW on this old samsung is explorer named "MyFiles" in "settings" .... but it didn't start on newer android phones start some other applications which are registered (maybe) as file explorers Upvote 0
Big thanks Erel, now there it's code that is working almost good for me Code: Try Dim i As Intent i.Initialize(i.ACTION_VIEW, "file://" & File.DirRootExternal&"/myFolder/" ) i.SetType( "resource/folder" ) StartActivity(i) Catch Msgbox("Missing default file explorer", "Error") End Try On older Samsung Galaxy S2 I have always error that there isn't any intent to do that, so I put try catch BTW on this old samsung is explorer named "MyFiles" in "settings" .... but it didn't start on newer android phones start some other applications which are registered (maybe) as file explorers