I am creating an app which plays an audio (Player).
How can i keep my app running in the background when the screen goes to sleep?
Acording to an advice http://puravidaapps.com/countdown.php the videoplayer (1x1) don't prevent an app from a stop.
A notifier don't allow to switch off an screen - so a phone quickly looses an energy.
--
You can use WebViewer + html5 Audio tags.
You can test my Sample app: https://play.google.com/store/apps/details?id=appinventor.ai_peep_prants.Audioboard
It play audio streams and mp3 files.
Audio (mp3) files you find in left upper corner :)
Also it can play backround and also "STOP" audio if call come in.
In mobile device Autoplay is disabled, that mean you need press PLAY when app start.
--
I don't understand how to use WebViewer + html5 Audio tags in MitAppInvertor. Can you explain?
--
I made test file for you. It works OK in my LG G2 (KitKat 4.4.2)
It contain simple html file what play audio stream this shoutcast station: http://www.chilloutradio.tk/
--
Thank you for this solution, but it doesn't suit to me, because I want that my app doesn't sleep as I want to have active the GPS and the app should make some work.. not only play audio.
--
You ask: "I am creating an app which plays an audio (Player).
How can i keep my app running in the background when the screen goes to sleep? "
You can try my solution, if screen go sleep, audio still play. If You push "Home" button Audio still play.
--
@Peep: great solution! other people most probably will find this very useful!
--
how we put those codes to appinventor panel?
can u make a tutorial for this? thanks! :D
can u make a tutorial for this? thanks! :D
--
you can find a lot of examples, which use an embedded HTML/JavaScript file here http://puravidaapps.com/tutorials.php#html
--
Why am I not able to install your app on play store?? It says "This app is incompatible with your device." My phone is Lenevo A369i and android version is 4.2 Jelly Bean.
--
I`m not see Lenovo A369i Google Play supported phone list. There is with similar Lenovo`s A360, A360t, A360e and A366t.
Sorry, I can`t add you phone if google not support this :(
--
This is great solution. Peep, Installed your app as well, Looks great. 5*****
How did you auto start playing after loading - in your app.
Is it possible to add external buttons for Play,Pause,volume.
Do I need to create 1 html file each station or is there way to make list of audio source and somehow modify html file.
--
.