How to Update Android's Media Scanner / DB ?
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- Posts: 627
- Joined: Wed Apr 24, 2013 4:53 pm
- Contact:
How to Update Android's Media Scanner / DB ?
Apparently some apps like "Gallery" only show files that have been scanned by Android's media scanning function and added to some database. This happens automatically when the device is first booted. So the problem is, if you built an App that generates a media file like a picture, video, audio, or (in my case ) a MIDI file from scratch, some other apps might not see the file until you reboot your device. For example, I've made a little piano-roll style Drum beat creator (uses Android's basic MIDI synth for playback), It exports beats as ".mid" standard MIDI files to the root of the SD card, I open up Samsung's awesome mobile DAW SoundCamp and go to import the beat into my project and it's not in the list. I reboot my phone and try again and there it is and imports fine. My understanding is that there are Java routines for updating this mechanism on the fly, is there anyway to do it from LiveCode script? It seems like it would be an import thing for a lot of different apps.
Re: How to Update Android's Media Scanner / DB ?
The problem is of the gallery apps.
When you stop using an app without closing it, the app froze.
So when you start to use again the app, the app thinks that nothing happened.
If you really close the app using the clean button (botton right button and then the sweeper), when you launch again the app it rescans folders. No need to reboot.
This is a gallery app problem, not a Livecode problem.
Some filemanager or good gallery every n seconds rescan the current folder or folders.
When you stop using an app without closing it, the app froze.
So when you start to use again the app, the app thinks that nothing happened.
If you really close the app using the clean button (botton right button and then the sweeper), when you launch again the app it rescans folders. No need to reboot.
This is a gallery app problem, not a Livecode problem.
Some filemanager or good gallery every n seconds rescan the current folder or folders.
Livecode Wiki: http://livecode.wikia.com
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w
-
- Posts: 627
- Joined: Wed Apr 24, 2013 4:53 pm
- Contact:
Re: How to Update Android's Media Scanner / DB ?
I know this is an old thread now but...
No it's not just a gallery app problem. I'm not even working with image data. I'm generating MIDI files from LiveCode and then trying to use them with Samsung's SoundCamp Mobile DAW. The SoundCamp app doesn't see them until reboot because media scanner doesn't rescan unless told to by an app, except for when the device first boots.
No it's not just a gallery app problem. I'm not even working with image data. I'm generating MIDI files from LiveCode and then trying to use them with Samsung's SoundCamp Mobile DAW. The SoundCamp app doesn't see them until reboot because media scanner doesn't rescan unless told to by an app, except for when the device first boots.
Re: How to Update Android's Media Scanner / DB ?
The file exists and every app can reach it using the path.
Try to use the phone file manager, go to the file, click it and select SoundCamp Mobile DAW to open it.
For example if you save on SDCARD, the path is /mnt/sdcard/.
Try to use the phone file manager, go to the file, click it and select SoundCamp Mobile DAW to open it.
For example if you save on SDCARD, the path is /mnt/sdcard/.
Livecode Wiki: http://livecode.wikia.com
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w