It is of great significance to extend the android SL4A video camera service to pc desktop and mobile phone applications for the scripting languages, such as JavaScript and PHP. In this paper, we propose a method based on SL4A, script language and HTTP communication protocol to expand SL4A video service, and design and implement a mobile video surveillance system. Firstly, the system is designed as a system composed of mobile phone camera monitoring server and web client, and then the camera image data of the mobile phone camera monitoring server is collected by SL4A, and then the image data is transmitted according to the HTTP protocol, and lastly the system is developed by PHP scripting language. The experimental results show that the method can expand the mobile video camera service to pc and other mobile phone applications, and has the advantages of simple implementation, easy integration and cross-language.
0.IntroductionThe replacement of smart phones is very fast, which led to the high elimination frequency of old mobile phone. Smart phones are usually equipped with high-definition camera. If mobile phone camera can be integrated into the pc or mobile phone applications, then old phone will continue to play an important role, it will be a very meaningful thing.On the old mobile phone camera re-use, there are two kinds of common methods, one method is to use the third party software[1], such as IP Webcam and DroidCam, to display mobile phone camera video ,and the other is to use Java language to develop new features about camera [2][3]. The method of using the third party software to reconstruct the old mobile phone camera has the advantages of simple realization, supporting the original data of the sensor, good compatibility with the client and high image quality, but it has disadvantages of mobile phone camera image data and processed sensor data integration difficulty and high cost, and it's difficult for developers to pull together processed geographic sensor data and image data. The advantage of using Java language to develop application for old mobile phone camera is that the function is flexible and a strong real-time is perfect. However, because Java language, video coding and other complex technologies need to be mastered, so there are some problems such as slow progress and high cost.We present the method of the paper to design and develop a mobile phone camera application, which is based on SL4A to collect images of the mobile phone, transfer images with the HTTP communication protocol, and use PHP script language to develop the application. is an android application that the first name is ASE(Android Scripting Environment), and its function is to support the development of android applications using scripting languages, which makes android application development easier and faster.SL4A is developed and maintained by Google Corporation employee Damon Kohler, and it supports a lot of scripting languages, including Python, Perl, JRuby, Lua, BeanShell, JavaScript, Tcl and shell, etc.