Using Wakelocks for radio streaming app.

14 views
Skip to first unread message

kevdaci

unread,
Aug 23, 2016, 4:02:40 PM8/23/16
to Kivy users support
Hello.  About a couple of weeks ago, I asked a question about developing an application that would  stream a radio station in the background. I've been told to use a service for streaming the station in the background, which I did develop. The app streams the station in the background. The radio streams while I am using other applications. The radio also streams  when the screen is off, but only for a certain amount of time, not indefinitely. That is the problem that I want to address. I've looked up on how to use Wakelocks for my application using Android, so I could make the app stream the station indefinitely. I have tried to implement the code using Android and PyJnius; however, when I build and run the application on my mobile device, the app does not stream anything at all.

Files of the project are attached below.

If you go to the main.py file in the service directory, lines 23-27 are the code for using the Wakelocks. If I comment those lines, the app streams the radio station. If I uncomment those lines, the app does not stream anything at all. I want the application to stream the station and run indefinitely while the screen is off. Can somebody help me, please?

Thank you,
Kevdaci
radio.zip
Reply all
Reply to author
Forward
0 new messages