Background technology
With the raising increased rapidly with living standards of the people of China's economy, smart mobile phone is increasingly popularized, just progressively
As an indispensable part in people's daily life, and the with rapid changepl. never-ending changes and improvements of science and technology also make it that cell-phone function is further powerful,
Using also more and more extensive, shopping online can be carried out with mobile phone, takes pictures, record life video etc..Wherein, urgent feelings are run into
During condition, a kind of custom as people of being alarmed with mobile phone dialing alarm call.Although this type of alarm is simple, fast
Victory, but there are still many drawbacks, for example, cause alert locations information not determine quickly due to region language variations, connect and deal with emergencies and dangerous situations
Member can not describe to be clearly understood that the situation at scene etc. according to the voice of alarm people.
In consideration of it, patent application publication 103905975 " a kind of mobile phone alarming method and device " proposes a kind of mobile phone newspaper
Alarm method, calling mobile phone GPS location and/or architecture obtain the positional information of alarm people and sent by way of short message
To alarm platform.Patent application publication 102831755 " a kind of multi-user's alarm method of intelligent mobile phone terminal " proposes one kind
The multi-user's alarm method realized based on intelligent mobile phone terminal APP.First, APP applications are set up, in service in intelligent mobile phone terminal
Device end sets up Web applications and is connected them by communication protocol;Then, when user needs alarm, intelligent hand is called
The GPS module of machine terminal obtains the current longitude and latitude positional information of user, calls audio collection module to open microphone switch record
User's current sound information processed simultaneously makes intelligent mobile phone terminal timing send the position after conversion to server end by triggering timing device
Confidence ceases and acoustic information;Finally, the information received is stored in lane database by server end according to mobile phone terminal ID, simultaneously
Completed by visualizing the positional information of user corresponding to web displaying different user mobile phone terminal ID and playing its acoustic information
Alarm.
Although prior art solves orientation problem well, and proposes to set up APP applications in intelligent mobile phone terminal, fixed
When transmission location information and live audio information quickly understand field condition to the center of dealing with emergencies and dangerous situations is connect in order to meet the person of dealing with emergencies and dangerous situations, but only
It is inadequate by transmitting live audio information to connecing the center of dealing with emergencies and dangerous situations to make to meet the person of dealing with emergencies and dangerous situations to carry out field condition accurate judgement, and
Alarm people is necessary with meeting the person of dealing with emergencies and dangerous situations to carry out speech exchange.In consideration of it, the present invention is logical in smart mobile phone technology and movement
A kind of multimedia alarm method based on mobile phone A PP is proposed on the basis of the development of communication network technology, alarm people passes through mobile phone newspaper
Alert APP softwares carry out one-touch alarm and carry out speech exchange with meeting the person of dealing with emergencies and dangerous situations, while by field condition with the shape of photo or video
Formula, which is transferred to, to be connect the center of dealing with emergencies and dangerous situations and has accurate judgement to the live situation of alarm in order to meet the person of dealing with emergencies and dangerous situations, and does the long-range finger of the very first time
Wave and deal with emergencies and dangerous situations, and it is that Quick rescue does sufficient preparation that can plan as a whole scheduling all departments.
The content of the invention
It is an object of the invention to propose a kind of multimedia alarm method based on mobile phone A PP, it is intended to solve existing report
Problem present in police's formula, its system architecture is as shown in Figure 1.
The system is by intelligent mobile phone terminal, communication network and connects the part of the center of dealing with emergencies and dangerous situations three and constitutes.The smart mobile phone is whole
End is equipped with mobile phone alarm APP softwares, including locating module, multimedia collection module, network connecting module, coding/decoding module and electricity
Talk about service module;The communication network include data transmission network and public switched telephone network, wherein data transmission network include 2G,
3G, 4G mobile communications network and WIFI network;The center of dealing with emergencies and dangerous situations that connects belongs to three unification command systems or city emergency connection
Dynamic system supplies to carry out data interaction with external network there is provided the webserver with public IP, and completion connects work of dealing with emergencies and dangerous situations.
A kind of multimedia alarm method based on mobile phone A PP proposed by the invention be exactly on the basis of said system come
Realize, for the intelligent mobile phone terminal equipped with android system, the technical scheme used is:It is being configured with
Under AndroidSDK Eclipse development environments, mobile phone alarm APP softwares are developed in advance using Java, Android programming and are pacified
Mounted in intelligent mobile phone terminal, when needing alarm, intelligent mobile phone terminal holder can complete many matchmakers by mobile phone alarm APP
Body is alarmed, and its step includes as follows:
S1 mobile phone alarm APP icons) are clicked on, into APP interfaces.
S2 corresponding alarm button) is clicked on APP interfaces, "Yes" is selected in " being confirmed whether alarm " prompting frame of appearance
To confirm alarm, "No" then returns to APP interfaces.
S3) there is " selection type of alarm " prompting frame, have directly alarm, shoot photo alarm, shoot three kinds of video alarm
Type of alarm is selected for alarm people, while APP backstages call network connecting module by communication network and connect the center of dealing with emergencies and dangerous situations automatically
Set up network connection.
S4) alarm people selects suitable type of alarm to be alarmed and enter corresponding alarm flow, while APP backstages are automatic
Locating module is called to obtain alarm field position information.
S5) coding/decoding module is called to S4 in APP backstages automatically) in obtain corresponding alarm flow data message and alarm scene
Positional information is encoded, and is converted into the packet that can be transmitted, and these packets are dealt with emergencies and dangerous situations to connecing by communication network transmission
Center completes multimedia alarm.
In the above-mentioned step of the present invention, concrete methods of realizing is as follows:
S1 the APP icons described in) are stored under the res/drawable files under engineering catalogue, the APP interfaces
It is friendly, clear, by text information and alarm button district's groups into.The text information is that some are welcome and illustrate how to use APP
Prompt message, the alarm button area is made up of conventional alarm button, and including but not limited to 110,119 and 122 are alarmed
Phone, its core code is completed in res/layout/activity_main.xml files, and pith is as follows:
S2 " being confirmed whether alarm " prompting frame described in) occurs after alarm people clicks on alarm button, and it is illustrated
Figure is as shown in Fig. 2 the purpose so designed is in order to avoid false alarm.Its core code is in src/MainActivity.java
Middle realization, pith is as follows:
" selection type of alarm " prompting frame schematic diagram described in S3 is as shown in figure 3, in its programming thought and S2
" being confirmed whether alarm " prompting frame is similar, will not be described here.And APP calls the network connecting module of intelligent mobile phone terminal then first
The authority of network state was obtained before this, i.e., add code below in AndroidManifest.xml files:
Then the network connection state of current intelligent mobile phone terminal is detected, its code is in MainActivity.java
Realize:
Stringservice=Content.CONNECTIVITY_SERVICE;
ConnectivityManagerconnectivity;
Connectivity=(ConnectivityManager) getSystemService (service);
NetworkInfoacNet=connectivity.getActiveNetworkInfo ();
BooleanisConnect=((acNet!=null) && (acNet.isConnectedOrConnecting
()));
SetMobileDataEnable () method in ConnectivityManager is called to open net if connectionless
Network link block is switched, and sets up network connection with connecing the center of dealing with emergencies and dangerous situations by 2G, 3G or 4G mobile communications network, its core code is such as
Under:
<uses-permissionandroid:Name=" android.permission.INTERNET "/>
connectivitysetMobileDataEnable(true);
Socketclient=newSocket (" xxx.xxx.xxx.xxx ", xxxx);
Alarm flow described in S4 has 3 kinds:Directly video alarm is alarmed and shot to alarm, shooting photo.Its is specific
Flow content and implementation method are as follows:
Direct alarm flow:After alarm people selects direct type of alarm to be alarmed, intelligent hand is called on APP backstages automatically
The telephone service module of machine terminal, directly dials the alarm number being pre-stored in APP, and voice call company is obtained with connecing center of dealing with emergencies and dangerous situations
Connect, it realizes that core code is as follows:
// obtain dialing authority
<uses-permissionandroid:Name=" android.permission.CALL_PHONE "/>
// dialled
Uriuri1=Uri.parse (" tel:xxx”);
Intentcall1=newIntent (Intent.A5CTION_CALL, uri1);
startAcitivity(call1);
Shoot photo alarm flow:After alarm people's selection, which shoots photo, is alarmed, APP calls intelligence in backstage first
The camera that energy mobile phone terminal is carried, for alarm people's floor photo, alarm people has shot click " transmission " after scene photograph,
Then on the one hand photo is sent to the center of dealing with emergencies and dangerous situations that connects by APP backstages by the cordless communication network in S3, on the other hand calls automatically
Telephone service module is set up voice call with connecing the center of dealing with emergencies and dangerous situations and is connected.Its camera for calling intelligent mobile phone terminal to carry, which is shot, to be shone
The core code of piece is as follows:
Intentcapture1=newIntent (MediaStore.ACTION_IMAGE_CAPTURE);
startActivityForResult(capture1,TAKE_PICTURE);
Shoot video alarm flow:After alarm people's selection, which shoots photo, is alarmed, APP calls intelligence in backstage first
The camera that energy mobile phone terminal is carried, for alarm people's floor video, alarm people has shot click " transmission " after scene photograph,
Then on the one hand live video is sent to the center of dealing with emergencies and dangerous situations that connects by APP backstages by the cordless communication network in S3, on the other hand automatic
Call telephone service module to set up voice call with connecing the center of dealing with emergencies and dangerous situations to be connected.Its camera for calling intelligent mobile phone terminal to carry is clapped
The core code for taking the photograph video is as follows:
Intentcapture2=newIntent (MediaStore.ACTION_VIDEO_CAPTURE);
startActivityForResult(capture2,RECORD_VIDEO);
Locating module acquisition alarm field position information is called to be by calling intelligent mobile phone terminal to carry described in S4
GPS location function or/and cellular base station positioning function complete, preferred GPS location, what is obtained is the warp at alarm scene
Position Latitude information, its core code is as follows:
Being encoded to the alarm flow information and alarm field position information obtained by S4 described in S5, is to be based on
What the X264 in the Encoder that increases income H.264 was completed, its core code is as follows:
This method is suitable to the intelligent mobile phone terminal equipped with android system or the intelligence of iOS or WindowsPhone systems
Mobile phone terminal.
Implement a kind of multimedia alarm method based on mobile phone A PP proposed by the present invention, have the advantages that:
(1) alarm method of the present invention is to install mobile phone alarm APP on intelligent mobile phone terminal to complete, and intelligence
Mobile phone is increasingly popularized, therefore the present invention has convenience.
(2) alarm method of the present invention is GPS location or/and architecture using intelligent mobile phone terminal to obtain
Alarm field position information, has fast and accurately advantage compared to the voice description in traditional alert mode.
(3) alarm method of the present invention proposes that floor photo, video are sent to and connect the center of dealing with emergencies and dangerous situations, and this contributes to
Connect that the person of dealing with emergencies and dangerous situations is directly perceived, be clearly understood that alarm field condition, raising is dealt with emergencies and dangerous situations efficiency.
Embodiment
In order that the purpose of the present invention, the content of the invention and advantage are more clearly understood, the present invention is made below in conjunction with accompanying drawing
It is further to describe in detail.In embodiments, from Meizu MX3 Android mobile phones as intelligent mobile phone terminal, it is configured to 5.1
Inch screen, 2G internal memories, 32G hard disks, 800W pixels rear camera and 200W pixel front cameras, with Beijing University of Technology
Security Department is as connecing the center of dealing with emergencies and dangerous situations.As shown in figure 4, case study on implementation is comprised the following steps that:
Step 001:Downloaded in intelligent mobile phone terminal and mobile phone alarm APP softwares are installed, can be in intelligent hand after installation
The icon of mobile phone alarm APP softwares is shown in machine terminal, as shown in Figure 5.
Step 002:When needing alarm, the icon that intelligent mobile phone terminal holder clicks on mobile phone alarm APP softwares is opened
APP enters APP interfaces, and APP interfaces are as shown in Figure 6.
Step 003:Alarm people clicks on corresponding alarm button according to field condition, is displayed whether after click on APP interfaces
Confirm the prompting frame of alarm, as shown in Figure 7.
Step 004:The "No" that alarm people is clicked in prompting frame then cancels alarm and returns to APP interfaces, and selection "Yes" is true
Recognize and alarmed, whether the network connecting module switch of APP softwares backstage automatic detection intelligent mobile phone terminal has already turned on, if not having
Have, open it, network connection is then set up with connecing the center of dealing with emergencies and dangerous situations by communication network;At the same time selection occurs in APP interfaces
Type of alarm interface, as shown in Figure 8.
Step 005:The type of alarm that APP is selected according to alarm people is alarmed into corresponding alarm flow, while backstage
It is automatic to call locating module to obtain the live longitude and latitude positional information of alarm.
Step 006:Automatically coding/decoding module is called to believe the corresponding alarm flow data obtained in step 005 in APP backstages
Breath and alarm field position information are encoded, and are converted into the packet that can be transmitted, and these packets are passed through into radio communication
Network, which is sent to, connects center completion alarm of dealing with emergencies and dangerous situations.
For a kind of more detailed description multimedia alarm method based on mobile phone A PP proposed by the present invention, it is given below
Two specific embodiments: