问题
I'm trying to find a way (or find out whether it's possible) to create an android app that can control transmissions on a cellphone's aerial and get it to transmit a desired frequency within the limitations of that particular phone. What is transmitted does not matter -- what matters is that a transmission at a certain frequency is happening. I do not want to do this over Bluetooth, Infrared or WiFi because the range is not long enough. If this cannot be done, the next best thing would be to determine the current operating frequency band of the cellphone for stage 2 (I am aware that this changes, but for the purpose of the app the phone is not moving anywhere).
The second stage (if the first can be done) is to make a second app that can search for a signal with a specified frequency or within a certain frequency band, and determine its strength relative to the phone. The idea is to be able to "search" for the transmitting phone by seeing in which direction the signal increases as you walk, sort of like a metal detector, beeping more frequently when you get closer.
I know this probably involves low-level coding that might be tricky, or not possible on the ADK. If you could think of other ways to get the desired result (the metal detector analogy), that would be great as well. Any help would be greatly appreciated.
Tom
回答1:
I'm trying to find a way (or find out whether it's possible) to create an android app that can control transmissions on a cellphone's aerial and get it to transmit a desired frequency within the limitations of that particular phone
No. It is possible that you could find some Android-powered software-defined radio (SDR) device, which might have an API that you could use. Or, perhaps there is a SDR accessory that you could use in conjunction with a regular Android device. Otherwise, this is not possible from a hardware standpoint, let alone software.
回答2:
Just to add to Commonsware and Luke's answers - in nearly all jurisdictions or countries there will be regulations covering who and what is allowed broadcast over any given frequency (in fact most have laws which even govern which frequencies you are allowed listen to, although these don't tend to be easily or strictly policed...).
There are unlicenced parts of the spectrum which are often used by low powered communications such as Bluetooth, WiFi, CB radio and similar short(ish) range transmissions. As suggested above, interfacing an Android device to a Software Defined Radio that is able to transmit in these frequencies might allow you experiment with your idea. The SDR would have to be a transceiver - one that can transmit rather than just receive which unfortunatly for you rules out some of the cheaper TV dongles which have been shown to allow you build a cheap SDR based receiver such as the ones discussed here:
http://www.rtl-sdr.com/about-rtl-sdr/
http://sdr.martinmarinov.info
回答3:
The closest you're going to get to the antenna of an Android phone is the Telephony API, which is documented here. http://developer.android.com/reference/android/telephony/package-summary.html
Unfortunately, it really isn't adequate for what you're looking for. If both phones have GPS and Data, why not use that? Have the stationary phone transmit it's coordinates to a central location, and have the second phone calculate it's distance from there. Then you can time the beeps based on the distance.
来源:https://stackoverflow.com/questions/20957211/how-to-implement-an-app-that-can-transmit-and-search-for-a-designated-frequency