CN105488949A - Remote monitoring alarm system based on Android platform - Google Patents

Remote monitoring alarm system based on Android platform Download PDF

Info

Publication number
CN105488949A
CN105488949A CN201510928813.1A CN201510928813A CN105488949A CN 105488949 A CN105488949 A CN 105488949A CN 201510928813 A CN201510928813 A CN 201510928813A CN 105488949 A CN105488949 A CN 105488949A
Authority
CN
China
Prior art keywords
data
monitoring
information
database
monitoring end
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201510928813.1A
Other languages
Chinese (zh)
Other versions
CN105488949B (en
Inventor
李兰兰
李祥扬
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fuzhou University
Original Assignee
Fuzhou University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fuzhou University filed Critical Fuzhou University
Priority to CN201510928813.1A priority Critical patent/CN105488949B/en
Publication of CN105488949A publication Critical patent/CN105488949A/en
Application granted granted Critical
Publication of CN105488949B publication Critical patent/CN105488949B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G08SIGNALLING
    • G08BSIGNALLING OR CALLING SYSTEMS; ORDER TELEGRAPHS; ALARM SYSTEMS
    • G08B21/00Alarms responsive to a single specified undesired or abnormal condition and not otherwise provided for
    • G08B21/02Alarms for ensuring the safety of persons
    • G08B21/0202Child monitoring systems using a transmitter-receiver system carried by the parent and the child
    • G08B21/028Communication between parent and child units via remote transmission means, e.g. satellite network
    • G08B21/0283Communication between parent and child units via remote transmission means, e.g. satellite network via a telephone network, e.g. cellular GSM

Landscapes

  • Health & Medical Sciences (AREA)
  • Child & Adolescent Psychology (AREA)
  • General Health & Medical Sciences (AREA)
  • Business, Economics & Management (AREA)
  • Emergency Management (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Telephonic Communication Services (AREA)

Abstract

The invention provides a remote monitoring alarm system based on an Android platform. The system is characterized by comprising a monitored end, a monitoring end and a database, wherein the monitored end has the functions of binding user information, updating an early warning scope and giving an alarm in real time, performing self-positioning and one-key call for help and checking binding information; the monitoring end has the functions of performing user registration, querying position information of the monitored end, arranging an early warning area, and binding and modifying an account of the monitored end; and the database has the functions of providing data operation interfaces for the monitored end and the monitoring end, wherein two forms need to be newly established, among which one stores all monitored-end information and the other stores all monitoring-end equipment information. The remote monitoring alarm system based on Android platform is high in transplantability, can be applied to multiple terminal devices, does not rely on external hardware, does not cause the problem of reconstruction of software parts due to replacement of a certain chip of hardware, and also has the advantages of high extensibility and the like.

Description

A kind of long distance monitoring warning system based on Android platform
Technical field
The present invention relates to a kind of monitor system, be specifically related to a kind of long distance monitoring warning system based on Android platform.
Background technology
In recent years, the development of making rapid progress along with social economy, the paces of people's life were accelerated, and on road, vehicle flowrate is increasing, and this directly affects the safety of going out of children in each family, old man.In addition head of a family's living burden weight in family, working pressure is large, and the too many time does not go to pay close attention to child in family, the going out dynamically of old man.These factors indirectly or directly results in us and often can see children loss from media or the news report such as to have an accident in way of going to school.How removing the probability of happening reducing this kind of event, is the problem being worth thinking.If the head of a family can understand the whereabouts of child, old man at any time, its enter comparatively hazardous location time, prior notice they away from; If or child passes in and out school, the head of a family can receive SMS notification, and these measures can reduce the generation of this kind of accident.
Summary of the invention
The object of this invention is to provide a kind of long distance monitoring warning system based on Android platform, facilitate the head of a family on the one hand and the carrying out of member in family is guarded, alleviate the living burden of the head of a family; On the other hand, children can be reduced to a certain extent, old man goes out the probability that has an accident, kill two birds with one stone.
The present invention by the following technical solutions for achieving the above object: a kind of long distance monitoring warning system based on Android platform, is characterized in that: comprise by monitoring end, monitoring end and database; Described had following functions by monitoring end: user bound information; Real-time update early warning range, warning; Position oneself, one key call for help; Check binding information; Monitoring end has following functions: user registers login; Inquire about by monitoring end position information; Prewarning area is set; Bind, revise by monitoring end account; Described database has following functions: provide data operating interface to by monitoring end and monitoring end; Need newly-built at two lists, one stores all by monitoring client information, and another stores all monitoring end facility information.
In an embodiment of the present invention, the structure of described database comprises the following steps: step S1: after the war of intelligence cloud CloudBaaS bag is committed to Sina SAE, open KVDB service; Step S2: select Mysql in Service Management menu item and initialization operation is carried out to Mysql, create the tables of data of statistics service, obtain AccessKey, SecretKey, as the username and password that background data base is checked, background data base address is the second level domain of application; Step S3: the interface adding cloud service and data base call in the application project of Eclipse, the method called comprises: (1) uses CloudClient.init (context, appname, accesskey, secretkey) initialization operation is carried out to CloundBaaS; (2) two interfaces of database, one is CloudDB.query (mSQL), to the operation that database is inquired about, return results for List<Map<String, String>> type list list; Another is CloudDB.execute (mSQL), and this statement carries out insert, update, delete operation to database; (3) interface of the storage of file type: upload CloudFile.upload (url_local), download CloudFile.fetch (url_ser), delete CloudFile.delete (url_ser); Account, passcode, bindname, tel, binddevice field is comprised in monitoring end db_myuser tables of data, wherein account, passcode are the account number cipher of guardian, tel for guardian's phone number is for reception early warning note, the binding remarks uploaded when bindname, binddevice are and bind and binding by the device number of guardianship.
In an embodiment of the present invention, described by monitoring end functional realiey comprise the following steps: solicit user agree to after, directly obtain by monitoring end device number, be updated to by monitoring hold database in, open LocationService service, with background server exchange data information simultaneously; LocationService service sends ownship position information to server database in every 5 seconds, the positional information sent comprises the latitude and longitude coordinates location of location updating time uploadtime and position, every five points of clockwise server databases send the logcat.db file comprising historical position information, and embedded positional information form is consistent with the information format being sent to database; While transmission positional information, carry out the mutual of position data with server.Apply the distance calculating the warning center coordinate that current location is marked and arranged alternately, the judgement of size is directly carried out with the early warning radius r adius arranged, judge whether to send note, set the condition sending note and send as just holding to monitoring when being carried out action transboundary by guardianship.
In an embodiment of the present invention, functional realiey and the business processing flow of described monitoring end comprise the following steps: step one: create stored user information data class, this data class comprises all data types that needs are used, and realizes calling data according to application by depositing, withdrawing excuse; Step 2: write BaseActivity base class, this base class is claimed as abstract base class, have registered the broadcast that whole application can use in base class, and which Activity uses broadcast only need inherit this base class; It is sendMsg (Stringmsg) that this base class comprises an abstract method, realizes carrying out operational processes to the UI of other activity by the method, and msg parameter is the result after process data; Step 3: create WelcomeAcivity, it carries out the initialization operation of database, by the ConnectionChangeReceiver broadcast listening network change in BaseActivity, WelcomeActivity time delay automatically jumps to LoginActivity for five seconds afterwards and carries out user and log in; Step 4: log in and successfully enter HomeActivity afterwards, HomeActivity is the entrance being arranged each function by guardianship location, early warning, binding machine; Facility information is held in being guarded of direct this account of the described database request binding of HomeActivity; Step 5: create binding function BindActivity, this activity mainly shows the user profile of binding, and provides the interface of amendment binding information; Step 6: create location LocationActivity, this Ativity and be divided into two patterns, guarded end station-keeping mode for one, another is for checking historical track pattern; By in monitoring end station-keeping mode, obtain teledata and guarded the positional information of end, realize by the real-time update of guardianship; In the pattern of checking historical track, can check by the historical track of monitoring end, and provide amendment that the interface of monitoring-information is set, as monitoring scope, monitor center point etc.
In an embodiment of the present invention, the map used is high moral map, and the environment for use configuration of high moral map comprises the following steps: initial landing high moral LBS open platform: http://lbs.amap.com/, is registered as developer; After logging in, enter control desk interface and obtain key; In security code one hurdle, insert SHA1 value, its obtain manner for select WINDOW menu in eclipse, and Preferances option in choice menus, clicks the Build item of andorid and can check and obtain key; Afterwards, equally again open application project AndroidManifest.xml configuration file, in application, add attribute:
<meta-dataandroid:name="com.amap.api.v2.apikey"
Android:value=" 6e1ac06c9482f57bf61592e2e79a1ffa "/>; Wherein the value of value is applied for key.
Compared with prior art, the present invention is based on Android platform, the SinaAppEngine cloud computing platform using research and development centre of Sina to provide carries out building of Internet Server, and have selected the calling interface that map AndroidSDK that under Ali, high moral map provides develops as map, have portable strong, can at multiple terminal equipment use, do not rely on external hardware, can not occur because hardware chip changes and cause the problem that software section need reconstruct, function expansibility advantages of higher.
Accompanying drawing explanation
Fig. 1 is guarded the major function schematic diagram of end.
Fig. 2 is the major function schematic diagram of monitoring end.
Fig. 3 is for the inquiry of monitoring end is by monitoring end position functional schematic.
Fig. 4 arranges early warning range schematic diagram for guarding end.
Embodiment
Below in conjunction with the drawings and specific embodiments, the present invention will be further described.
The invention provides a kind of long distance monitoring warning system based on Android platform, this system comprises by monitoring end, monitoring end and database; Described had following functions by monitoring end: user bound information; Real-time update early warning range, warning; Position oneself, one key call for help; Check binding information; Monitoring end has following functions: user registers login; Inquire about by monitoring end position information; Prewarning area is set; Bind, revise by monitoring end account; Described database has following functions: provide data operating interface to by monitoring end and monitoring end; Need newly-built at two lists, one stores all by monitoring client information, and another stores all monitoring end facility information.Held and guard the major function schematic diagram of end by monitoring see Fig. 1,2.
Sina's SAE platform is current China first cloud computing platform.It provide Mysql database service, the application of all mobile terminals can by calling SaeMysql class, carry out attended operation to database, it also supports by the phpmyadmin page on platform, database, tables of data to be carried out to online establishment, deleted action in addition.Except simple database, it provides the distributed KEY-VALUE key-value pair of KVDB(and store), the service such as Storage (distributed document stores service).Intelligence cloud CloudBaaS is a Mobile solution exploitation back-end services scheme based on Sina Sae platform development.
The structure of described database comprises the following steps: step S1: after the war of intelligence cloud CloudBaaS bag is committed to Sina SAE, in Service Management menu item, find KVDB, open its service, step S2: select Mysql in Service Management menu item and to Mysql initialization operation, and import the sql statement of statistics, create the tables of data of statistics service, obtain AccessKey, SecretKey, as the username and password that background data base is checked, background data base address is the second level domain of application, step S3: by CloundService.jar in the application project of Eclipse, gson, jar, httpmime.jar is added into and is guarded, under monitoring end engineering lib catalogue, realize calling the method in CloundBaaS, the method called comprises: (1) uses CloudClient.init (context, appname, accesskey, secretkey) initialization behaviour is carried out to CloundBaaS, context is the Apply Names of appname for filling in when Sina SAE platform creates application, accesskey, the AccessKey of secretkey for providing after establishment, SecretKey, after calling, it generates a httpclient object, interconnection network and server exchange token information, as do not carried out initialization, calling of further interface causes application crashes by occurring that httpclient null pointer is abnormal, please guarantee that network connects during use.
(2) when using object to store, instantiation User object, to this User to establishing value User.set (newaddress (" test ", 9999) CloudObject.save (" num_1 ") is used afterwards, User) storage object, it returns a Boolean object to represent whether storage operation completes; (3) two interfaces are mainly used in the use of database; an operation being CloudDB.query (mSQL) and database is inquired about; return results as List<Map<String; String>> type list list; wherein mSQL statement is want the order of operating database as selectbindtel; alarmlocation, radiusfrommy_child_infowheredeviceid='123456'; "; Another is CloudDB.execute (mSQL), and this statement carries out insert, update, delete operation to database, returns the numerical value of an int type, shows in database by the line number that this statement affects; (4) interface of the storage of file type has: upload CloudFile.upload (url1), download CloudFile.fetch (url2), delete CloudFile.delete (url2), url1 is the position of local file to be uploaded, server file position, url2 position; Step S4: the data write db_child_info tables of data uploaded will be held by monitoring in a database, and monitoring be held in the database write db_myuser uploaded; Deviceid, uploadtime, location, location_path, alarmlocation, radius, bindtel field is comprised by monitoring end db_child_info tables of data, wherein deviceid is by the equipment number of the mobile phone of guarding, each mobile phone is exclusive, this field not can be sky, uploadtime is uplink time, location is by monitoring end mobile phone current location, location_path is by the path of guarding end historical track file location.txt storage, the data uploaded when three is service upload location information.Alarmlocation is the warning center position coordinates of monitoring end setting, and radius is early warning radius, and bindtel is for the binding of monitoring end is by the early warning note receiving number provided during monitoring end;
Account, passcode, bindname, tel, binddevice field is comprised in monitoring end db_myuser tables of data, wherein account, passcode are the account number cipher of guardian, tel is for guardian's phone number is for reception early warning note, these three data can not be empty, submit to when registering, the binding remarks uploaded and binding by the device number of guardianship when bindname, binddevice are binding.
Generally speaking, monitoring end is bound by monitoring end by the device number exclusive by monitoring end, then obtains the authority of checking by information such as positions in monitoring client database.So far, the external network server of long distance monitoring warning system has completed and has built.
Described by monitoring end functional realiey comprise the following steps: solicit user agree to after, directly obtain by monitoring end device number, be updated to by monitoring end database in, simultaneously open Service serve, with background server exchange data information; Service service sends ownship position information to server database in every 5 seconds, the positional information sent comprises the latitude and longitude coordinates location of location updating time Uloadtime and position, every five points of clockwise server databases send the location.db document comprising historical position information, and embedded positional information form is consistent with the information format being sent to database; While transmission positional information, judge that whether this be empty by the value of guarding equipment id alarmlocat and radius in db_child_info corresponding to end, for sky then obtains data stored in application global variable, re-use
Floatdistance=AMapUtils.calculateLineDistance (startLatlng, endLatLng), calculate the distance of the warning center coordinate that current location is marked and arranged, the numerical value unit that its method returns is m, the judgement of size is directly carried out with the early warning radius r adius arranged, before contrast, application is provided with zone bit, judge whether to send note by zone bit, set the condition sending note and send as just holding to monitoring when being carried out action transboundary by guardianship.
The function of carrying out due to each Activity in performance history is different, some Activity have modified some as parameters such as binding state, network monitoring states, this just needs to carry out the communication between Activity, because Activity is numerous, so the trouble that communication is got up very, in order to address this problem, apply global variable AppData class in this application, its life cycle is consistent with whole application, can't once which Activity just disappears along with the destruction of Activity after destroying as common data class.Therefore use AppData class to preserve some state variables and read that binding information completes the initialization operation of binding information and global data account, password etc. as whether from server.
The realization of AppData: AppData be realized and first should write a data class, the data type that various needs are used is write in the inside, then to these data types encapsulation getter and setter, again this data class is inherited Application class, after succession, open configuration file AndroidManifest.xml, add in application attribute:
android:name=“com.lxylbs.data.AppData”
Wherein com.lxylbs.data.AppData is the position of just now write data class, complete writing of global variable class, next be just the use of, instantiation AppData object during use, as AppdatamAppData, again to this object initialization, mAppData=(Appdata) context.getApplicationContext (), getter and setter then calling mAppData carries out the operation to data.In application, a lot of local network of all using goes to access long-range data, and due to the uncertainty of network, the time that some data arrive is uncertain, so the acquisition of teledata can not be synchronous with the use of data, must go access with asynchronous thread.In prior art, conventional Handle mechanism goes to process these events, but the use of Handle must import a Handle object into, and using not is facilitate very much, so the present invention uses broadcast mechanism to address this problem.The result of operated from a distance database is sent with the forms of broadcasting, which Activity needs to accept this broadcast, only need add broadcast filtering device in Activity, register this to broadcast, when but which Activity with which Activyty registers, using each time all must instantiation BroadcastReceiver object, and does method of reseptance process to its reception, and code maintenance gets up and inconvenient completely.Therefore, a BaseActivity base class has been write in the present invention.
Therefore the functional realiey of described monitoring end comprises the following steps: step one: write a data class, this data class comprises the data type that needs are used, then to these data types encapsulation getter and setter, again this data class is inherited Application class, after succession, open configuration file AndroidManifest.xml, add in application attribute: android:name=" com.lxylbs.data.AppData ", wherein com.lxylbs.data.AppData is the position of described data class, instantiation AppData object during use, AppdatamAppData, again to this object initialization, mAppData=(Appdata) context.getApplicationContext (), getter and setter then calling mAppData carries out the operation to data, step 2: write a BaseActivity base class, this base class is claimed as abstract base class, the broadcast that whole application can use is have registered in base class, only write Action, the stringExtra of onReceive method to the broadcast received in class to judge, and in conjunction with above-mentioned global variable class, storage operation being carried out to data, which Activity uses broadcast only need inherit this base class, it is sendMsg (Stringmsg) that this base class comprises an abstract method, change method to realize carrying out operational processes to the UI of other activity, msg parameter is the result after process data, operate UI in sendMsg, the implementing reading and writing of global variable class AppData being carried out to data is called Activity's, step 3: open WelcomeAcivity, it carries out the initialization operation of database, by the ConnectionChangeReceiver broadcast listening network change in BaseActivity, without not operating database during network and ejecting Toast message informing user, network is unavailable, and WelcomeActivity uses the time delay of Handle mechanism within five seconds, automatically to jump to LoginActivity afterwards to carry out user and log in, step 4: log in and successfully enter HomeActivity afterwards, HomeActivity is the entrance being arranged each function by guardianship location, early warning, binding machine, facility information is held in being guarded of direct this account of the described database request binding of HomeActivity, stored in global variable Appdata, and the IsBind state in global variable class is arranged to TRUE, step 5: enter binding function BindActivity, apply after entering this Activity first go to obtain this account binding in global variable by the information of guardianship, information does not exist, then show on the page, without bound device, if there is bound device information, then facility information is shown, the pet name is filled in when need revise binding number, the device number of bound object is submitted to, the device number of input after submitting to inquires about whether there is this equipment in db_child_info table, if this equipment exists, then by remote data base db_myuser show in this account to bindneme, the data that during binddevice write binding, defeated user inserts, and upgrade the device object of the current new binding of UI display, the IsBind of global variable is arranged to TRU simultaneously, step 6: enter location LocationActivity, this Ativity and be divided into two patterns, guarded end station-keeping mode for one, another is for checking historical track pattern, held in station-keeping mode by monitoring, use Handler.postDelayed (this, 10000), in runnable, again transfer the method goes acquisition teledata to be guarded the positional information of end simultaneously, realize by the real-time update of guardianship, after obtaining position, the Marker method using Amap to provide draws coordinate on map, picture seat calibration method is packaged into a function and is fallen by the marker drawn before mark Remove when function call, and a map interface would not be caused like this to occur, and the phenomenon of a lot of marker occurs, in the pattern of checking historical track, monitoring end goes to obtain the location_path by monitoring end, re-using the url obtained goes access to obtain file, read the Arraylist of Study document acquisition with history coordinate, the type wherein deposited in Arraylist is Latlng, ArrayList<LatLng>, after getting out history coordinate, in map, use AMap.addPolyline (PolylineOptions) to carry out drafting broken line, polylioneOptions object can arrange line thickness, color, the Latlng coordinate drawn, direct use PolylineOptions.addall (Arraylist<latlng>) puts into coordinate set, step 7: enter warning function, first carry out initialization interface operation, MapView does the display of map interface, monitoring end first in server request bound device tables of data alarmlocation and radius parameter, if parameter is not empty, then coordinate centered by alarmlocation, radius is the early warning range that radius draws bound equipment, if be sky, does not process, the central point of map is set to the position of current guardian: use LocationManagerProxy, calls this object
RequestLocationData (LocationProviderProxy.AMapNetwork, 60*1000,15, this), the wherein type of first Parametric Representation location, here be mixed positioning, use gps data when gps data preferentially returns, use LBS data when LBS high priority data returns, then use gps data when returning simultaneously, second parameter is the interval at every turn obtaining position, and the 3rd parameter is mobile 15 meters, obtains positional information; After calling, write subsequent operation at the onLocationChanged that must rewrite, directly revise map center point here and draw marker; The acquisition of warning function central point: click event is arranged to Amap and monitors: aMap.setOnMapClickListener (); After clicking, we cause Latlng and directly do clicking the coordinate obtained on map interface and show, and input radius, during submission, by bound device corresponding in set value update to db_child_info in Editext simultaneously.Fig. 3 inquires about for monitoring end and is guarded end position functional schematic see Fig. 3.Monitoring end arranges early warning range schematic diagram see Fig. 4.
The map used comprises the following steps for high moral map, the application of high moral map: initial landing high moral LBS open platform: http://lbs.amap.com/, is registered as developer; After logging in, enter control desk interface and obtain key, ejecting the title inputting Mobile solution in interface, the AndoridSDK of the service of the high moral map of choice for use, in bag name option, insert the bag name of application, described bag name must be consistent with the bag name in AndroidManifest.xml configuration file in Mobile solution engineering; In security code one hurdle, insert SHA1 value, its obtain manner for select WINDOW menu in eclipse, and Preferances option in choice menus, clicks the Build item of andorid and can check and obtain key; Afterwards, equally again open application project AndroidManifest.xml configuration file, in application, add attribute:
<meta-dataandroid:name="com.amap.api.v2.apikey"
Android:value=" 6e1ac06c9482f57bf61592e2e79a1ffa "/>; Wherein the value of value is applied for key.
The foregoing is only embodiments of the invention; not thereby the scope of the claims of the present invention is limited; every utilize instructions of the present invention and accompanying drawing content to do equivalent structure or equivalent flow process conversion; or be directly or indirectly used in other relevant technical fields, be all in like manner included in scope of patent protection of the present invention.

Claims (5)

1. based on a long distance monitoring warning system for Android platform, it is characterized in that: comprise by monitoring end, monitoring end and database;
Described had following functions by monitoring end: user bound information; Real-time update early warning range, warning; Position oneself, one key call for help; And check binding information;
Described monitoring end has following functions: user registers login; Inquire about by monitoring end position information; Prewarning area is set; And binding, revise by monitoring end account;
Described database has following functions: provide data operating interface to by monitoring end and monitoring end; Need newly-built two lists, one stores all by monitoring end equipment, position and function information, and another stores all monitoring end facility information.
2. the long distance monitoring warning system based on Android platform according to claim 1, is characterized in that: the structure of described database comprises the following steps:
Step S1: after the war of intelligence cloud CloudBaaS bag is committed to Sina SAE, find KVDB in Service Management menu item, open its service;
Step S2: select Mysql in Service Management menu item and to Mysql initialization operation, and import the sql statement of statistics, create the tables of data of statistics service, obtain AccessKey, SecretKey, as the username and password that background data base is checked, background data base address is the second level domain of application;
Step S3: by CloundService.jar, gson in application project, under jar, httpmime.jar are added into and are guarded, guard end engineering lib catalogue, realize calling the method in CloundBaaS, the method called comprises:
(1) CloudClient.init (context is used, appname, accesskey, secretkey) initialization behaviour is carried out to CloundBaaS, context is default application environmental information, i.e. context, the Apply Names of appname for filling in when Sina SAE platform creates application, accesskey, secretkey AccessKey, SecretKey for providing after establishment, after calling, it generates a httpclient object, interconnection network and server exchange token information;
(2) when using object to store, instantiation User object, to this User to establishing value User.set (newaddress (" test ", 9999) CloudObject.save (" num_1 ") is used afterwards, User) storage object, it returns a Boolean object to represent whether storage operation completes;
(3) two interfaces are mainly used in the use of database, an operation being CloudDB.query (mSQL) and database is inquired about, return results as List<Map<String, String>> type list list, wherein mSQL statement be want the order of operating database as:
Selectbindtel, alarmlocation, radiusfrommy_child_infowheredeviceid='123456'; "; Another is CloudDB.execute (mSQL), and this statement carries out insert, update, delete operation to database, returns the numerical value of an int type, shows in database by the line number that this statement affects;
(4) interface of the storage of file type has: upload CloudFile.upload (url1), download CloudFile.fetch (url2), delete CloudFile.delete (url2), url1 is the position of local file to be uploaded, server file position, url2 position;
Step S4: the data write db_child_info tables of data uploaded will be held by monitoring in a database, and monitoring be held in the database write db_myuser uploaded;
Deviceid, uploadtime, location, location_path, alarmlocation, radius, bindtel field is comprised by monitoring end db_child_info tables of data, wherein deviceid is by the equipment number of the mobile phone of guarding, each mobile phone is exclusive, this field not can be sky, uploadtime is uplink time, location is by monitoring end mobile phone current location, location_path is by the path of guarding end historical track file location.txt storage, the data uploaded when three is service upload location information;
Alarmlocation is the warning center position coordinates of monitoring end setting, and radius is early warning radius, and bindtel is for the binding of monitoring end is by the early warning note receiving number provided during monitoring end;
Account, passcode, bindname, tel, binddevice field is comprised in monitoring end db_myuser tables of data, wherein account, passcode are the account number cipher of guardian, tel is for guardian's phone number is for reception early warning note, these three data can not be empty, submit to when registering, the binding remarks uploaded and binding by the device number of guardianship when bindname, binddevice are binding.
3. the long distance monitoring warning system based on Android platform according to claim 2, is characterized in that: the functional realiey of described monitoring end comprises the following steps:
Step one: create a data class, this data class comprises the data type that needs are used, then to these data types encapsulation getter and setter, again this data class is inherited Application class, after succession, open configuration file AndroidManifest.xml, add in application attribute: android:name=" com.lxylbs.data.AppData "; Wherein com.lxylbs.data.AppData is the position of described data class; Instantiation AppData object during use, AppdatamAppData, again to this object initialization, mAppData=(Appdata) context.getApplicationContext (), getter and setter then calling mAppData carries out the operation to data;
Step 2: write BaseActivity base class, this base class is claimed as abstract base class, the broadcast that whole application can use is have registered in base class, only write Action, the stringExtra of onReceive method to the broadcast received in class to judge, and in conjunction with above-mentioned global variable class, storage operation being carried out to data, which Activity uses broadcast only need inherit this base class; It is sendMsg (Stringmsg) that this base class comprises an abstract method, change method to realize carrying out operational processes to the UI of other activity, msg parameter is the result after process data, operate UI in sendMsg, the implementing reading and writing of global variable class AppData being carried out to data is called Activity's;
Step 3: open WelcomeAcivity, it carries out the initialization operation of database, by the ConnectionChangeReceiver broadcast listening network change in BaseActivity, without not operating database during network and ejecting Toast message informing user, network is unavailable, and WelcomeActivity uses the time delay of Handle mechanism within five seconds, automatically to jump to LoginActivity afterwards to carry out user and log in;
Step 4: log in and successfully enter HomeActivity afterwards, HomeActivity is the entrance being arranged each function by guardianship location, early warning, binding machine; Facility information is held in being guarded of direct this account of the described database request binding of HomeActivity, stored in global variable Appdata, and the IsBind state in global variable class is arranged to TRUE;
Step 5: enter binding function BindActivity, apply after entering this Activity first go to obtain this account binding in global variable by the information of guardianship, information does not exist, then show on the page, without bound device, if there is bound device information, then facility information is shown, the pet name is filled in when need revise binding number, the device number of bound object is submitted to, the device number of input after submitting to inquires about whether there is this equipment in db_child_info table, if this equipment exists, then by remote data base db_myuser show in this account to bindneme, the data that during binddevice write binding, defeated user inserts, and upgrade the device object of the current new binding of UI display, the IsBind of global variable is arranged to TRU simultaneously,
Step 6: enter location LocationActivity, this Ativity and be divided into two patterns, guarded end station-keeping mode for one, another is for checking historical track pattern;
Held in station-keeping mode by monitoring, use Handler.postDelayed (this, 10000), in runnable, again transfer the method goes acquisition teledata to be guarded the positional information of end simultaneously, realize by the real-time update of guardianship, after obtaining position, the Marker method using Amap to provide draws coordinate on map, picture seat calibration method is packaged into a function and is fallen by the marker drawn before mark Remove when function call, and a map interface would not be caused like this to occur, and the phenomenon of a lot of marker occurs;
In the pattern of checking historical track, monitoring end goes to obtain the location_path by monitoring end, re-using the url obtained goes access to obtain file, read the Arraylist of Study document acquisition with history coordinate, the type wherein deposited in Arraylist is Latlng, ArrayList<LatLng>, after getting out history coordinate, in map, use AMap.addPolyline (PolylineOptions) to carry out drafting broken line, polylioneOptions object can arrange line thickness, color, the Latlng coordinate drawn, direct use PolylineOptions.addall (Arraylist<latlng>) puts into coordinate set,
Step 7: enter warning function, first carry out initialization interface operation, MapView does the display of map interface, monitoring end first in server request bound device tables of data alarmlocation and radius parameter, if parameter is not empty, then coordinate centered by alarmlocation, radius is the early warning range that radius draws bound equipment, if be sky, does not process;
The central point of map is set to the position of current guardian: use LocationManagerProxy, call the requestLocationData (LocationProviderProxy.AMapNetwork of this object, 60*1000, 15, this), the wherein type of first Parametric Representation location, here be mixed positioning, gps data is used when gps data preferentially returns, LBS data are used when LBS high priority data returns, then use gps data when returning simultaneously, second parameter is the interval at every turn obtaining position, 3rd parameter is mobile 15 meters, obtain positional information, after calling, write subsequent operation at the onLocationChanged that must rewrite, directly revise map center point here and draw marker,
The acquisition of warning function central point: click event is arranged to Amap and monitors: aMap.setOnMapClickListener (); After clicking, we cause Latlng and directly do clicking the coordinate obtained on map interface and show, and input radius, during submission, by bound device corresponding in set value update to db_child_info in Editext simultaneously.
4. the long distance monitoring warning system based on Android platform according to claim 2, it is characterized in that: the described functional realiey by monitoring end comprises the following steps: after soliciting user's agreement, the device number of end is guarded in direct acquisition, be updated to by the database of monitoring end, open Service service, with background server exchange data information simultaneously; Service service sends ownship position information to server database in every 5 seconds, the positional information sent comprises the latitude and longitude coordinates location of location updating time Uloadtime and position, every five points of clockwise server databases send the location.txt document comprising historical position information, and embedded positional information form is consistent with the information format being sent to database;
While transmission positional information, judge that whether this be empty by the value of guarding equipment id alarmlocat and radius in db_child_info corresponding to end, not for sky then obtains data stored in application global variable, re-use Floatdistance=AMapUtils.calculateLineDistance (startLatlng, endLatLng), calculate the distance of the warning center coordinate that current location is marked and arranged, the numerical value unit that its method returns is m, the judgement of size is directly carried out with the early warning radius r adius arranged, before contrast, application is provided with zone bit, judge whether to send note by zone bit, set the condition sending note to send as just holding to monitoring when being carried out action transboundary by guardianship.
5. the long distance monitoring warning system based on Android platform according to claim 3 or 4, it is characterized in that: the map used is high moral map, the application of high moral map comprises the following steps: initial landing high moral LBS open platform: http://lbs.amap.com/, is registered as developer; After logging in, enter control desk interface and obtain key, ejecting the title inputting Mobile solution in interface, the AndoridSDK of the service of the high moral map of choice for use, in bag name option, insert the bag name of application, described bag name must be consistent with the bag name in AndroidManifest.xml configuration file in Mobile solution engineering; In security code one hurdle, insert SHA1 value, its obtain manner for select WINDOW menu in eclipse, and Preferances option in choice menus, clicks the Build item of andorid and can check and obtain key; Afterwards, equally again open application project AndroidManifest.xml configuration file, in application, add attribute:
<meta-dataandroid:name="com.amap.api.v2.apikey"
android:value="6e1ac06c9482f57bf61592e2e79a1ffa"/>;
Wherein the value of value is applied for key.
CN201510928813.1A 2015-12-15 2015-12-15 A kind of long distance monitoring warning system based on Android platform Expired - Fee Related CN105488949B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510928813.1A CN105488949B (en) 2015-12-15 2015-12-15 A kind of long distance monitoring warning system based on Android platform

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510928813.1A CN105488949B (en) 2015-12-15 2015-12-15 A kind of long distance monitoring warning system based on Android platform

Publications (2)

Publication Number Publication Date
CN105488949A true CN105488949A (en) 2016-04-13
CN105488949B CN105488949B (en) 2018-03-20

Family

ID=55675909

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510928813.1A Expired - Fee Related CN105488949B (en) 2015-12-15 2015-12-15 A kind of long distance monitoring warning system based on Android platform

Country Status (1)

Country Link
CN (1) CN105488949B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106230458A (en) * 2016-08-01 2016-12-14 北京三体高创科技有限公司 A kind of monitoring method based on mobile terminal GPS, system
CN106843912A (en) * 2017-03-22 2017-06-13 武汉斗鱼网络科技有限公司 Page info acquisition methods and device
CN108683992A (en) * 2018-05-11 2018-10-19 南昌航空大学 A kind of old man Internet-based, children anti-wander-away platform and anti-method of wandering away
CN113873194A (en) * 2021-11-29 2021-12-31 见面(天津)网络科技有限公司 Remote nursing method, device, equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104523224A (en) * 2014-09-11 2015-04-22 深圳市酷达通讯有限公司 Micro-guarding monitoring system
CH708825A2 (en) * 2013-11-07 2015-05-15 Rose-Marie Salamida Device Zone Alarm for person or animal.
CN104978824A (en) * 2014-04-05 2015-10-14 王伟楠 Outdoor monitoring system and outdoor monitoring method
CN204833594U (en) * 2015-07-01 2015-12-02 福州大学 Portable wearable healthy security alarm device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CH708825A2 (en) * 2013-11-07 2015-05-15 Rose-Marie Salamida Device Zone Alarm for person or animal.
CN104978824A (en) * 2014-04-05 2015-10-14 王伟楠 Outdoor monitoring system and outdoor monitoring method
CN104523224A (en) * 2014-09-11 2015-04-22 深圳市酷达通讯有限公司 Micro-guarding monitoring system
CN204833594U (en) * 2015-07-01 2015-12-02 福州大学 Portable wearable healthy security alarm device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
段继光: "基于LBS的个人监控服务系统的研究和实现", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106230458A (en) * 2016-08-01 2016-12-14 北京三体高创科技有限公司 A kind of monitoring method based on mobile terminal GPS, system
CN106230458B (en) * 2016-08-01 2019-03-05 北京三体高创科技有限公司 A kind of monitoring method based on mobile terminal GPS, system
CN106843912A (en) * 2017-03-22 2017-06-13 武汉斗鱼网络科技有限公司 Page info acquisition methods and device
CN108683992A (en) * 2018-05-11 2018-10-19 南昌航空大学 A kind of old man Internet-based, children anti-wander-away platform and anti-method of wandering away
CN108683992B (en) * 2018-05-11 2021-07-13 南昌航空大学 Internet-based anti-lost platform and anti-lost method for old people and children
CN113873194A (en) * 2021-11-29 2021-12-31 见面(天津)网络科技有限公司 Remote nursing method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN105488949B (en) 2018-03-20

Similar Documents

Publication Publication Date Title
CN106068521B (en) Communications status about the application for closing rule policy update
US9823917B2 (en) Update application user interfaces on client devices
US11818623B2 (en) System and method for monitoring devices relative to a user defined geographic area
CN107710157A (en) Multi-tenant, the specific application program of tenant
US20100069035A1 (en) Systema and method for location based exchanges of data facilitating distributed location applications
CN104364767A (en) Device and settings management platform
US10686821B2 (en) Analysis of mobile applications
CN105488949A (en) Remote monitoring alarm system based on Android platform
CN106202117A (en) Data processing method, device and server
US20170046144A1 (en) Aercloud application express and aercloud application express launcher
CN103986782A (en) Position server and signing-in processing method
CN113141485B (en) Alarm system
CN102833320A (en) Web client system of GPS (Global Positioning System) vehicle monitoring system
EP3610297A1 (en) Rule deviation configuration for offender monitoring devices
US9542581B1 (en) Asset tracking system
US20210142641A1 (en) Geographic boundary compliance detection using body-worn offender monitoring electronic devices
US20140257897A1 (en) Responder personnel on-call availability system
Schmitt et al. OTIoT—A browser-based object tracking solution for the Internet of Things
US10216747B2 (en) Customized synthetic data creation
Al Amin et al. Real time traffic monitoring system using crowd sourced GPS data
Dirgahayu et al. An architectural design of geo-fencing emergency alerts system for hajj pilgrims
US10162846B2 (en) Data change notification using OData entity keys
Andersen et al. The SITA principle for location privacy—Conceptual model and architecture
US20210289468A1 (en) Instant mobile alerting system and method of use
Li et al. Intelligent management platform of forestry based on LBS cloud services

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20180320

Termination date: 20201215