Bharat
Bharat

Reputation: 1082

Unable to locate folder created by android app from pc

I have created a small folder by using this code:

public void createFile(View view) throws IOException {
        File file=new File(getExternalStoragePublicDirectory(DIRECTORY_DOCUMENTS),"MyApp");
        Log.d(tag,file.exists()+"");
        Log.d(tag,file.mkdir()+"");
    }

I'm creating this folder to read some csv files that are placed by user.

The problem is that I'm able to see the folder from my mobile but not when on my PC when the mobile is connected.

I've made sure that I changed mode from charging only to file transfer.

Upvotes: 0

Views: 45

Answers (2)

Shashank
Shashank

Reputation: 183

Connect mobile to your PC and try adb shell sync

Upvotes: 0

Bharat
Bharat

Reputation: 1082

For those who face similar problem here is the solution.The folders created are visible only when they contain some files (which we have to place manually and not created by program). Then they are visible.

Upvotes: 1

Related Questions