0

We want to access all the radio frequencies available near Android device. Is there any API available for the same? Can we scan frequency without attaching headphones, given that some radios won't start up without the headphones (used as an aerial)?

halfer
  • 19,824
  • 17
  • 99
  • 186
Pradeep
  • 6,303
  • 9
  • 36
  • 60
  • yes you are right about must be, but in SDK or in NDK?and what do you think is this a device specific feature or an OS specific one? :) –  Jan 09 '13 at 21:18
  • Frankly, I don't have any idea, I tried searching but I didn't found relevant results – Pradeep Jan 09 '13 at 21:20
  • 1
    I have played with camera, only theoretically is platform independent in SDK, it can be obtained the desired results via JNI, but not from pure java SDK code –  Jan 09 '13 at 21:21
  • Oh great!, Can you guide me on code? If we design it using JNI, Would this be compatible with every android device? – Pradeep Jan 09 '13 at 21:23
  • it will be compatible with the same device type/model. What do you think it would run and scan radio in my device, in which has a diff chipset, without radio? -ofc not –  Jan 09 '13 at 21:31
  • Just checked: my Samsung Europa has an FM radio, for which the headphones need to be plugged in. Not tried that before! @pradeep, what particular device do you have in mind? – halfer Jan 09 '13 at 21:55
  • I was thinking of all generic android devices, Btw, I use Samsung S Advanced – Pradeep Jan 09 '13 at 22:04
  • possible duplicate of [How to make an FM Radio Application in Android](http://stackoverflow.com/questions/8559612/how-to-make-an-fm-radio-application-in-android) – halfer Jan 10 '13 at 17:39
  • Also, interesting answer here: http://stackoverflow.com/questions/8970266/fm-radio-app-for-android?lq=1 – halfer Jan 10 '13 at 17:40

1 Answers1

1

We want to access all the radio frequencies available near android device. Is there any API available for the same.

Not in standard Android.

Since we have radio inbuilt in the device there must be some API available for scanning the stations

I would venture that less than 1% of Android devices have any sort of "radio" that has "stations". If you happen to have a device that has an AM, FM, shortwave, or similar sort of "radio", you are welcome to contact the manufacturer of that device to see if they have some sort of means to allow you to control it.

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491
  • I suspect the "without attaching headphones" is a reference to devices that use the headphones as a radio aerial. For those that do, they often refuse to start the radio unless the headphones are plugged in, so oddly the headphones may have more to do with radio reception than is immediately obvious `:)`. Edit: just discovered that mine does exactly this. – halfer Jan 09 '13 at 21:52
  • May I ask what was wrong with my edit? I thought it added some clues as to what the OP (or anyone interested in the same) might check. – halfer Jan 10 '13 at 20:35
  • @halfer: Your edit duplicated your comment and therefore the edit was superfluous. Also, different people have different attitudes towards major edits of a question, and I am one who does not care for that much. I rarely edit a question (almost exclusively to add tags or fix formatting problems), and I cannot remember ever editing an answer (other than my own). Since what you disliked about my answer was my note involving the headphones, I simply removed that portion of the answer. – CommonsWare Jan 10 '13 at 20:41
  • Ah, I see. Okay, my comment can act as an addendum. However I'd recommend in general accepting edits where you get things wrong (rare I am sure!) since it is better than getting a downvote. – halfer Jan 10 '13 at 20:53
  • Further addendum to this answer, for anyone interested: if you can find source for an existing radio application (such as the one bundled on Samsung devices - which may not be open source) then you will be able to find out if the refusal to start without headphones is at application or OS level. – halfer Jan 10 '13 at 20:54