Hi,
I have just discovered Lua and Corona and first impressions are good.
I want to build a very simple music player app.
How do I find all music already on an [android] device so I can use my app to play them?
Thanks,
Paul
Hi,
I have just discovered Lua and Corona and first impressions are good.
I want to build a very simple music player app.
How do I find all music already on an [android] device so I can use my app to play them?
Thanks,
Paul
I’m not sure about the how to find music but I wanted to ask this.
Do you know that corona apps do not run in background or if your phone is off? Let’s say your playing a game and you press the home button… Your all will pause untill opened again.
–SonicX278
Welcome to Corona SDK by the way! You can make many awesome things here!
–SonicX278
On iOS we have an iTunes plugin that you can use. All your music should be there. On Android I’m not sure how standard the music locations are. I know there is a Music folder in the “External” storage area (which may or may not be removable). You can use the LFS functions to scan the folder, if you can find it. Corona does not provide API’s to get the folder path.
But more importantly Corona’s API calls (display.newImage(), audio.loadStream() etc.) don’t know how to use things outside of the app’s sandbox. To make this work, you would have to use LFS to find the file, make sure the SD card is there on devices where it’s removable, copy the song to system.TemporaryDirectory and then use audio.loadSound() or audio.loadStream() (better choice for music).
So it can be done, but it will take some work.
Rob
I’m not sure about the how to find music but I wanted to ask this.
Do you know that corona apps do not run in background or if your phone is off? Let’s say your playing a game and you press the home button… Your all will pause untill opened again.
–SonicX278
Welcome to Corona SDK by the way! You can make many awesome things here!
–SonicX278
On iOS we have an iTunes plugin that you can use. All your music should be there. On Android I’m not sure how standard the music locations are. I know there is a Music folder in the “External” storage area (which may or may not be removable). You can use the LFS functions to scan the folder, if you can find it. Corona does not provide API’s to get the folder path.
But more importantly Corona’s API calls (display.newImage(), audio.loadStream() etc.) don’t know how to use things outside of the app’s sandbox. To make this work, you would have to use LFS to find the file, make sure the SD card is there on devices where it’s removable, copy the song to system.TemporaryDirectory and then use audio.loadSound() or audio.loadStream() (better choice for music).
So it can be done, but it will take some work.
Rob