[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN106506844B - A kind of monitoring of wechat remote mobile and return system, method based on agreement short message - Google Patents

A kind of monitoring of wechat remote mobile and return system, method based on agreement short message Download PDF

Info

Publication number
CN106506844B
CN106506844B CN201611037383.5A CN201611037383A CN106506844B CN 106506844 B CN106506844 B CN 106506844B CN 201611037383 A CN201611037383 A CN 201611037383A CN 106506844 B CN106506844 B CN 106506844B
Authority
CN
China
Prior art keywords
short message
monitoring
monitored
content
wechat
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.)
Active
Application number
CN201611037383.5A
Other languages
Chinese (zh)
Other versions
CN106506844A (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.)
Beijing Three High Technology Co Ltd
Original Assignee
Beijing Three High Technology Co Ltd
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 Beijing Three High Technology Co Ltd filed Critical Beijing Three High Technology Co Ltd
Priority to CN201611037383.5A priority Critical patent/CN106506844B/en
Publication of CN106506844A publication Critical patent/CN106506844A/en
Application granted granted Critical
Publication of CN106506844B publication Critical patent/CN106506844B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72403User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
    • H04M1/72406User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality by software upgrading or downloading
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/52User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail for supporting social networking services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/10Network architectures or network communication protocols for network security for controlling access to devices or network resources
    • H04L63/101Access control lists [ACL]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/26Devices for calling a subscriber
    • H04M1/27Devices whereby a plurality of signals may be stored simultaneously
    • H04M1/274Devices whereby a plurality of signals may be stored simultaneously with provision for storing more than one subscriber number at a time, e.g. using toothed disc
    • H04M1/2745Devices whereby a plurality of signals may be stored simultaneously with provision for storing more than one subscriber number at a time, e.g. using toothed disc using static electronic memories, e.g. chips
    • H04M1/27453Directories allowing storage of additional subscriber data, e.g. metadata
    • H04M1/27457Management thereof, e.g. manual editing of data
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72403User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
    • H04M1/72409User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality by interfacing with external accessories
    • H04M1/72415User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality by interfacing with external accessories for remote control of appliances
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72403User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
    • H04M1/7243User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality with interactive means for internal management of messages
    • H04M1/72436User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality with interactive means for internal management of messages for text messaging, e.g. short messaging services [SMS] or e-mails
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72448User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions
    • H04M1/72454User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions according to context-related or environment-related conditions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72484User interfaces specially adapted for cordless or mobile telephones wherein functions are triggered by incoming communication events

Landscapes

  • Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Human Computer Interaction (AREA)
  • Computing Systems (AREA)
  • General Business, Economics & Management (AREA)
  • Business, Economics & Management (AREA)
  • Library & Information Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Hardware Design (AREA)
  • Environmental & Geological Engineering (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

It is monitored the invention discloses the wechat remote mobile based on agreement short message and return system, system includes: monitoring client and monitored end, the monitored end is configured as, and monitors preset information, and judge whether the preset information has carry out overmatching;The preset information, as depositing in including at least in database: monitoring number and reserve a record of short message content, if preset information is not carry out overmatching, short message content addresser corresponding with this short message content is obtained, and matched in the database;If preset information is to match: monitoring Numbers Authority and reservation short message content is judged as that monitoring client corresponds to according to the type code of setting and executes monitoring instruction when monitoring short message, complete to monitor.It can be realized short message control video monitoring through the invention, all information are finally forwarded to specified wechat user by the functions such as GPS positioning, mobile phone state inquiry, are realized that conveniently cross-system remote mobile is monitored, are returned and check immediately.

Description

A kind of monitoring of wechat remote mobile and return system, method based on agreement short message
Technical field
The present invention relates to mobile Internet field, in particular to it is a kind of based on the message monitoring system of Android mobile terminal with And implementation method.
Background technique
It is covered extensively in mobile network and smart phone highly popular epoch, people's lives mode changes for it.Body Locate the intelligent movable epoch, people are no longer influenced by time and space constraints, can indiscriminately ad. as one wishes exchange and contact with friend, at any time with Ground obtains information.In the engineering field for needing profession monitoring, user wants to reduce human cost." at any time can Enough view monitoring screen ", it is the demand of most of clients using monitoring system.On the other hand, the swift and violent hair of smart phone It opens up and universal, client is made more or less to produce certain dependence to mobile phone.Mobile phone is once not at one's side, client is likely to just wrong Some important information are crossed, cause trouble to the life of client.Many people's " machine is not from hand " just feel nothing once leaving mobile phone It is followed, or even produces a kind of new symptom --- mobile phone panic disorder.
It propagates its belief on a large scale in Android mobile phone, video monitoring enters the 3G time of cell-phone, and GPS is increasingly miniaturized, becomes smart phone Standard be equipped with background under, mobile video monitor and GPS Mobile Location Technology are combined, using SMS as control and obtain The medium for taking parameter, using MMS as the carrier of monitor video, exploitation Android mobile platform short message control system, which has, is widely answered Use prospect.
It is directed to the demand of monitoring system and Mobile Phone Dependence at present, has following defects that
1) it can not be obtained in real time/check monitoring screen by minimizing human cost,
2) it can not remind not miss important information in time when mobile phone is not carried.
Summary of the invention
The technical problem to be solved by the present invention is to 1) video monitoring is controlled by short message of the mobile phone to mobile phone, it can be at any time Obtaining remote handset shooting video information everywhere may be implemented in conjunction with cellphone GPS location tracking to remote handset position, environment Real time monitoring;It 2), can be to avoid mobile phone not miss critical information at one's side by adding mobile communication conditional access.3) pass through Immediately it sends important information to specified wechat account, realize accessible, cross-system long-range monitoring and checks immediately.
Above-mentioned technical problem is solved, is monitored the present invention provides the wechat remote mobile based on agreement short message and passback is System, comprising: monitoring client and monitored end,
The monitored end is configured as, and monitors preset information, and judge whether the preset information has carry out overmatching; The preset information, as depositing in including at least in database: it monitors number and reserves a record of short message content,
If the preset information is not carry out overmatching, obtain that short message content is corresponding with this short message content to be transmitted People, and matched in the database;
If the preset information be matched: monitor Numbers Authority and reservation short message content be judged as monitor short message when, The monitoring client monitors instruction according to corresponding execute of type code of setting, completes monitoring.
Further, message monitoring system further include: before judging whether the preset information has progress overmatching:
It is obtained according to the corresponding addresser of above-mentioned this short message content and transmits number,
It transmits number by described and is compared with the number list in pre-registered grant column list in the database,
If matching with the telephone number list in grant column list, addresser has the right to monitor, and listening state position parameter is true;
Listening state is checked in the database that storage registration user mobile phone number code table and/or registration user monitor cipher table Whether position parameter is true, if being matched if true, short message content is monitored the list in cipher table with the registration user, With being successfully followed by by monitoring information,
If it does not match, short message is normal short message.
Further, after the monitored termination is by short message is monitored, SMS Tip is sent to monitoring client:
Successful match,
And/or reply 1 acquisition camera and take pictures photo,
And/or reply 2 and obtain GPS coordinate,
And/or reply 3 and obtain missed call information,
And/or reply 4 acquisitions and do not look into short message,
And/or reply 5 and obtain contact information,
And/or it replys 6 and cancels prison.
Further, the monitored end is additionally configured to establish data memory module,
The data memory module is to monitor people's word corresponding with agreement short message content based on SQLite Database Section, and SQL registration, inquiry, cancel statement are executed, to the monitoring number and/or agreement of acquisition in the SQLite database Note data is increased, deleted or is inquired.
Further, the monitored end, which is additionally configured to establish, monitors module,
The monitoring module includes: short message matching unit, Gps coordinate reading unit, incoming call monitoring unit, short message monitoring list Member reads contact person's unit, short message transmission unit;
The short message matching unit comes signal code and content to obtain, and signal code in future and content are matched, with And judge to determine the record matching for coming signal code and database purchase, obtain the permission of monitoring;
The GPS coordinate reading unit, to the position coordinates at the end that is once monitored every certain interval acquiring, and with GPS coordinate is replied into monitoring mobile phone using character string as short message content;
The incoming call monitoring unit, to judge to send a telegram here flag bit whether be it is true, if it is non-real, do not send a telegram here, such as Fruit is very that future, electricity condition replied to monitoring mobile phone using character string as short message content;
The short message monitoring unit, monitors monitored end and receives obtaining monitoring client unlatching and corresponding execute monitoring instruction Stage, the monitored end receive the content of all short messages and receive the time of short message;
Reading contact person's unit, to call the api interface of Android mobile terminal ContentProvider component, Acquire corresponding relationship people;
The short message transmission unit, to send character message by sendTextMessage () function, and to described The query result data of monitoring client transmission prompt information and the other units of feedback.
Further, the monitored end is additionally configured to establish automatic camera module,
The automatic camera module is to open video monitoring, and the object of a newly-built Camera class is for while taking pictures It calls a delay function: after the delay time of setting, the function of taking pictures of Camera class being called to take pictures,
And by file output stream, the photo of .jpg format is formed, and photo is stored in built in specified path and is deposited In card storage.
Further, the monitored end is additionally configured to establish backstage multimedia message sending module
The multimedia message sending module is established as follows:
The monitored end access-in point information of setting,
Judge whether Wi-fi enables, close Wi-fi network if starting,
Current APN is obtained, and sends the multimedia message of shooting photo to monitoring client, realizes the picture control to monitored end.
Further, the monitored end is additionally configured to, and by third party's interface, the content of monitoring is forwarded to specified Wechat user.To achieve it, we can be privately owned by calling wechat to embed define one of browser JavaScript object: WeixinJSBridge, it is good to wechat that the correlation technique by operating this object may be implemented to share Friend, and judge the concern state an of WeChat ID and realize to pay close attention to the functions such as specified WeChat ID.All information are forwarded to finger Fixed wechat user realizes that conveniently cross-system remote mobile is monitored, returns and check immediately.
Based on above-mentioned, monitored the present invention also provides the wechat remote mobile based on agreement short message and retransmission method, including Following steps:
Preset information is monitored, and judges whether the preset information has carry out overmatching;The preset information, as storage Including at least in database: monitoring number and reserves a record of short message content,
It begins listening for, if the preset information is not carry out overmatching, obtains short message content and this short message content pair The addresser answered, and matched in the database;
If the preset information be matched: monitor Numbers Authority and reservation short message content be judged as monitor short message when, Monitoring instruction is executed according to the type code of setting is corresponding, completes monitoring.
Further, method further includes further safety certification step:
It is obtained according to the corresponding addresser of above-mentioned this short message content and transmits number,
It transmits number by described and is compared with the number list in pre-registered grant column list in the database,
If matching with the telephone number list in grant column list, addresser has the right to monitor, and listening state position parameter is true;
Listening state is checked in the database that storage registration user mobile phone number code table and/or registration user monitor cipher table Whether position parameter is true, if being matched if true, short message content is monitored the list in cipher table with the registration user, With being successfully followed by by monitoring information,
If it does not match, short message is normal short message.
Beneficial effects of the present invention:
One of present invention is monitored based on the wechat remote mobile of agreement short message and return system, can be realized short message control All information, are finally forwarded to specified wechat user, realized by video monitoring processed, the functions such as GPS positioning, mobile phone state inquiry Conveniently cross-system remote mobile is monitored, returns and check immediately.
The wechat remote mobile based on agreement short message in the present invention is monitored and retransmission method, is with character message, multimedia message Medium obtains the related letter of remote handset in such a way that authorization number authenticates short message to the Android phone at monitored end All information, are finally forwarded to specified wechat user by breath, realize conveniently cross-system remote mobile is monitored, passback and Immediately it checks, to achieve the purpose that remotely to monitor.
Detailed description of the invention
Fig. 1 is the system interaction process schematic of one embodiment in the present invention.
Fig. 2 is the further preferred step interaction schematic diagram in Fig. 1.
Fig. 3 is the implementation method flow diagram of one embodiment in the present invention.
Fig. 4 is the further preferred flow diagram in Fig. 3.
Specific embodiment
The principle of the disclosure is described referring now to some example embodiments.It is appreciated that these embodiments are merely for saying It is bright and help it will be understood by those skilled in the art that with the purpose of the embodiment disclosure and describe, rather than suggest the model to the disclosure Any restrictions enclosed.Content of this disclosure described herein can be implemented in the various modes except mode described below.
As described herein, term " includes " and its various variants are construed as open-ended term, it means that " packet It includes but is not limited to ".Term "based" is construed as " being based at least partially on ".Term " one embodiment " it is understood that For " at least one embodiment ".Term " another embodiment " is construed as " at least one other embodiment ".
It is appreciated that in this application based on Android mobile terminal, Android application is usually by one or more basic Component composition, the four big components that Android is provided are respectively: Activity component, Service component, Broadcast Receiver component and Content Provider component, wherein Activity component is responsible for interacting with user, is equivalent to and answers With a user interface [30] of program.Service is responsible for receiving wide for providing background service, Broadcast Receiver Message is broadcast, Content Provider provides standard for the data exchange across application.The building of any Android software system is all It is unable to do without this 4 components.
Activity is responsible for interacting with user, and in Android program, Activity represents an interface of mobile phone.Such as Fruit likens mobile phone at a browser, and Activity is equivalent to a webpage.Only one Activity of some programs, has May include multiple Activity.Number depends on the Functional Design of application program.Under normal circumstances, always there is one Activity is to be seen after user's startup program first.There are multiple user interfaces to need to start, then these Activity sometimes With regard to forming a stack, the Activity of current active jumps to next interface by current interface in stack top.Each Activity A window is all assigned to be drawn.Window is made of a series of views, these views are all inherited from View class.View group Part is the part really seen in Android application, and each View component controls one piece of specific rectangle in interface The operation of user is drawn in these rectangles and is responded in region.View component is the part that user really sees, but View Component, which has to be placed in the vessel, can just show, if necessary to which specific View component is shown by some Activity Out, it needs to call Activity.setContentView () function.General Android application is by multiple Activity composition.It can mutually be jumped between multiple Activity, for example, being jumped after by pressing next button Other Activity are gone to, this, which is jumped, can be set return value, be so many times quite convenient.
Service is also a highly important Android component, the difference of it and Activity are: it does not have figure Interface is not interacted with user, often operates in backstage, for example use other Android in application, in background acquisition in user When the service for the data that GPS coordinate, broadcasting music or calculating Activity component need, Service component can be used.With Activity is the same, and Service component has independent Life Cycle when needing to inherit Service base class, Service assembly operating Phase.
BroadcastReceiver is another important application component, and such as its literal meaning, it is that a broadcast disappears The receiver of breath.In android system, there are many broadcast messages from internal system, such as: receive short message, battery Low battery etc., application program can possess any number of radio receiver to make a response to the information of broadcast.From generation From the point of view of the realization of code, BroadcastReceiver is similar to event sniffer Listener.Unlike between the two: event What monitor was monitored is object in program, and it is other groups in Android program that BroadcastReceiver, which is monitored, Part.By rewriting onReceive (Context context, Intent in the subclass of BroadcastReceiver Intent) function is realized.Sentenced by using intent.getAction () to obtain the intention in broadcast in the function It is disconnected, if it is the intention of formulation, then broadcast is responded.
The effect of ContentProvider is that specific application data is supplied to other application programs to use. Various components in Android application are mutually indepedent, respectively operate in the Dalvik virtual machine of oneself, if necessary to not With carrying out real-time data exchange in application program, such as: an application program, which needs to read from contact management's application, to be referred to Determine the data of contact person, it is necessary to using Android for across standard --- the ContentProvider provided using data.It is logical It often needs to inherit ContentProvider base class in use, data is read and managed for other application program and are provided The method of series of standards.Other application program calls these methods using ContentResolver object, it may be assumed that one Application program is sticked one's chin out the data of storage with ContentProvider, another program uses corresponding ContentResolver accesses these data.
It is appreciated that the storage of SQLite database is realized.It is android system database, passes through research data base The handling function of the creation method and database of file and tables of data come realize creation to data, reading, increase, deletion and Inquiry.
In this application, the design at the interface U I is further related to: according to the realization target and operational process of the application, the application Three interfaces are designed altogether, are respectively: main interface, registration information display interface and interface of taking pictures.It is defeated that main interface is responsible for reception user The authorization number that enters, agreement password, authorized telephone number to be deleted and to registration button, inquiry button, delete button and The click action of control button;Registration information display interface is mainly responsible for display and includes all chartered authorization numbers and prison Listen the list of password;Take pictures interface be responsible for show camera realtime graphic.
Main interface: authorization number static text, component type: purposes: TextView shows the quiet of " telephone number " text State text.
Main interface: authorization number edit box, component type: purposes: EditText receives the telephone number letter of user's input Breath.
Main interface: agreement password static text, component type: TextView, purposes: the static state text of display " password " text This.
Main interface: agreement password edit box, component type: purposes: EditText receives the password of user's input.
Main interface: registration button, component type: purposes: Button receives user to the click event of registration button.
Main interface: inquiry button, component type: purposes: Button receives user to the click event of inquiry button.
Main interface: delete button, component type: purposes: Button receives user to the click event of delete button.
Main interface: control button, component type: purposes: Button receives user to the click event of control button.
1. the design of the realization of main interface, interface passes through under the res/layout catalogue of Android project in Eclipse Creation edits XML file to realize.Main interface herein is modified under the catalogue by creating Android project Main.xml file is realized.Method is to double-click this document in EclipsePackage Explorer, is modified in workspace The code of xml document.Main interface uses TableLayout table-layout form, and the characteristics of this layout is the shape using row, column Formula manages UI control, and the line number of table is controlled by addition TableRow.By the android in table-layout: Orientation parameter be set as " vertical " will be laid out in TableRow container and component be arranged vertically from top to bottom. Then table row container and each component are added in table-layout, specific step is:
(1) first table row container, the static text comprising authorization number and editor in container are added in table-layout Frame.It include multiple nodes in xml document, each xml section represents the information [42] for realizing different function.Be herein < TableLayout..>and</TableLayout>tableRow container is added between node, is then existed<tableRow>with</ TableRow > between add static text TextView component, inner parameter is set as android:text=" telephone number: ", Since Android closes copy editor's function of the component, the static state that content is " telephone number: " that it shows is literary This;Then an EditText component is added again, and parameter is set as android:d="@+id/num ".It is phone by the parameter Number text edit box component is assigned with the identifier of entitled " num ", and Android can give num in the id inner classes of R.java A hexadecimal data are assigned, this can be obtained with findViewById (R.id.num) sentence in later Java code The data of component.As soon as TableRow container to increase by one per a component is added inside it in same a line and arrange, therefore The first row two components of increased TextView, EditText are arranged side by side in same a line.
(2) two TableRow containers are further added by table-layout in an identical manner, since table cloth is set as vertical Arrangement, newly added table row container are located in second and third row.Identical method is taken with step (1), in second table row container Middle two components of addition TextView, EditText, wherein TextView setup parameter android:text=" password: ", EditText setup parameter is android:id="@+id/psw ".It is also added and is joined with identical method in the third line table container Number is that the TextView component and parameter of android:text=" deleting number: " is android:id="@+id/key " EditText component.
(3) Button component is added outside TableRow in table-layout, since the sortord of layout interface is vertical Mode, component list Zhan Yihang in layout are located at the third line.Its inner parameter is set as android:id="@+id/ Insert ", android:text=" registration ", table character are " registration ", and the identifier of imparting is " insert ".
(4) inquiry button assembly is added outside table-layout according still further to identical mode, parameter is set as android:id ="@+id/search ", android:text=" inquiry ";Add delete button component, parameter be android:id="@+ Id/delete ", android:text=" deletion ";Control button component is added, setting parameter is android:id="@+id/ Listen ", android:text=" are begun listening for ".
In this way on interface just be provided with three groups of text edit boxes and four buttons, by main program acquire data and The registration of data, Delete query, monitor function can be realized in addition logical code.A test is also added in main interface herein Button, parameter are android:id="@+id/test ", and android:text=" test " is associated source file in testing button Code is added in corresponding function may be implemented customized test function.
2. the registration information display interface of the realization of registration information display interface, the application uses ListView list element It realizes, the component is very widely used in android system, all list items are shown by vertical mode.This Text shows all authorization numbers by registration and agreement password pair with it.The creation of registration information display interface layout passes through It created under res/layout catalogue, edit popup.xml to realize.The xml uses LinearLayout linear placement, Android:orientation parameter is set as " vertical ", i.e. all components of the layout are arranged successively vertically downward.< LinearLayout..></LinearLayout>between add<listView../>component, android:id parameter are set as "@+ Id/show " distributes the identifier of entitled show to ListView component, facilitates the calling of source file.
After file obtains ListView component, needing to be arranged to ListView it needs list items to be shown, herein The list items of ListView component are a linear placements, i.e., the content of every a line is all a series of group of vertical arrangements in list Part.The linear placement in res/layout catalogue by creating editor's line.xml file realization, in linear placement successively Insert the TextView component of android:text=" monitoring people's number ", the EditText of android:id="@+id/num " Component, the EditText group of the TextView component and android:id="@+id/psw " of android:text=" password " Part.List item is tied to List View by the Adapter adapter in source file, and is assigned in list items and being edited by program The content of display interface can be realized in the content of frame.
3. the display at interface of taking pictures, the design at interface of taking pictures to newly-built under res/layout catalogue by editing Cameramain.xml topology file realizes that specific way is: the layout is laid out using frame, and frame cloth intra-office addition parameter is set The SurfaceView of android:id="@+id/Surface " is set to realize.
Three above interface constitutes the man-machine interactive interface at system and interface, in realization herein using the corresponding cloth of editor The mode of office file document is realized.Eclipse also provides the graphical development interface of What You See Is What You Get for developer, passes through handle Each component is dragged in interface as playing with building blocks, and the realization of interface layout can be completed in the parameter that component is simply provided.
It is appreciated that the division methods of the system in the application directly contact mainly according to top-down sequence Be user interface layer, i.e. UI layers.This layer of main function is to realize human-computer interaction.The function of including has: responding the point of user Hit and input action, display chartered authorization number and the corresponding password for inquiry of authorization number, display system it is real-time State etc..Between user interface layer and android system and underlying database is function realization layer.The layer is mainly realized It monitors matching, judgement processing and information and feeds back three function sub-modules.Wherein, monitoring matching module is responsible for extraction, analysis receives Monitoring short message number and content it is matched with the registration information in database grant column list;Judging treatmenting module is negative Duty is according to the processing result for monitoring matching module, if successful match, according to the inquiry code that monitoring mobile phone is sent, respectively It calls GPS to monitor module, short message monitoring module, retrieving contacts module, incoming call monitoring module, backstage photo module, extracts this The result data of a little modules, passes to information feedback module;Information feedback module is by calling multimedia message sending module by camera The pictorial information of shooting replies to monitoring mobile phone, and by character message sending module, other data informations are replied to monitoring hand Machine.
It is database below function realization layer, it is responsible for storage, maintenance registration subscriber phone number and registration user about Determine encrypted message list, provides data maintenance service to UI layers and function realization layer.
Please refer to the system interaction process schematic that Fig. 1 is one embodiment in the present invention, in the present embodiment based on about The wechat remote mobile for determining short message is monitored and return system, comprising: monitoring client and monitored end, the monitored end is configured To monitor preset information, and judge whether the preset information has carry out overmatching;The preset information, as depositing in number According to including at least in library: monitoring number and reserve one of short message content record, if the preset information is not carry out Match, then obtains short message content addresser corresponding with this short message content, and matched in the database;If described pre- Confidence breath is matched: monitoring Numbers Authority and reservation short message content is judged as when monitoring short message, then the monitoring client is according to setting Fixed type code is corresponding to execute monitoring instruction, completes monitoring.Fig. 2 as shown is that the further preferred step interaction in Fig. 1 is shown It is intended to, as preferred in the present embodiment, further includes: before judging whether the preset information has progress overmatching: according to upper State the corresponding addresser of this short message content and obtain and transmit number, by it is described transmit number with it is pre-registered in the database Number list in grant column list is compared, if matching with the telephone number list in grant column list, addresser has the right to supervise It listens, listening state position parameter is true;The database of cipher table is monitored in storage registration user mobile phone number code table and/or registration user Whether middle inspection listening state position parameter is true, if if true, short message content and the registration user are monitored the name in cipher table It is singly matched, successful match is followed by by monitoring information, if it does not match, short message is normal short message.As in the present embodiment It is preferred, when it is described it is monitored termination by monitor short message after, to monitoring client send SMS Tip: successful match, and/or, return Multiple 1 acquisition camera is taken pictures photo, and/or, it replys 2 and obtains GPS coordinates, and/or, it replys 3 and obtains missed call information, and/ Short message is not looked into or, replying 4 and obtaining, and/or, it replys 5 and obtains contact information, and/or, it replys 6 and cancels prison.As this reality Apply preferred in example, the monitored end is additionally configured to establish data memory module, and the data memory module is to be based on SQLite Database monitors people's field corresponding with agreement short message content, and executes SQL registration, inquiry, cancel statement, The monitoring number of acquisition and/or agreement note data are increased, deleted or inquired in the SQLite database.
The interactive process at above-mentioned monitoring client and monitored end is as follows:
STEP1: " listener password ", " agreement short message content ", " deleting number " is arranged as Entry Interface in register interface Equal UI control is responsible for acquisition respective symbols string content, increases the buttons such as " registration ", " inquiry ", " deletion ", receives Click event, It realizes the increasing monitored number and arrange short message content, deletes, looks into.
STEP2: establishing SQLite database, establishes and monitors people's field corresponding with agreement short message content.It is registered clicking After the buttons such as " registration ", " inquiry ", " deletion " on interface, SQL statement is executed, is realized in the database to the monitoring number of acquisition Increase, deletion and the inquiry of code, agreement note data.
STEP3: after after clicking " monitoring " button of register interface, to all monitoring numbers stored in database --- Agreement short message content record carries out traversal extraction, is encapsulated in Buddle object, passes to monitoring module by Intent object. The derived class that module is BroadcastReceiver component is monitored, is monitored in such with onReceive () function.
STEP4: a short message is sent from another mobile phone to end mobile phone is monitored, content is in SQLite database The good agreement short message of number of registration.
STEP5: judge short message transmit number and content whether with the record matching mistake in database.
STEP6: it if not matching, extracts, match.SMS is generally constituted comprising sms center number Code, other party number and short message content three parts.PDU (protocol Data Unit) mode gradually becomes and is mainly used to send out at present The mode [38] of SMS information is sent and received, therefore obtains the phone number and institute's photos and sending messages of addresser from the PDU for obtain short message Content, then compared one by one with the record in table in SQLite database respectively, if sending number and content and one therein Content exact matching in record, then be set to TRUE for match parameter.
STEP7: by monitoring module, always conveniently machine sends SMS Tip, and content is that " successful match replys 1 and obtains view Frequency monitors, and 2 obtain GPS coordinate, and 3 obtain missed call, and short message is not looked into 4 acquisitions, and 5 obtain designated contact, 6 resettings ".
STEP8: the type code for wanting inquiry content is replied according to SMS Tip.
STEP9: having matched if carrying out signal code, calls specified module according to type number.It is extracted by specified module Related data sends related data to monitoring mobile phone.
STEP10: if code is 1, opening video monitoring, calls photo module, and the object of a newly-built Camera class is used for It takes pictures, calls a delay function, after delay a period of time (such as 5 seconds), the function of taking pictures of Camera class is called to take pictures.Pass through File output stream, forms the photo of jpg format, and photo is stored on the embedded memory card of specified path.
STEP11: calling multimedia message module, and multimedia message module reads photo from storage card, sends multimedia message to monitoring mobile phone.
All information: being finally forwarded to specified wechat user by STEP12, realizes that conveniently cross-system remotely moves It is dynamic to monitor, return and check immediately.
STEP13: if code is 6, match flag parameter is set to FALSE, matches letter again.
As preferred in the present embodiment, the monitored end, which is additionally configured to establish, monitors module, the monitoring module Include: short message matching unit, Gps coordinate reading unit, incoming call monitoring unit, short message monitoring unit, reads contact person's unit, is short Information transmitting unit;The short message matching unit comes signal code and content to obtain, and signal code in future and content progress Match, and, judge to determine the record matching for coming signal code and database purchase, obtains the permission of monitoring;The GPS coordinate is read Unit, to the position coordinates at the end that is once monitored every certain interval acquiring, and with by GPS coordinate using character string as short Letter content replies to monitoring mobile phone;The incoming call monitoring unit, to judge to send a telegram here flag bit whether be it is true, if it is non-real, It does not send a telegram here then, if it is true, future, electricity condition replied to monitoring mobile phone using character string as short message content;The short message is monitored Unit, to obtain monitoring client unlatching monitor monitored end receive it is corresponding execute monitoring instruction phase, the monitored end is received To all short messages content and receive time of short message;Reading contact person's unit, to call Android mobile terminal The api interface of ContentProvider component acquires corresponding relationship people;The short message transmission unit, to pass through SendTextMessage () function sends character message, and sends prompt information and the other units of feedback to the monitoring client Query result data.
Monitor module
The matching of short message in short message matching unit
1.1 acquisitions come signal code and content
When user clicks " monitoring " button at beginning interface, generation click event is triggered and is bound on " monitoring " button object OnClickListener monitor, so that SmsReceiver.java file is run, into listening state.It creates herein SmsReceiver is inherited from BroadcastReceiver.In Android, Broadcast is that one kind is widely used in application The mechanism of information is transmitted between program.BroadcastReceiver in the big component of Android tetra- is a kind of monitoring of overall importance Device can easily realize being in communication with each other between different components, it is for receiving the Broadcast that program is issued Intent.The Chinese of Intent means " intention ", and in android system, a component starts another by Intent Component, popular says, Intent is exactly to tell system " how someone will do something ".In this system, SmsReceiver is The subclass of BroadcastReceiver just calls the onReceive function in such after each Broadcast event occurs. The function of SmsReceiver class is to receive short message event to mobile phone to monitor, and judge the short message received, calls phase Module is answered to be handled.When mobile phone receives short message will broadcasted content be " The message of android.provider.Telephony.SMS_RECEIVED ".
If sentence is added in the onReceive function of SmsReceiver class, obtains broadcast thing using getAction () The intention of part acts, if movement is " android.provider.Telephony.SMS_RECEIVED ", illustrates that mobile phone receives One short message.
PDU is the major way for sending and receiving SMS, by using createFromPdu () function in a program, SmsMessage object is converted by the pdu received (protocol Data Unit).Pass through again The letter telephone number of acquisition is stored in strsbPhone variable by getDisplayOriginatingAddress () function In, the content of text of the short message of acquisition is stored in by strsbPsw character by getDisplayMessageBody () function In string variable.
1.2. signal code in future and content are matched
It obtains and is matched after coming signal code and content, i.e., awarded what is stored in telephone number and short message content and database Power number and password compare one by one.The method taken herein is to obtain all records in database data table, by awarding in record All data weighed in number phone field are stored in the character string dimension of an entitled strNum according to the sequence of major key, by It is set to " true " in the match flag variable bMatch that will be defined as boolean type if successful match, with Toast in screen It shows " successful match ", always believes that phone number sends a SMS Tip.
1.3. judgement is handled
When determining record matching come signal code and database purchase by monitoring arbitration functions module, namely illustrate to write letters Number and the content sent registered in systems, this, which carrys out signal code, to be trusted, and have permission monitoring.Cause This sends a character message to the number, informs other side's successful match, and inquiry other side needs to obtain which data, short message Content is that " successful match is replied 1 and monitored, and reply 2 obtains mobile phone locations, replys 3 and obtains missed call, 4 acquisition of reply is newly arrived short Letter replys 5 inquiry designated numbers, replys 6 and cancel matching." after other side receives the SMS Tip, a Codabar code short message can be sent Expression needs the type monitored.When mobile phone receives short message again, onReceive function will be called again, by extract come Believe the telephone number and short message content of other side, if carrying out signal code is matched number just now, match flag position be " true " then Corresponding functional module branch is selected according to short message content with switch sentence.
Gps coordinate in 2.Gps coordinate reading unit is read
It is character " 2 " when monitoring the code short message content that mobile phone is sent, then GPS is called to monitor module.The program of the module It is completed in entrance class spy, major function is obtained according to system clock every certain interval after oracle listener starting The position coordinates of Android phone.Service in the big component of Android tetra- is the component most like with Activity, They all represent executable program, but Service does not have the interface UI, in running background.Android provides a large amount of system Service, developer can obtain the system service of specified title by getSystemService ().Once obtaining specific Service, can using tool function therein realize developer exploitation purpose.
The application, which just passes through, calls getSystemService (Context.LOCATION_SERVICE) function to obtain The positioning service that Android is provided obtains android system and GPS positioning function is supported specially to provide LocationManager class, the object that the positioning service of Android all passes through such generate, each by calling such to provide A function can obtain the GPS service of system.Common function has:
boolean addGpsStatusListener(GpsStatus.Listener listener);GPS is added to monitor Device.
GpsStatus getGpsStatus(GpsStatus status);Obtain GPS state.
Location getLastKnownLocation(String provider);It is obtained most according to the supplier of GPS Primary known Location afterwards.
LocationProvider getProvider(String name);Obtain specified LocationProvider.
void requestLocationUpdates(String provider,long minTime,float minDistance,LocationListener listener);According to specified provider and minimum range resolution ratio, The specified monitor of specified time internal trigger.Etc..
The application passes through it after the object for obtaining LocationManager using getSystemService () function Calling requestLocationUpdates (LocationManager.GPS_PROVIDER, 3000,8, NewLocationListener () function, which is with 3 seconds according to GPSprovider for the period, with 8 meters for minimum range It is updated periodically mobile phone location, and triggers LocationListener monitor.In function body, rewrite OnLocationChanged function updates Location object, and establish one when the Location non-empty of acquisition " real-time location information: n ", " longitude: " character string is gradually added, then by appen () function in StringBuilder By obtaining the longitude information in Location object with getLongitude () function, and it is attached to appen () function StringBuilder and then using identical method StringBuilder addition " n latitude: character string, Latitude The elevation information that latitude information that () function obtains, " n height: " character string, getAltitude () function obtain.In this way StringBuilder.toString () is the character string for the GPS information that system obtains.When Location object is empty, Then GPS character string is set to " in coordinate acquisition ".Monitoring hand is replied to using the character string as short message content when last GPS module Machine completes the monitoring to mobile phone location.
3. the incoming call in monitoring unit of sending a telegram here is monitored
When the short message content of acquisition is character " 3 ", calling incoming call monitoring module.The management of mobile phone communication state relies on The TelephonyManager that Android is provided services class, monitors with GPS and obtains LocationManager service class in module Method it is identical, incoming call monitoring module also by call getSystemService
(Context.TELEPHONY_SERVICE) function obtains TelephonyManager.Get the manager Afterwards, a large amount of getX () functions of manager class offer can be called to obtain the relevant information of phone.
The program of the incoming call monitoring module of the application is realized in main program spy.java.One is created first PhoneStateListener, it is a conversation monitoring device, by calling the onCallStateChanged inside monitor (int state, String incomingNumber) function carrys out electricity condition come the Android phone difference to monitored end and makees Different response out.Wherein parameter state is a shaping variable, represents the state code of incoming call.IncomingNumber word Symbol string then represents the telephone number of incoming call.The function is rewritten, switch (state) branch function is added in function body, according to The different numerical value for carrying out electricity condition state carry out different disposal.
When the value of state is TelephonyManager.CALL_STATE_IDLE, show the Android at monitored end Mobile phone is in idle condition, and jumps out branch with break sentence.
When the value of state is TelephonyManager.CALL_STATE_OFFHOOK, mobile phone is in off hook state, Branch is jumped out with break sentence.
When the value of state is TelephonyManager.CALL_STATE_RINGING, show that mobile phone is in incoming call shape State, this state are exactly the state that this system module needs to monitor, and sbIncoming.append (new is called under the branch Date ()+" incoming call: "+incomingNumber) sentence, time, incoming number incomingNumber it will be attached to storage at this time It deposits in the StringBuilder static variable sbIncoming of incoming information, and the boolean type for representing incoming call flag bit is become Amount bIncoming is set to true.
This modularity function and GPS monitor the onCreate that the status monitorings modules one such as module are located on main program spy.java It creates in function.Monitoring system brings into operation, the creation function monitoring module in main program is called to bring into operation, and constantly obtains The system mode in static variable is updated storage, when monitoring matching module successful match, according to the monitoring code of other side's reply When transferring corresponding status monitoring module, which is sent to the numerical value being stored in static variable in a manner of short message pair Side.
When incoming call monitoring module is called, whether the flag bit bIncoming that judges to send a telegram here is true, if it is false, Expression is not sent a telegram here, then the short message replied without incoming call content if it is true will include sbIncoming.toString The message reply of () string content completes the inquiry for carrying out electricity condition to other side.Realize the monitoring to mobile phone incoming calls record.
4. the short message in short message monitoring unit is monitored
When the short message content of acquisition is character " 4 ", calling does not look into short message and monitors module.The purpose that short message herein is monitored Be: when the Android phone at monitored end not at one's side when, obtain and received from the Android phone that system is opened to monitored end The Android phone for monitoring the monitored end of code phase to the short message for monitoring handset replies receives the content and receipts of all short messages To the time of short message, so that the owner of the Android phone at monitored end be avoided to omit important information.From the point of view of purpose, supervised The short message that the Android phone at control end obtains does not include monitoring the matching sms and code short message that mobile phone is sent certainly.It is specific Implementation method be: add correlative code in the short message monitoring file SmsReceiver.java of system.In onReceive Whether a newly-built boolean type variable bMatch is in the flag bit of matching status, default as monitoring mobile phone outside () function Value is set as false.After mobile phone is connected to short message, that is, enter short message matching stage.The hand monitored matching module separation, extract short message Number and content are compared the content of machine number and short message with the record in database, if coming in signal code and database Record matching, then bMatch is set to true.If mismatched, namely illustrate that the letter is number monitored other than matching mobile phone Code either monitors the short message that number is sent in the non-snoop stage, at this moment records the short message content isolated, with new The time that Date () is obtained is stored in character string together, is formed primary letter record, will not look into short message record character string and use Append function is constantly additional to be formed completely not look into short message record, and correlative is as follows:
SbOtherMsg.append (" short message source: ");
sbOtherMsg.append(strsbPhone);
SbOtherMsg.append (" n-------- short message content --- --- -- n ");
sbOtherMsg.append(strsbPsw);
sbOtherMsg.append("\n--------------------------\n");
Wherein sbOtherMsg is a StringBuilder variable, is used to store letter content;StrsbPhone is short Letter oracle listener comes what signal code was stored as bMatch for what is isolated under false, that is, non-snoop mode StringBuilder variable;StrsbPsw is the letter content isolated under non-snoop mode.Last short message monitors module will SbOtherMsg replies to monitoring mobile phone in the form of character string, realizes the monitoring for not looking into mobile phone short message record.
5. reading the reading contact person in contact person's unit
When the short message content of acquisition is character " 5 ", calling does not look into short message and monitors module.The module has used Android tetra- The ContentProvider component of big component.It is the standard API that data exchange is carried out between different application, is one The interface of data is externally provided.When application program need the data of oneself to be exposed to other programs using when can pass through ContentProvider realizes that other programs operate the data of its exposure by ContentResolver.It can be ContentProvider is understood as a website, and ContentResolver is understood as a networking client. ContentResolver accesses ContentProvider by Uri as client accesses website by network address. Android system provides many ContentProvider for developer's access.Developer uses in access GetContentResolver can obtain ContentResolver object, then provided by function carry out operation data. The function used herein is query (Uri uri, String [] projection, String selection, String [] selectionArgs,String sortOrder);The function, which is used to inquire the corresponding ContentProvider of specified Uri, to be pressed The data provided according to specified requirements.Wherein uri is the address for inquiring target data;Projection is for identifying which has in uri A little column need to be included in the Cursor returned;Selection is the filtering for inquiring data, is equivalent to SQLwhere sentence Querying condition;SelectionArgs is querying condition parameter, and cooperation selection parameter uses;SortOrder representative is pressed The mode being ranked up according to the projection column specified.
After calling the module, the Android phone at monitored end automatically replies a SMS Tip to number is monitored, interior Hold is " name that R. S. V. P. needs inquiring contactor ".After other side replys the contact person for needing to inquire, short message monitors module in the future Letter separation, short message content is stored in string variable strsbPsw.At this moment it is monitored in module in contact person and establishes one Cursor object cursorCont, its value be function getContentResolver () .query (
ContactsContract.Contacts.CONTENT_URI, null, null, null, null) return value.Its Middle ContactsContract.Contacts.CONTENT_URI is the Uri of phone contacts.By just being obtained with superior function All Contacts in mobile phone.Then the Cursor object is traversed by while (cursorCont.moveToNext) { }.? The string variable strCont of storage traversal name is created in while function;Then strCont and storage mobile phone is monitored to return The variable strsbPsw of multiple query name is compared, if strCont.equals (strsbPsw) is true, explanation The contact person of strCont storage is the contact person for monitoring mobile phone and needing enquiry number.Connection is obtained by the contact person id again The phone of people, id are unique in the contact list.Contact person id string variable strId is created in if function,;Then Phone number list is obtained by id, because the same contact person can store multiple numbers.Newly-built Cursor object CursorPhone thus obtains the phone number list of contact person to be checked.It is again storage enquiry number StringBuilder.toString () is sent to monitoring mobile phone after the completion of traversal by StringBuilder variable, realizes connection It is people's search function.
6. the short message in short message transmission unit is sent
The system realized herein is the message monitoring system based on Android, and short message is as the means monitored and monitors life It enables, the carrier of feedback mobile phone state, in addition to transmitting image information, is all made of the mode of character message.For sending short message Manager SmsManager as TelephonyManager and LocationManager and android system provide Service, it provides the function shaped like sendXXMessage () to send short message.It is provided herein using such SendTextMessage () function sends character message.Prompt information and each mould of feedback are sent to mobile phone is monitored by the function The query result data of block.Such as: missed call content information is sent to mobile phone is monitored by following sentence.
SmsManagersManager;
SManager=SmsManager.getDefault ();
sManager.sendTextMessage(strsbPhone,null,strIncoming,pi,null);}
The object sManager of a SmsManager class is established in a manner of default first, is then called by it SendTextMessage () function sends character message.The prototype of sendTextMessage () function are as follows:
voidsendTextMessage(StringdestinationAddress,String scAddress, Stringtext,PendingIntent sentIntent,Pending Intent delivery Intent);Wherein each ginseng It is several to be meant that:
DestinationAddress: destination address, that is, the phone number to be sent;
ScAddress: short message service center is all herein null, represents the short message service center of current default;
Text: the content of short message is sent;
SentIntent: when message issues, the information report of success or failure is by PendingIntent come wide It broadcasts.If the parameter is sky, transmitting program can be checked one time by all location procedures, will lead to sending time extension in this way.
DeliveryIntent: when message is sent to addressee, which can be broadcasted.
In some embodiments, the monitored end is additionally configured to establish automatic camera module, the automatic camera mould For block to open video monitoring, the object of a newly-built Camera class is for calling a delay function while taking pictures: setting After fixed delay time, the function of taking pictures of Camera class is called to take pictures, and, by file output stream, form .jpg format Photo, and photo is stored on the embedded memory card of specified path.The automatic camera module is in the short message content when acquisition For character " 1 ", backstage photo module is called.The function mainly take pictures by automatic calling mobile phone camera, by the photo of shooting It is stored in mobile phone designated position, backstage multimedia message sending module is recalled and is sent to letter mobile phone, realize to mobile phone peripheral situation Monitoring.Start the file CameraActivity.java for being responsible for backstage and taking pictures with Intent method when calling the module.Specifically Code are as follows:
Intent intent1=new Intent (context, CameraActivity.class);
context.startActivity(intent1);
The interface layout files of photo module under the res/layout file of Android by establishing Cameramain.xml is realized.SurfaceView control is added on cameramain.xml for showing camera picture. SurfaceView directly can obtain image data from the hardware interfaces such as memory or DMA, be that a very important drawing is held Device.The file for taking pictures is CameraActivity.java herein.SetContentView is used in such (R.layout.cameramain);Sentence calls page layout of taking pictures, and passes through (SurfaceView) this.findViewById (R.id.Surface) sentence obtains the SurfaceView component object for page layout of taking pictures, and getHolder () is called to it The parameter setting of function completion SurfaceView component.
Android provides Camera class and takes pictures to control.The object camera that Camera class is established in such, passes through Camera.takePicture () function is called to take pictures.Interface of taking pictures in the present system is automatic spring, due to reality Android phone jumps to interface of taking pictures from main interface in operation, camera is opened at interface of taking pictures, presses shutter, storage automatically Picture requires the regular hour, takes pictures if jumping to interface of taking pictures and calling directly takePicture () function, takes pictures it It jumps to multimedia message sending module at once afterwards and will lead to and take pictures unsuccessfully.Therefore take Handler message passing mechanism herein, by Delay function is called in multithreading, sends the message to that takePicture () is called to take pictures function and multimedia message sending module, To solve problem above, the sentence of use are as follows:
The above code joined two sleep () delay functions in new thread, and setting delay sent designated value after 5 seconds Sending designated value for the message initiated function of taking pictures of 0x1233, then after postponing 8 seconds is the message initiated entitled of 0x1234 The multimedia message of MMSTest1Activity sends interface.
In addition, the takePicture () function of Camera class includes 3 parameters, wherein the 3rd parameter is one PictureCallback object, after program, which obtains, takes pictures resulting image data, PictureCallback object will be by Readjustment, when shooting event, will be achieved picture in a manner of byte [].
In some embodiments, the monitored end is additionally configured to establish backstage multimedia message sending module, the multimedia message hair Send module to establish as follows: the monitored end access-in point information of setting judges whether Wi-fi enables, closes if starting Wi-fi network obtains current APN, and the multimedia message of shooting photo is sent to monitoring client, realizes and supervises to the image at monitored end Control.The backstage specific method for building up of multimedia message sending module is as follows:
To the setting value of the operation mobile phone access point of message monitoring system are as follows:
Title: MMSC
Apn:Uniwap
MMSC:http: //mmsc.myuni.com.cn
MMSproxy:10.0.0.172
Port:80
ApnType:mms
Since monitored mobile phone is completely in unattended state, and Android is just sent without providing backstage at all The interface of multimedia message.Author inquires great mass of data, and the method for finding the hair multimedia message that general textbook is told about is to call Android system The included multimedia message interface of system needs artificially to input multimedia message relevant information and clicks send button, nothing after sending interface into multimedia message Method reaches the requirement of system real-time video monitoring.Therefore, the multimedia message kit provided herein using Android, including com.google.android.mms、com.google.android.
Mms.pdu, com.google.android.mms.uil, the multimedia message of self-developing backstage send program.Establish one The file of entitled MMSTestActivity.java, the backstage for being responsible for multimedia message are sent.
Firstly, obtaining WifiManager pairs by getSystemService (Context.WIFI_SERVICE) function As.If isWifiEnabled () return value of WifiManager be it is true, indicate that Wifi is enabled, due to send multimedia message need through Mobile cellular network is crossed, therefore calls setWifiEnabled () function of WifiManager that its parameter is set as false, is closed Close Wifi network.Then by calling getSystemService (Context.CONNECTIVITY_SERVICE) to obtain ConnectivityManager object.ConnectivityManager mainly manages and is connected to the network relevant operation.Logical Cross call the object getNetworkInfo (
ConnectivityManager.TYPE_MOBILE) function obtains NetworkInfo object, calls the object GetExtraInfo () function obtains current APN.APN is " access point name ", no matter using connection 3G or moves 2G net Network, it is necessary to be arranged by mobile phone A PN, the parameter that must be configured when being surfing Internet with cell phone.The 2G business WAP browser of China Unicom Used in APN be " UNIWAP ", the APN that 3G business WAP browser uses is the monitored end tested herein " 3GWAP " Just starting multimedia message sends letter when Android phone is equal to " uniwap " using connection network, therefore the current APN obtained later Number.Multimedia message is sent in function, constructs MMSInfo object, and it is the note number that request sends video monitoring that its destination Mobile Station International ISDN Number, which is arranged, File path is the path of storage shooting photo.The multimedia message of shooting photo is sent to monitoring mobile phone by sendMMS () function, Realize the picture control to the Android phone at monitored end.
In some embodiments, the monitored end is additionally configured to, and by third party's interface, the content of monitoring is forwarded To specified wechat user.In view of current most C-terminal users are fitted with the wechat of Tencent, while short message and multimedia message Often intercepted and shielded by softwares such as mobile phone bodyguards, thus we need further to be forwarded to all information it is specified micro- Credit household, to realize that accessible cross-system remote mobile is monitored, returns and checked immediately.To achieve it, we can By calling wechat to embed the privately owned JavaScript object that browser defines: WeixinJSBridge, by operating this The correlation technique of a object may be implemented to share to wechat good friend, and judges the concern state an of WeChat ID and realize concern The functions such as specified WeChat ID.All information are forwarded to specified wechat user, realize conveniently cross-system remote mobile It monitors, return and check immediately.
Fig. 3 is the implementation method flow diagram of one embodiment in the present invention, and step S300 monitors preset information, and sentences Whether the preset information that breaks has carry out overmatching;The preset information, as depositing in including at least in database: monitoring Number and a record for reserving short message content, step S301 is begun listening for, if the preset information is not carry out overmatching, Short message content addresser corresponding with this short message content is obtained, and is matched in the database;If step S302 institute State preset information be matched: monitor Numbers Authority and reservation short message content be judged as monitor short message when, then according to the class of setting Type code is corresponding to execute monitoring instruction, completes monitoring.The message monitoring system based on Android mobile terminal in the present embodiment System, the system with installation and operation environment are Android2.0 system above, and the form interacted with the external world is mobile phone character message and coloured silk Letter.By installing the system in monitored Android mobile terminal, registration has the phone number of monitoring right in system The monitoring password of code and agreement, when the monitoring client (mobile phone) having permission sends the monitoring password appointed, system is authenticated Prompt information is replied in matching if successful match, which content inquiry other side, which will inquire and assign other side, inquires code, is monitored The Android phone at end, which is connected to after the inquiry code that other side sends again, to be completed to take pictures, acquires mobile phone location, missed call, not The contents such as short message, contact person are looked into, by way of replying multimedia message, short message, are realized to the long-range of the Android phone at monitored end Monitoring.All information are finally forwarded to specified wechat user, realize that conveniently cross-system remote mobile is monitored, passback With check immediately.By above step realize technical effect include at least, by the remote terminal (mobile phone) of system authorization with The mode for sending and receiving short message, to equipped with this monitoring system the camera of Android phone, position coordinates, missed call, Short message etc. is not looked into and carries out the monitoring for having security audit, to realize to the long-range of the Android phone status information at monitored end It monitors and controls.All information are finally forwarded to specified wechat user, realize that conveniently cross-system remote mobile is supervised It listens, return and checks immediately.
Fig. 4 is the further preferred flow diagram in Fig. 3, further includes further safety certification step: step S400 root It is obtained according to the corresponding addresser of above-mentioned this short message content and transmits number, step S401 transmits number and the database for described In number list in pre-registered grant column list be compared, whether the telephone number list in step S402 grant column list Matching? if step S403 is matched with the telephone number list in grant column list, addresser has the right to monitor, listening state position parameter It is true;Step S404 is in storage registration user mobile phone number code table and/or registers inspection prison in the database that user monitors cipher table Listen whether mode bit parameter is true, if step S405 is if true, monitor the name in cipher table for short message content and the registration user It is singly matched, successful match is followed by by monitoring information, and step S406 is if it does not match, short message is normal short message.When being supervised Control end Android phone not at one's side when, user use monitoring client for example, monitor Android hand of the mobile phone to monitored end Machine sends short message, and the Android phone at monitored end answers short message automatically, and monitors mobile phone and monitored end to realize The information interaction of Android phone.It monitors end mobile phone and quilt is obtained by the character message that the Android phone at monitored end is sent The status data of the Android phone of monitoring client, or shot by the Android phone camera that multimedia message obtains monitored end Photo.All information are finally forwarded to specified wechat user, realizes that conveniently cross-system remote mobile is monitored, return It passes and checks immediately.According to the above process, as long as character message can be sent, receive character message and multimedia message i.e. by monitoring mobile phone It can, it is not required that monitoring mobile phone is also Android phone.Since the multimedia message of the Android phone reply at monitored end, short message relate to And camera shooting photo, GPS coordinate, missed call, do not look into the important informations such as short message, contact person, and these information are logical It crosses and is sent in a manner of short message to monitoring cell-phone telephone number, to guarantee the safety of information transmission and not influencing to monitor mobile phone non- The normal short message communication of Android phone of monitoring stage and non-snoop mobile phone and monitored end, it is necessary to the mistake that short message is monitored Cheng Jinhang safety certification.The application mainly monitors password from setting authorization phone number and setting.When system receives to monitor short message Later, mobile phone being monitored from trend and sending SMS Tip, content can be set as: " successful match!1 acquisition camera is replied to take pictures photo, It replys 2 and obtains GPS coordinate, reply 3 and obtain missed call information, reply 4, which obtains, does not look into short message, replys 5 and obtains contact person Information replys 6 and cancels monitoring." mobile phone is monitored according to the content of prompt information, reply inquiry code information.Monitored end Android phone extracts the data of correlation module according to the inquiry code sent, is automatically replied in a manner of multimedia message or short message Give monitoring mobile phone.It monitors mobile phone monitoring to finish, nullifies monitoring right, send to cancel to the Android phone at monitored end and monitor The code short message of state.Listening state position is FALSE by the Android phone at monitored end, and modifies the mark of successful match The monitoring right for monitoring mobile phone is nullified in will position.
Although the disclosure acts to describe with specific structural features and/or method, but it is understood that wanting in appended right The disclosure limited in book is asked to be not necessarily limited to above-mentioned specific feature or action.But above-mentioned specific features and movement are only public It opens to implement the exemplary forms of claim.

Claims (8)

1. a kind of wechat remote mobile based on agreement short message is monitored and return system, comprising: monitoring client and monitored end, it is special Sign is,
The monitored end is configured as, and monitors preset information, and judge whether the preset information has carry out overmatching;It is described Preset information, as depositing in including at least in database: it monitors number and reserves a record of short message content,
If the preset information is not carry out overmatching, short message content addresser corresponding with this short message content is obtained, and It is matched in the database;
If the preset information be matched: monitor Numbers Authority and reservation short message content be judged as monitor short message when, the quilt Monitoring client sends SMS Tip to the monitoring client, and the monitoring client replys the type generation for wanting inquiry content according to SMS Tip Code, the monitoring client monitor instruction according to corresponding execute of type code of setting, complete monitoring,
Further include:
The monitored end is additionally configured to establish automatic camera module, the automatic camera module to open video monitoring, The object of a newly-built Camera class is for calling a delay function while taking pictures: after the delay time of setting, calling The function of taking pictures of Camera class is taken pictures, and, by file output stream, the photo of .GIF format is formed, and photo is stored in On the embedded memory card of specified path,
The monitored end is additionally configured to, and by third party's interface, the content of monitoring is forwarded to specified wechat user: logical It crosses and wechat is called to embed the JavaScript object WeixinJSBridge that browser defines, by the content share of monitoring to wechat Good friend, and judge the concern state an of WeChat ID and/or pay close attention to specified WeChat ID.
2. wechat remote mobile according to claim 1 is monitored and return system, which is characterized in that further include: judging Before whether the preset information has progress overmatching:
It is obtained according to the corresponding addresser of above-mentioned this short message content and transmits number,
It transmits number by described and is compared with the number list in pre-registered grant column list in the database,
If matching with the telephone number list in grant column list, addresser has the right to monitor, and listening state position parameter is true;
Check that listening state position is joined in the database that storage registration user mobile phone number code table and/or registration user monitor cipher table Whether number is true, if being matched if true, short message content is monitored the list in cipher table with the registration user, match at Function is followed by by monitoring information,
If it does not match, short message is normal short message.
3. wechat remote mobile according to claim 1 is monitored and return system, which is characterized in that when the monitored end Receive after monitoring short message, send SMS Tip to monitoring client:
Successful match,
And/or reply 1 acquisition camera and take pictures photo,
And/or reply 2 and obtain GPS coordinate,
And/or reply 3 and obtain missed call information,
And/or reply 4 acquisitions and do not look into short message,
And/or reply 5 and obtain contact information,
And/or it replys 6 and cancels monitoring.
4. wechat remote mobile according to claim 1 is monitored and return system, which is characterized in that the monitored end is also It is configured as establishing data memory module,
The data memory module to, people is monitored based on SQLite Database and arranges the corresponding field of short message content, And SQL registration, inquiry, cancel statement are executed, to the monitoring number of acquisition and/or agreement short message in the SQLite database Data are increased, deleted or are inquired.
5. wechat remote mobile according to claim 1 is monitored and return system, which is characterized in that the monitored end is also It is configured as establishing and monitors module,
The monitoring module include: short message matching unit, Gps coordinate reading unit, incoming call monitoring unit, short message monitoring unit, Read contact person's unit, short message transmission unit;
The short message matching unit comes signal code and content to obtain, and signal code in future and content are matched, and, Judgement determines the record matching for coming signal code and database purchase, obtains the permission of monitoring;
The GPS coordinate reading unit, to the position coordinates at the end that is once monitored every certain interval acquiring, and to incite somebody to action GPS coordinate replies to monitoring mobile phone using character string as short message content;
The incoming call monitoring unit, to judge to send a telegram here flag bit whether be it is true, if it is non-real, do not send a telegram here, if it is Very, electricity condition in future replies to monitoring mobile phone using character string as short message content;
The short message monitoring unit, monitors monitored end and receives obtaining monitoring client unlatching and corresponding execute monitoring instruction rank Section, the monitored end receive the content of all short messages and receive the time of short message;
Reading contact person's unit is obtained to call the api interface of Android mobile terminal ContentProvider component Obtain corresponding relationship people;
The short message transmission unit, to send character message by sendTextMessage () function, and to the monitoring End sends the query result data of prompt information and the other units of feedback.
6. wechat remote mobile according to claim 1 is monitored and return system, which is characterized in that the monitored end is also It is configured as establishing backstage multimedia message sending module
The multimedia message sending module is established as follows:
The monitored end access-in point information of setting,
Judge whether Wi-fi enables, close Wi-fi network if starting,
Current APN is obtained, and sends the multimedia message of shooting photo to monitoring client, realizes the picture control to monitored end.
7. a kind of wechat remote mobile based on agreement short message is monitored and retransmission method, which comprises the steps of:
Preset information is monitored, and judges whether the preset information has carry out overmatching;The preset information, as depositing in number According to including at least in library: it monitors number and reserves a record of short message content,
It begins listening for, if the preset information is not carry out overmatching, it is corresponding with this short message content to obtain short message content Addresser, and matched in the database;
If the preset information be matched: monitor Numbers Authority and reservation short message content be judged as monitor short message when, be monitored It holds to monitoring client and sends SMS Tip, the monitoring client replys the type code for wanting inquiry content according to SMS Tip, according to The type code of setting is corresponding to execute monitoring instruction, completes monitoring;
Further include:
Automatic camera module is established, opens video monitoring, the object of a newly-built Camera class is for calling one while taking pictures A delay function: after the delay time of setting, calling the function of taking pictures of Camera class to take pictures, and, by file output stream, The photo of .GIF format is formed, and photo is stored on the embedded memory card of specified path,
By third party's interface, the content of monitoring is forwarded to specified wechat user: fixed by calling wechat to embed browser The JavaScript object WeixinJSBridge of justice, by the content share of monitoring to wechat good friend, and judges a wechat Number concern state and/or pay close attention to specified WeChat ID.
8. wechat remote mobile according to claim 7 is monitored and retransmission method, which is characterized in that further include further pacifying Full authenticating step:
It is obtained according to the corresponding addresser of above-mentioned this short message content and transmits number,
It transmits number by described and is compared with the number list in pre-registered grant column list in the database,
If matching with the telephone number list in grant column list, addresser has the right to monitor, and listening state position parameter is true;
Check that listening state position is joined in the database that storage registration user mobile phone number code table and/or registration user monitor cipher table Whether number is true, if being matched if true, short message content is monitored the list in cipher table with the registration user, match at Function is followed by by monitoring information,
If it does not match, short message is normal short message.
CN201611037383.5A 2016-11-23 2016-11-23 A kind of monitoring of wechat remote mobile and return system, method based on agreement short message Active CN106506844B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611037383.5A CN106506844B (en) 2016-11-23 2016-11-23 A kind of monitoring of wechat remote mobile and return system, method based on agreement short message

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611037383.5A CN106506844B (en) 2016-11-23 2016-11-23 A kind of monitoring of wechat remote mobile and return system, method based on agreement short message

Publications (2)

Publication Number Publication Date
CN106506844A CN106506844A (en) 2017-03-15
CN106506844B true CN106506844B (en) 2019-06-18

Family

ID=58327991

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611037383.5A Active CN106506844B (en) 2016-11-23 2016-11-23 A kind of monitoring of wechat remote mobile and return system, method based on agreement short message

Country Status (1)

Country Link
CN (1) CN106506844B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109145645B (en) * 2018-08-29 2021-09-10 西安电子科技大学 Method for protecting short message verification code in android mobile phone
CN111328031A (en) * 2018-12-14 2020-06-23 中移(杭州)信息技术有限公司 Message forwarding method and device
CN115529564B (en) * 2022-09-19 2024-08-02 全通金信控股(广东)有限公司 Short message issuing method, device and system based on campus industry

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1573585A4 (en) * 2002-12-02 2007-11-14 Nokia Corp Privacy protection in a server
CN101534360A (en) * 2008-03-14 2009-09-16 厦门青年网络通讯股份有限公司 Remote control method of multimedia message monitoring equipment
CN102546898A (en) * 2010-12-07 2012-07-04 希姆通信息技术(上海)有限公司 Method and mobile phone for monitoring sound information around mobile phone
CN103974188A (en) * 2012-12-03 2014-08-06 杨益 Positioning system based on portable positioning terminal
CN104079687A (en) * 2014-06-17 2014-10-01 中国科学院信息工程研究所 Automatic information switch-over method and system for important conferences based on time and positions
CN205555777U (en) * 2016-03-22 2016-09-07 四川邮科通信技术有限公司 Elevator remote monitoring system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1573585A4 (en) * 2002-12-02 2007-11-14 Nokia Corp Privacy protection in a server
CN101534360A (en) * 2008-03-14 2009-09-16 厦门青年网络通讯股份有限公司 Remote control method of multimedia message monitoring equipment
CN102546898A (en) * 2010-12-07 2012-07-04 希姆通信息技术(上海)有限公司 Method and mobile phone for monitoring sound information around mobile phone
CN103974188A (en) * 2012-12-03 2014-08-06 杨益 Positioning system based on portable positioning terminal
CN104079687A (en) * 2014-06-17 2014-10-01 中国科学院信息工程研究所 Automatic information switch-over method and system for important conferences based on time and positions
CN205555777U (en) * 2016-03-22 2016-09-07 四川邮科通信技术有限公司 Elevator remote monitoring system

Also Published As

Publication number Publication date
CN106506844A (en) 2017-03-15

Similar Documents

Publication Publication Date Title
CN109587044B (en) Group creation and message interaction method and device
US10491550B2 (en) Instant communication
CN112166591B (en) Data synchronization across multiple devices
US20200125218A1 (en) Method of reporting a live incident in real time
US10212107B2 (en) Methods and devices for controlling machines
CN106464573B (en) A kind of method, medium, the system of cross-device notice
CN110213217B (en) Data access method, related device, gateway and data access system
CN109698856A (en) The device-to-device communication channel of safety
CN110460578A (en) Establish the method, apparatus and computer readable storage medium of incidence relation
CN103650466A (en) Intelligent parental controls for wireless devices
CN106506844B (en) A kind of monitoring of wechat remote mobile and return system, method based on agreement short message
CN113839913B (en) Interactive information processing method, related device and storage medium
RU2012133455A (en) SYSTEM AND METHOD FOR THE GLOBAL CATALOG SERVICE
CN108834040A (en) A kind of attendance information based reminding method and its equipment
CN107911450B (en) Safe data circulation method and system
US10798047B2 (en) Systems, devices and methods for text message communication
CN106789561B (en) Terminal physical address binding method and system based on intranet service platform
CN102970207A (en) Instant communication method, client device and instant communication system
CN102694748B (en) The method and system of position tracking are carried out by JICQ
CN104967525B (en) Method and device that news is shared, system
KR20090000597A (en) System and method for operation of direct fan letter
CN105208520A (en) Method and device for automatic information sending of mobile terminal
CN108400926A (en) A kind of method of information processing, relevant device and system
CN116471249A (en) Information processing method, information processing device, electronic equipment and storage medium
CN109754343A (en) A kind of home educate altogether in teaching schedule management system method

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant