问题
Is there any ways to receive IR signals in android?
While searching, I found ways to transmit data from Android devices.
Found this one very useful: https://github.com/rngtng/IrDude
So, is it also possible to receive IR signals generated by other IR transmitting devices like Remotes? If yes, i want to print those signals (hex values) in my app UI. Can anybody give some light on the issue, please... :)
I'm using Galaxy S4 for development.
回答1:
Is there any ways to receive IR signals in android?
Few Android devices have any IR support, let alone some sort of IR receiver. If you build your own device, you are welcome to do what you want.
回答2:
My idea is>> Cameras detect IR LED flashing. Capture the the signal through android camera. if you know the encoding signal of IR transmitter you can decode it. its very interesting question you raised. I wish to work on it if i got time.:)
回答3:
CodigosTutoriales said, "The distance between ear and phone is not detected by IR, it's detected by a proximity sensor"
In fact, IR sensors ARE commonly used in smartphones as the proximity sensor according to wirelessdesignmag and android.stackexchange (search internet for additional confirmation)
This doesn't mean other sensors are not used for that same purpose in some smartphones.
回答4:
EVERY smartphone has an IR transmitter AND and IR receiver.
It is used to detect when your phone is on your ear to disable the touch-screen, so your ear doesn't tap "back" while you are talking.
This IR element is programmable. The IpBike guy uses this in his app; see here: http://www.iforpowell.com/cms/index.php?page=run-time
Some devices (eg: Samsung S6 Edge) have a second IR element as well, pointing a different way, specifically for controlling TVs etc.
来源:https://stackoverflow.com/questions/17525696/is-it-possible-to-capture-receive-ir-signals-in-an-android-application