Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can i programmatically play radio on android?

I have on my s2 a predefined app that lets me listen to radio. It doesn't use the Internet, instead it uses the surrounding radio waves. Is there any way in which i can use that feature to programmatically start the radio and search for radio stations?

like image 349
Charles Avatar asked Oct 10 '22 04:10

Charles


2 Answers

It seems you can't, according to this post in the Android googlegroup.

I guess that the most you can do is launching the radio app via an appropriate intent; I think, however, that these intents belong to a single vendor's SDK (check this presentation from Archos, for instance ).

So, I think that your best bet is to search for similar, vendor-provided api by Samsung

like image 115
Max Lambertini Avatar answered Oct 13 '22 11:10

Max Lambertini


There is no API in the AOSP for FM radio. Thus, you cannot build your application with radio support. At the same time, SE proposed their solution for radio support but it is still not included in the main branch. You can read about it here.

At the same time, in some custom roms you already can find examples how to play with radio. For instance, here is the code of application that is included in the Cyanogenmod. You can build and install this application on your phone and see if it works. If it is then you can build your application basing on this approach.

Also check the answer from the previous message.

like image 38
Yury Avatar answered Oct 13 '22 11:10

Yury