Li pengjun, Android Project Director of AI totem, finalized the speech subject: Android audio Port Data Communication Development
Topic Introduction: Li Peng will explain how to implement bidirectional communication between audio ports and external devices based on Android audio interfaces based on the development practices of AI totem and hardware.
Personal Profile: Li Peng Jun, AI totem technology, and Android project director. He has many years of experience in Java and J2EE development and is an earlier Android developer in China.
Reporter: using the audio interface on Android, what tricks can we do?
Li Peng Jun: when talking about the data application of audio interfaces, it should be regarded as a wire-controlled headset at the earliest. For mobile Internet and mobile apps, square payments and coin payments are currently well-known overseas. At present, it is quite popular in China to pay by swiping card via lacala mobile phone. We can see their advertisements everywhere in the advertisement bar of office buildings and residential areas. In fact, in addition to payment, this small in-ear monitoring port can also do a lot of things. The audio interface of the mobile phone can be used to remotely control hardware and send signal commands. The biggest obstacle to innovation is imagination. Mobile phone audio interfaces have unlimited application potential.
Reporter: What is the operating mechanism of the android audio interface?
Li Peng Jun: the operating mechanism is not mentioned. In fact, the audio interface is very familiar to everyone. Our first response is listening to music and calling, which is the most basic value and function. The current unified hardware interface on the mobile phone is the earphone audio interface with a 5mm audio interface. Other interfaces, such as the charger interface and USB interface, are not uniform. In addition, the input and output of the audio interface can be processed in the application code, so that you can do something with peace of mind using the audio interface. We can use the output stream of the audio interface as the sending instruction, and the input stream as the receiving instruction.
Reporter: Could you briefly describe how to implement bidirectional communication between audio interfaces? What are the requirements?
First, convert the information entered by the external audio device into a special audio signal (sound) and transmit it to the mobile phone through the audio port. The mobile phone program monitors audio input, and the software parses the input Audio Information (sound) into identifiable instructions. This requires a protocol specification with hardware, which can be customized.
Second, the mobile app can convert the commands to be sent into special audio signals according to the protocol specifications and transmit them through the audio port. In this way, the external device can obtain the Audio Information and parse the command.
Third, to do this kind of development, we need to prepare an Android mobile phone with a 5mm audio interface, an external hardware device based on the audio interface, and a data transmission protocol specification for hardware products. If there is no external audio hardware, you can simulate the audio file of the data stream according to the data transmission protocol specification.
Reporter: How to carry out integrated development of hardware and software? Can you talk about this experience?
Li Peng Jun: the most important thing to note is that the Protocol Specification for defining audio interfaces is very important. Incomplete standardized definition may cause many problems in development. You may need to refresh the firmware later to improve new specifications. A mature specification can meet many development needs. The development process is roughly the same as that of other applications. And the test environment. Hardware support is required. For more information, please go to our IOS/Android training camp. I will bring you more implementation details and development experience.
Interview: http://blog.csdn.net/shiningxyy/article/details/7757204
About: IOS devcamp July 27 | Android devcamp July 28 | Beijing | Crowne Plaza New Yunnan
This is a real meeting for mobile developers. Participants are mainly engaged in mobile development practitioners who exchange, learn, improve, and answer questions, you will rarely see investors, market personnel, celebrities, and people who don't know why to participate in the "Soy Sauce. Participants only have experienced developers and engineers like you.
[Features ]:
-A real IOS/Android Development Technology Conference.
-A platform for enterprises and teams to exchange and learn mobile development technology practices.
-Dev to Dev, from developers and service developers. The course content does not cover any commercial promotion purposes.
-The course covers important aspects of the IOS/Android knowledge system and focuses on the development practices of typical mobile products.
-The domestic senior mobile development expert review team checks all the courses to ensure that all the courses are "no score" and "dry goods ".
-All courses are taught by senior developers. They may not be celebrities, but must be "Technical Experts"
-All participants are mobile developers, engineers and their development team members.
More lecturers and topics are being updated! Please note:
Official Website: http://devcamp.csdn.net/
Blog: http://blog.csdn.net/shiningxyy
Weibo: http://weibo.com/cmdnclub
Forum: http://cmdn.net/