0

I've created a folder in my program and use MediaScannerConnection to get it visible on Computer. I did just the same as the answer to this question: add a folder in android program

Now the problem is that, on the computer, the folder doesn't show as a folder, but as a blank file. Does anyone knows why this happens and how to get the folder show in correct way? Thanks.

Community
  • 1
  • 1
mtyong
  • 121
  • 1
  • 3
  • 13
  • What happens after you reboot device? – lionscribe Aug 19 '16 at 22:26
  • I've not reboot device yet, and I'm looking for a method that doesn't need rebooting. – mtyong Aug 19 '16 at 23:43
  • Yes, but it will help figure out the issue, knowing that after reboot it's fine or not. – lionscribe Aug 21 '16 at 03:08
  • Thank you for the advice, and I tried to reboot both the computer and the cellphone, and the problem is still there. – mtyong Aug 22 '16 at 16:36
  • So obviously the problem is I. How you make the folder, not in the sync. Are you using `mkdir`? – lionscribe Aug 22 '16 at 16:37
  • I have also tried mkdir(), and nothing changed :( – mtyong Aug 31 '16 at 17:42
  • Problem solved. I tried to use the answer of this question:[create another folder inside the original folder](http://stackoverflow.com/questions/31157882/mediascannerconnectionscanfile-converts-directories-into-files-when-accessing-t) – mtyong Aug 31 '16 at 19:24
  • Problem solved. I tried to use the answer of this question: [create a folder or a dummy file inside current folder](http://stackoverflow.com/questions/31157882/mediascannerconnectionscanfile-converts-directories-into-files-when-accessing-t) – mtyong Dec 08 '16 at 20:32

0 Answers0