2017 International Conference on Computer Science and Application Engineering (CSAE 2017) ISBN: 978-1-60595-505-6 Design and Implementation of a Multi-Function Data Acquisition System based on Android Platform Yuexia Zhang *, Chen Shuang and Ma Jie School of Information and Communication Engineering, Beijing Information Science & Technology University, 100101 Beijing, China ABSTRACT In this paper, aiming at the requirement of data information convenience acquisition, a multi-function data acquisition system based Android platform was designed and implemented. The system consists of login and verification module, data acquisition module and system setting module. It has a multi type data acquisition function which has been tested and verified. The data collected by this system includes image, video, audio, geography and so on. The system has the advantages of friendly interface, convenient operation and various functions. INTRODUCTION With the development of the information process, people are surrounded by a variety of information and data. Information data has become the most important resource and wealth of present and future. It is very important to obtain and collect data in a timely and convenient way. Therefore, it is of great significance to study the method of collecting and processing data information conveniently and effectively [1]. The traditional data acquisition system is based on PC and other large hardware devices as the operating terminal. It is easily affected by the user's environment and can only collect the relevant data in the designated location. In addition, the system has certain requirements for the objective conditions of the working field[2]. Meanwhile, the system is generally applied to the professional field. The collection function of the system is single and the main data acquisition types of the system are pictures and text. Content service is becoming the inevitable trend of Internet development. But, the traditional data acquisition system is difficult to meet the needs of current users for data collection because of the small amount of data collected. Therefore, there is a need for a convenient data acquisition system that can supports a variety of data types. In this paper, a multi-function data acquisition system based on Android is designed. The system is based on the Android smart phone platform. It consists of login and verification module, data acquisition module and system setting module. It has a multi type data acquisition function which has been tested and verified. The data collected by this system includes image, video, audio, geography and so on. The system has the advantages of friendly interface, convenient operation and various functions. 314
ANDROID PLATFORM The Android platform is developed using the Eclipse + ADT plug-in method. The Android operating system has open source and it allows developers to have a high freedom of authority without having to pay a fee. The system is developed based on version 5 of Android, which can make the data acquisition system has larger memory space[3]. Eclipse is a Java-based software development platform. It implements different languages by installing different plug-ins and completes the development of functions. To create, run and debug the android application more quickly and easily, the android development team customized a plugin for the Eclipse IDE, which is called Android Development Tools (ADT). The user can click the Help directory in the Eclipse platform software and select Install to download the ADT autocomplete installation. The flow chart for the development environment is shown in Figure 1. The Android development platform needs to be built in the Java environment, so the first thing to do is to configure the Java environment. In this system, the Java language software development kit (JDK) uses a more stable, mature version of JDK1.7[4]. After the installation is complete, the Developer completes the configuration of the Java environment variable in the advanced system settings of the computer. The developer installs the Eclipse software and the ADT plug-in. Finally, developer creates a virtual Android device in the Android Virtual Device Manager to test and debug the development of the Android program[5][6]. Start Setup JDK1.7,Configure JAVA environment variables Setup Eclipse and ADT plugin Create a new virtual Android device End Figure 1. The flow chart for the development environment. THE DESIGN OF SYSTEM The Design of Function Considering the privacy security of the Android multi-function data acquisition system, it added login and registration functions. The system needs to have a multi type data acquisition function which can get images, video, audio, geospatial information and so on. Meanwhile, in order to optimize the system interface, enhance user experience and convenient operation, the system needs to add other auxiliary functions. The functions of each part of the system designed are as follows: 1) The function of login and registration In the main interface, the user clicks on the registration button to enter the user's registration interface, fill in the user name, password which are stored in the system's fixed file. When the user clicks the button after entering the account information, the interface will prompt whether the login is successful [7]. 2) The function of multi-type data acquisition The system can collect different types of data according to user's choice, including picture, video, audio and geographic location information. The collected data list is displayed to realize the functions of viewing and deleting data. 315
3) The function of auxiliary The system can provide users with the current relevant auxiliary information, such as electricity, CPU temperature and status, network connection status and other information. The Design of Plan In order to improve the efficiency and availability of the code, the system based on the functional requirements analysis and modular thinking is divided into three modules, login and verification module, data acquisition module and system set up module. The overall scheme of the system is shown in Figure 2. The login and verification module is the basic module of the system. It is mainly responsible for user account information login and verification. It is the first step and the necessary way to enter the Android multi-function data acquisition system. Then the user can collect different data through the system's multi-type data collection function The data acquisition module is the core module of the system, which is mainly responsible for the collection of different types of data. It is divided into audio acquisition sub-module, video acquisition sub-module, image acquisition sub-module and location information acquisition sub-module. The audio acquisition sub-module mainly uses the microphone to obtain audio data and record it into the audio file to save. The video acquisition sub-module mainly acquires video format files through the camera and the video format files are saved. Video data files occupy larger memory space. The image capture sub-module captures the image format file by the camera and saves it. The location information acquisition sub-module obtains the longitude and latitude information of the current position by calling the GPS sensor of the mobile phone. So the system can realize the function of collecting the position information. The system setup module includes the system information view module and the system settings modification module, which are responsible for providing the system operation status information and the user password modification work. The data collection system Login and verification module Data acquisition module System Setup Module Audio collection Video collection Image collection Location information collection System information view Modify system settings Figure 2. Overall system plan. The Design of System The multi-function data acquisition system based on Android is a mobile information application which can collect a variety of data types. The system flow chart is shown in Figure 3. 316
Enter the system Landing interface Login information file Modify the login information Data acquisition interface Part of the system information display Software settings Get location information Collect audio Collect video Collect images Get the current latitude and longitude from GPS Turn on the microphone and start collecting Turn on the camera and start collecting Turn on the camera and start collecting Directly get latitude and longitude data End the acquisition stop using the microphone End collection Close the camera End collection Close the camera Collection ends save data Save the generated data file Exit system Figure 3. System flow chart. After entering the multi-function data acquisition system, the login interface appears first. The user needs to enter the account information and wait for verification. The user can enter the data acquisition interface after system verification. If the information entered by the user is wrong, the system will automatically prompt "Username or password error"[7]. When the user enters the data acquisition interface and selects the type of data that needs to be collected, the system begins to collect data. Users need to call the device microphone when collecting audio. When the user collects image and video data, the user can call the camera of the device by setting the parameter command of the camera. The collected audio, video and image data are automatically generated into the corresponding data files and saved to the local default path folder. The user can delete, view the data records by pressing the data records stored in the folder for a long time. When the location data is collected, the user can directly see the longitude and latitude information obtained from the GPS sensor built in the terminal device and no corresponding data files need to be generated. After the data acquisition is completed, the user can also click on the system settings to check the system running status, modify the password and do some other operations. Then, the user can exit the system. THE IMPLEMENTATION OF SYSTEM When the user enters the data acquisition system, the first appears is the login and registration interface. The login and registration interface diagram is shown in Figure 4. The registration information will be used as a sign of all activities within the system. The user implements the registration function by writing code into the RegisterActivity.java under the com.example. androidtemplate package. 317
The login interface is used to verify the correctness of the user's account information. The user implements the login function by writing code into the com.example.androidtemplate package under LoginActivity.java. Figure 4. Login and registration interface figure. Images, audio, video, and location information are collected by the Intent command, Camera Activity, MediaRecorder class, and LocationMangager. The data acquisition results are shown in Figure 5. Figure 5. Data acquisition result chart. The auxiliary function information of the system is shown in Figure 6. The user obtains the system power information by command batteryreceiver, define the getversion to read system version information, define the getcpuinfo to obtain the system CPU information and define isopennetwork to judge the current network connection. Figure 6. System auxiliary function information. 318
The function test shows that the system is stable, the interface is friendly. It realizes the design of various functions, including user login and registration functions, multi-type data acquisition and system auxiliary functions. Meanwhile, it also has the function of checking the user login information, the querying and deleting function of the data collection, and modifying the user password function. CONCLUSIONS In this paper, a multi-function data acquisition system based on Android is designed and implemented. It consists of login and verification module, data acquisition module and system setting module. It can realize multi-type data acquisition including image, audio, video and location information. It has the advantages of convenient operation, diversity of collection function and wide applicability. The interface of the system is friendly. After testing, the system runs stably. ACKNOWLEDGMENT This work was supported by the National Natural Science Foundation of China (No.51334003, No.61473039), the Introduction and Training Program of high level talents in Beijing municipal colleges and Universities (No.CIT&TCD201504058), and the Beijing Information Science and Technology University Graduate Education Quality Engineering Project (No.5121724107). REFERENCES 1. Qi-Jiang Y. U., Gao F., Liu X. and Bao Y. 2017. Design and implementation of a partitioned multi-data acquisition system based on chip CC2530, J. Journal of Yunnan Minzu University, 25(2):122-131. 2. Hong J. I., Amp N., and Center I. M. 2016. Research and Application Development of Digital Library Based on Android System Platform, J. Computer Knowledge & Technology, 38(1): 31-40. 3. Zhu S., Mou X., and Shan K. 2013. Based on the Android platform application development research, J. Network Security Technology & Application, 205(5): 41-46. 4. Chen H. and Xiao K. 2011. The design and implementation of the geological data acquisition system based on mobile GIS, J. Radio Engineering, 211(2):1-6. 5. Krishnan J., Khambete N. D. and Benjamin B. 2013. A Real time Data Acquisition and Monitoring Device for Medical Applications based on Android Platform, J. International Journal of Advanced Computer Research, 103(12) : 107-109. 6. Yan-Jun M. A., Zhang H. and Xin-Min L. I. 2016. Design and Implementation of High-speed Data Acquisition System Based on LTC 2270, J. Radio Engineering, 6(3): 62-67. 7. Ranasinghe A. C., Rasnayake L. K. and Kalyanapala M. 2013. Reconfigurable universal sensor interface for distributed wireless sensor nodes, International Conference on Advances in ICT for Emerging Regions, Dec11-Dec15, 2013. 319
APPENDIX I The code for the registration function is designed as follows: public void onclick(view view) { switch (view.getid()) {... case R.id.register_btn: String username = username Et.getText().toString(). trim(); String password = passwordet.gettext().tostring(). trim(); String password2=password2et.gettext().tostring().trim(); if(textutils.isempty(username) TextUtils.isEmpty(password) TextUtils.isEmpty(password2)){ T.showToast(this_," Please fill in your username or password "); else{ if(!password.equals(password2)){ T.showToast(this_," The password input is not the same "); else{ T.showToast(this_," Registration successful, please login "); finish(); The code for the auxiliary function information of the system is designed as follows: registerreceiver(batteryreceiver, new IntentFilter(Intent.ACTION_BATTERY_CHANGED)); protected void recycle() { if(batteryreceiver!=null){ unregisterreceiver(batteryreceiver); public void onreceive(context context, Intent intent) { int level = intent.getintextra("level", 0); diantv.settext(level+"%"); ; 320