Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Mobile Development
  3. Android
  4. How to create folder in android root folder

How to create folder in android root folder

Scheduled Pinned Locked Moved Android
questionandroidhelptutorialworkspace
3 Posts 3 Posters 9 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    Chi Promoter
    wrote on last edited by
    #1

    I know that there are similar question like this, but none of the solutions work for me.
    I want to create a folder in my root directory like whatsapp but i did not get it to work.
    I was able to create a folder in my package folder but same method did not work for root directory

    //works for creating folder in my package directory
    File pk = new File(this.getExternalFilesDir("/myweb").getAbsolutePath());
    
    pk.mkdir();
    
    
    //this did not work for creating folder in root directory like whatsapp
    File root = new File(Environment.getExternalStorageDirectory() + "/myweb");
    
    root.mkdir();
    

    How can i solve this problem

    L A 2 Replies Last reply
    0
    • C Chi Promoter

      I know that there are similar question like this, but none of the solutions work for me.
      I want to create a folder in my root directory like whatsapp but i did not get it to work.
      I was able to create a folder in my package folder but same method did not work for root directory

      //works for creating folder in my package directory
      File pk = new File(this.getExternalFilesDir("/myweb").getAbsolutePath());
      
      pk.mkdir();
      
      
      //this did not work for creating folder in root directory like whatsapp
      File root = new File(Environment.getExternalStorageDirectory() + "/myweb");
      
      root.mkdir();
      

      How can i solve this problem

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      See the notes at Environment.getExternalStorageDirectory(); Android Developers[^], it may not be available.

      1 Reply Last reply
      0
      • C Chi Promoter

        I know that there are similar question like this, but none of the solutions work for me.
        I want to create a folder in my root directory like whatsapp but i did not get it to work.
        I was able to create a folder in my package folder but same method did not work for root directory

        //works for creating folder in my package directory
        File pk = new File(this.getExternalFilesDir("/myweb").getAbsolutePath());
        
        pk.mkdir();
        
        
        //this did not work for creating folder in root directory like whatsapp
        File root = new File(Environment.getExternalStorageDirectory() + "/myweb");
        
        root.mkdir();
        

        How can i solve this problem

        A Offline
        A Offline
        Andrew Stark
        wrote on last edited by
        #3

        You can easily create folder in root folder by downloading ES file explorer. Just enable hidden files. You can refer to

        mcafee activate

        for more information.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups