Daler
Daler

Reputation: 1205

Cant see a folder via WIndowsExplorer

I have created a folder in SdCard using a code below:

if (Environment.MEDIA_MOUNTED.equals(state)) {
        // We can read and write the media

        Log.v("Storage","ablo to read and write");
        //create Beatss folder
        File direct = new File(Environment.getExternalStorageDirectory() + "/Beatss");
            boolean success = true;
            if (!direct.exists()) {
                success = direct.mkdir();
            }

I can see that this folder has been created through DDMS. When I connect phone via USB to computer and explore the sdCard i dont see this folder. However, as I mentioned I can see it via DDMS. What is wrong?

Upvotes: 1

Views: 224

Answers (1)

Kanth
Kanth

Reputation: 6751

If the device's version which your app is running on is Android 3.0+, you also have to use scanFile() on MediaScannerConnection before it will be actually displayed on a File Explorer of PC. Just refer this for confirmation. If you still have doubts on how to do this, just lemme know, will edit my answer.

Upvotes: 1

Related Questions