1. *** New version of B4J is available ***
    B4J v7.8
    Dismiss Notice

Android Question how to browse folders (root or External) to select files

Discussion in 'Android Questions' started by Markos, Jun 4, 2019.

  1. Markos

    Markos Active Member Licensed User

    Hi All

    I need a way to simply browse files from all directories where possible so I may view or edit the files. My first challenge is to find a simple way in Android latest versions to browse External or Root and if it must make a copy to my DirInternal for editing purposes that's fine. Android is now making apps file access almost as difficult as Apple.

    Please advise the best and most easy method to achieve such.

  2. Erel

    Erel Administrator Staff Member Licensed User

    It is very simple to access File.DirRootExternal. You just need to request the storage permission: Runtime Permissions (Android 6.0+ Permissions)

    Once you have the permission you can use the file explorer from the Dialogs library or a different file picker.
  3. Markos

    Markos Active Member Licensed User

    Many thanx Erel. Next I may like to access External SD but seems that is a bit more involved.
  4. Erel

    Erel Administrator Staff Member Licensed User

    BTW, why aren't you using ContentChooser? It will be simpler.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice