CN110427302A - Trigger method, mobile terminal and the computer readable storage medium of content observer - Google Patents

Trigger method, mobile terminal and the computer readable storage medium of content observer Download PDF

Info

Publication number
CN110427302A
CN110427302A CN201910690712.3A CN201910690712A CN110427302A CN 110427302 A CN110427302 A CN 110427302A CN 201910690712 A CN201910690712 A CN 201910690712A CN 110427302 A CN110427302 A CN 110427302A
Authority
CN
China
Prior art keywords
eavesdropping target
eavesdropping
target
mobile terminal
content observer
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.)
Pending
Application number
CN201910690712.3A
Other languages
Chinese (zh)
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.)
Nubia Technology Co Ltd
Original Assignee
Nubia 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 Nubia Technology Co Ltd filed Critical Nubia Technology Co Ltd
Priority to CN201910690712.3A priority Critical patent/CN110427302A/en
Publication of CN110427302A publication Critical patent/CN110427302A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/3034Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a storage system, e.g. DASD based or network based
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3051Monitoring arrangements for monitoring the configuration of the computing system or of the computing system component, e.g. monitoring the presence of processing resources, peripherals, I/O links, software programs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3065Monitoring arrangements determined by the means or processing involved in reporting the monitored data
    • G06F11/3072Monitoring arrangements determined by the means or processing involved in reporting the monitored data where the reporting involves data filtering, e.g. pattern matching, time or event triggered, adaptive or policy-based reporting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3089Monitoring arrangements determined by the means or processing involved in sensing the monitored data, e.g. interfaces, connectors, sensors, probes, agents
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/448Execution paradigms, e.g. implementations of programming paradigms
    • G06F9/4488Object-oriented
    • G06F9/449Object-oriented method invocation or resolution

Abstract

This application provides a kind of methods for triggering content observer, which comprises presets the first eavesdropping target;Monitor eavesdropping target;It determines and listens to first eavesdropping target, control carries out function callback corresponding with first eavesdropping target.Present invention also provides a kind of mobile terminal and computer readable storage mediums.Pass through above embodiment, so that when content observer detects the first eavesdropping target, it is adjusted back by force and carries out corresponding function realization, it changes the scheme just adjusted back compared to the existing value for only detecting eavesdropping target, the method of triggering content observer provided by the present application, can be extended the function of content observer.

Description

Trigger method, mobile terminal and the computer readable storage medium of content observer
Technical field
This application involves network communication technology field more particularly to a kind of methods for triggering content observer, mobile terminal And computer readable storage medium.
Background technique
Currently, operating system such as Android (Android) system is widely used in terminal device, such as mobile phone, tablet computer it In.In Android development, it is often necessary to inquire whether some database value is updated, generally can all use Content observer-ContentObserver of Android is realized.ContentObserver-content observer, it is therefore an objective to The variation that specific URI causes database is observed, some corresponding processing are then done, it is similar to the trigger in database technology (Trigger), when the Uri observed by ContentObserver changes, it will be triggered.But current way is led When causing to only have the object observing numerical value in database to change, it can just be listened to and carry out corresponding by content observer.
Summary of the invention
The main purpose of the application is to propose a kind of method for triggering content observer, mobile terminal and computer-readable Storage medium, it is intended to content observer's function be expanded, with abundant.
To achieve the above object, this application provides a kind of methods for triggering content observer, which comprises in advance First eavesdropping target is set;Monitor eavesdropping target;It determines and listens to first eavesdropping target, control carries out and first prison Listen the corresponding function callback of object.
Optionally, the method also includes: preset the second eavesdropping target;Determination listens to second eavesdropping target Value change, control carries out corresponding with second eavesdropping target function callback.
Optionally, the step of monitoring eavesdropping target, comprising: creation content observer;The content observer monitors The eavesdropping target.
Optionally, the step of creation content observer is to call registerContentObserver () method note The volume content observer.
Optionally, described the step of presetting the first eavesdropping target, comprising: establish eavesdropping target's white list;Described The eavesdropping target monitored is written in eavesdropping target's white list as first eavesdropping target.
Optionally, the eavesdropping target is URL, what the write-in in eavesdropping target's white list was monitored The step of eavesdropping target is as first eavesdropping target is written in eavesdropping target's white list and monitors URL。
Optionally, the step of determination listens to first eavesdropping target, comprising: receive what current needs updated URL is simultaneously compared with eavesdropping target's white list;When the URL that the current needs update is in eavesdropping target's white list When middle, determination listens to first eavesdropping target.
Optionally, the method also includes: determine that listening to the value of second eavesdropping target does not change, without Control function readjustment.
The application also provides a kind of mobile terminal, and the mobile terminal includes: touch screen;Processor;
Memory is connected to the processor, and the memory includes control instruction, when the processor reads the control When system instruction, the method that the mobile terminal realizes above-mentioned triggering content observer is controlled.
The application also provides a kind of computer readable storage medium, and the computer readable storage medium has one or more Program, one or more of programs are executed by one or more processors, the method to realize above-mentioned triggering content observer.
Method, mobile terminal and the computer readable storage medium of triggering content observer provided by the present application, by pre- First eavesdropping target is first set;Monitor eavesdropping target;It determines and listens to first eavesdropping target, control carries out and described first The corresponding function callback of eavesdropping target, in this manner, so that when content observer detects the first eavesdropping target, by force Row adjusted back and carried out corresponding function realization, compared to the existing value for only detecting eavesdropping target change just into The scheme of row readjustment, the method for triggering content observer provided by the present application, can be extended the function of content observer.
The above description is only an overview of the technical scheme of the present invention, in order to better understand the technical means of the present invention, And it can be implemented in accordance with the contents of the specification, and in order to allow above and other objects of the present invention, feature and advantage can It is clearer and more comprehensible, the followings are specific embodiments of the present invention.
Detailed description of the invention
Fig. 1 is the hardware structural diagram for realizing each embodiment one optional mobile terminal of the application;
Fig. 2 is the communications network system schematic diagram of mobile terminal as shown in Figure 1;
Fig. 3 is the flow chart of the method for the triggering content observer that one embodiment of the application provides;
Fig. 4 is the structural schematic diagram for the mobile terminal that one embodiment of the application provides.
The embodiments will be further described with reference to the accompanying drawings for realization, functional characteristics and the advantage of the application purpose.
Specific embodiment
It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, it is not intended to limit the present invention.
In subsequent description, it is only using the suffix for indicating such as " module ", " component " or " unit " of element Be conducive to explanation of the invention, itself there is no a specific meaning.Therefore, " module ", " component " or " unit " can mix Ground uses.
Terminal can be implemented in a variety of manners.For example, terminal described in the present invention may include such as mobile phone, plate Computer, laptop, palm PC, personal digital assistant (Personal Digital Assistant, PDA), portable Media player (Portable Media Player, PMP), navigation device, wearable device, Intelligent bracelet, pedometer etc. move The fixed terminals such as dynamic terminal, and number TV, desktop computer.
It will be illustrated by taking mobile terminal as an example in subsequent descriptions, it will be appreciated by those skilled in the art that in addition to special Except element for moving purpose, the construction of embodiment according to the present invention can also apply to the terminal of fixed type.
Referring to Fig. 1, a kind of hardware structural diagram of its mobile terminal of each embodiment to realize the present invention, the shifting Dynamic terminal 100 may include: RF (Radio Frequency, radio frequency) unit 101, WiFi module 102, audio output unit 103, A/V (audio/video) input unit 104, sensor 105, display unit 106, user input unit 107, interface unit 108, the components such as memory 109, processor 110 and power supply 111.It will be understood by those skilled in the art that shown in Fig. 1 Mobile terminal structure does not constitute the restriction to mobile terminal, and mobile terminal may include components more more or fewer than diagram, Perhaps certain components or different component layouts are combined.
It is specifically introduced below with reference to all parts of the Fig. 1 to mobile terminal:
Radio frequency unit 101 can be used for receiving and sending messages or communication process in, signal sends and receivees, specifically, by base station Downlink information receive after, to processor 110 handle;In addition, the data of uplink are sent to base station.In general, radio frequency unit 101 Including but not limited to antenna, at least one amplifier, transceiver, coupler, low-noise amplifier, duplexer etc..In addition, penetrating Frequency unit 101 can also be communicated with network and other equipment by wireless communication.Any communication can be used in above-mentioned wireless communication Standard or agreement, including but not limited to GSM (Global System of Mobile communication, global system for mobile telecommunications System), GPRS (General Packet Radio Service, general packet radio service), CDMA2000 (Code Division Multiple Access 2000, CDMA 2000), WCDMA (Wideband Code Division Multiple Access, wideband code division multiple access), TD-SCDMA (Time Division-Synchronous Code Division Multiple Access, TD SDMA), FDD-LTE (Frequency Division Duplexing-Long Term Evolution, frequency division duplex long term evolution) and TDD-LTE (Time Division Duplexing-Long Term Evolution, time division duplex long term evolution) etc..
WiFi belongs to short range wireless transmission technology, and mobile terminal can help user to receive and dispatch electricity by WiFi module 102 Sub- mail, browsing webpage and access streaming video etc., it provides wireless broadband internet access for user.Although Fig. 1 shows Go out WiFi module 102, but it is understood that, and it is not belonging to must be configured into for mobile terminal, it completely can be according to need It to omit within the scope of not changing the essence of the invention.
Audio output unit 103 can be in call signal reception pattern, call mode, record mould in mobile terminal 100 When under the isotypes such as formula, speech recognition mode, broadcast reception mode, by radio frequency unit 101 or WiFi module 102 it is received or The audio data stored in memory 109 is converted into audio signal and exports to be sound.Moreover, audio output unit 103 Audio output relevant to the specific function that mobile terminal 100 executes can also be provided (for example, call signal receives sound, disappears Breath receives sound etc.).Audio output unit 103 may include loudspeaker, buzzer etc..
A/V input unit 104 is for receiving audio or video signal.A/V input unit 104 may include graphics processor (Graphics Processing Unit, GPU) 1041 and microphone 1042, graphics processor 1041 is in video acquisition mode Or the image data of the static images or video obtained in image capture mode by image capture apparatus (such as camera) carries out Reason.Treated, and picture frame may be displayed on display unit 106.Through graphics processor 1041, treated that picture frame can be deposited Storage is sent in memory 109 (or other storage mediums) or via radio frequency unit 101 or WiFi module 102.Mike Wind 1042 can connect in telephone calling model, logging mode, speech recognition mode etc. operational mode via microphone 1042 Quiet down sound (audio data), and can be audio data by such acoustic processing.Audio that treated (voice) data can To be converted to the format output that can be sent to mobile communication base station via radio frequency unit 101 in the case where telephone calling model. Microphone 1042 can be implemented various types of noises elimination (or inhibition) algorithms and send and receive sound to eliminate (or inhibition) The noise generated during frequency signal or interference.
Mobile terminal 100 further includes at least one sensor 105, such as optical sensor, motion sensor and other biographies Sensor.Specifically, optical sensor includes ambient light sensor and proximity sensor, wherein ambient light sensor can be according to environment The light and shade of light adjusts the brightness of display panel 1061, and proximity sensor can close when mobile terminal 100 is moved in one's ear Display panel 1061 and/or backlight.As a kind of motion sensor, accelerometer sensor can detect in all directions (general For three axis) size of acceleration, it can detect that size and the direction of gravity when static, can be used to identify the application of mobile phone posture (such as horizontal/vertical screen switching, dependent game, magnetometer pose calibrating), Vibration identification correlation function (such as pedometer, percussion) etc.; The fingerprint sensor that can also configure as mobile phone, pressure sensor, iris sensor, molecule sensor, gyroscope, barometer, The other sensors such as hygrometer, thermometer, infrared sensor, details are not described herein.
Display unit 106 is for showing information input by user or being supplied to the information of user.Display unit 106 can wrap Display panel 1061 is included, liquid crystal display (Liquid Crystal Display, LCD), Organic Light Emitting Diode can be used Forms such as (Organic Light-Emitting Diode, OLED) configure display panel 1061.
User input unit 107 can be used for receiving the number or character information of input, and generate the use with mobile terminal Family setting and the related key signals input of function control.Specifically, user input unit 107 may include touch panel 1071 with And other input equipments 1072.Touch panel 1071, also referred to as touch screen collect the touch operation of user on it or nearby (for example user uses any suitable objects or attachment such as finger, stylus on touch panel 1071 or in touch panel 1071 Neighbouring operation), and corresponding attachment device is driven according to preset formula.Touch panel 1071 may include touch detection Two parts of device and touch controller.Wherein, the touch orientation of touch detecting apparatus detection user, and detect touch operation band The signal come, transmits a signal to touch controller;Touch controller receives touch information from touch detecting apparatus, and by it It is converted into contact coordinate, then gives processor 110, and order that processor 110 is sent can be received and executed.In addition, can To realize touch panel 1071 using multiple types such as resistance-type, condenser type, infrared ray and surface acoustic waves.In addition to touch panel 1071, user input unit 107 can also include other input equipments 1072.Specifically, other input equipments 1072 can wrap It includes but is not limited in physical keyboard, function key (such as volume control button, switch key etc.), trace ball, mouse, operating stick etc. It is one or more, specifically herein without limitation.
Further, touch panel 1071 can cover display panel 1061, when touch panel 1071 detect on it or After neighbouring touch operation, processor 110 is sent to determine the type of touch event, is followed by subsequent processing device 110 according to touch thing The type of part provides corresponding visual output on display panel 1061.Although in Fig. 1, touch panel 1071 and display panel 1061 be the function that outputs and inputs of realizing mobile terminal as two independent components, but in certain embodiments, it can The function that outputs and inputs of mobile terminal is realized so that touch panel 1071 and display panel 1061 is integrated, is not done herein specifically It limits.
Interface unit 108 be used as at least one external device (ED) connect with mobile terminal 100 can by interface.For example, External device (ED) may include wired or wireless headphone port, external power supply (or battery charger) port, wired or nothing Line data port, memory card port, the port for connecting the device with identification module, audio input/output (I/O) end Mouth, video i/o port, ear port etc..Interface unit 108 can be used for receiving the input from external device (ED) (for example, number It is believed that breath, electric power etc.) and the input received is transferred to one or more elements in mobile terminal 100 or can be with For transmitting data between mobile terminal 100 and external device (ED).
Memory 109 can be used for storing software program and various data.Memory 109 can mainly include storing program area The storage data area and, wherein storing program area can (such as the sound of application program needed for storage program area, at least one function Sound playing function, image player function etc.) etc.;Storage data area can store according to mobile phone use created data (such as Audio data, phone directory etc.) etc..In addition, memory 109 may include high-speed random access memory, it can also include non-easy The property lost memory, a for example, at least disk memory, flush memory device or other volatile solid-state parts.
Processor 110 is the control centre of mobile terminal, utilizes each of various interfaces and the entire mobile terminal of connection A part by running or execute the software program and/or module that are stored in memory 109, and calls and is stored in storage Data in device 109 execute the various functions and processing data of mobile terminal, to carry out whole monitoring to mobile terminal.Place Managing device 110 may include one or more processing units;Preferably, processor 110 can integrate application processor and modulatedemodulate is mediated Manage device, wherein the main processing operation system of application processor, user interface and application program etc., modem processor is main Processing wireless communication.It is understood that above-mentioned modem processor can not also be integrated into processor 110.
Mobile terminal 100 can also include the power supply 111 (such as battery) powered to all parts, it is preferred that power supply 111 Can be logically contiguous by power-supply management system and processor 110, to realize management charging by power-supply management system, put The functions such as electricity and power managed.
Although Fig. 1 is not shown, mobile terminal 100 can also be including bluetooth module etc., and details are not described herein.
Embodiment to facilitate the understanding of the present invention, the communications network system that mobile terminal of the invention is based below into Row description.
Referring to Fig. 2, Fig. 2 is a kind of communications network system architecture diagram provided in an embodiment of the present invention, the communication network system System is the LTE system of universal mobile communications technology, which includes UE (User Equipment, the use of successively communication connection Family equipment) (the land Evolved UMTS Terrestrial Radio Access Network, evolved UMTS 201, E-UTRAN Ground wireless access network) 202, EPC (Evolved Packet Core, evolved packet-based core networks) 203 and operator IP operation 204。
Specifically, UE201 can be above-mentioned terminal 100, and details are not described herein again.
E-UTRAN202 includes eNodeB2021 and other eNodeB2022 etc..Wherein, eNodeB2021 can be by returning Journey (backhaul) (such as X2 interface) is connect with other eNodeB2022, and eNodeB2021 is connected to EPC203, ENodeB2021 can provide the access of UE201 to EPC203.
EPC203 may include MME (Mobility Management Entity, mobility management entity) 2031, HSS (Home Subscriber Server, home subscriber server) 2032, other MME2033, SGW (Serving Gate Way, Gateway) 2034, PGW (PDN Gate Way, grouped data network gateway) 2035 and PCRF (Policy and Charging Rules Function, policy and rate functional entity) 2036 etc..Wherein, MME2031 be processing UE201 and The control node of signaling, provides carrying and connection management between EPC203.HSS2032 is all to manage for providing some registers Such as the function of home location register (not shown) etc, and preserves some related service features, data rates etc. and use The dedicated information in family.All customer data can be sent by SGW2034, and PGW2035 is with can providing the IP of UE201 Location distribution and other functions, PCRF2036 are strategy and the charging control strategic decision-making of business data flow and IP bearing resource Point, it selects and provides available strategy and charging control decision with charge execution function unit (not shown) for strategy.
IP operation 204 may include internet, Intranet, IMS (IP Multimedia Subsystem, IP multimedia System) or other IP operations etc..
Although above-mentioned be described by taking LTE system as an example, those skilled in the art should know the present invention is not only Suitable for LTE system, be readily applicable to other wireless communication systems, such as GSM, CDMA2000, WCDMA, TD-SCDMA with And the following new network system etc., herein without limitation.
Based on above-mentioned mobile terminal hardware configuration and communications network system, each embodiment of the method for the present invention is proposed.
Fig. 3 is the flow chart of the embodiment of the method for triggering content observer provided by the present application.The side of the embodiment Method is once triggered by user, then the process in the embodiment passes through mobile terminal automatic running, wherein each step is in operation When can be and successively carried out according to the sequence in such as flow chart, be also possible to multiple steps according to the actual situation while carrying out, Herein and without limitation.The method of triggering content observer provided by the present application includes the following steps:
Step S310 presets the first eavesdropping target;
Step S330 monitors eavesdropping target;
Step S350 is determined and is listened to first eavesdropping target, and control carries out corresponding with first eavesdropping target Function callback.
By above embodiment, by presetting the first eavesdropping target;Monitor eavesdropping target;It determines described in listening to First eavesdropping target, control carry out function callback corresponding with first eavesdropping target, in this manner, so that when interior When appearance observer detects the first eavesdropping target, corresponding function realization is adjusted back and carried out by force, compared to existing Have and detects that the value of eavesdropping target changes the scheme just adjusted back, the side of triggering content observer provided by the present application Method can be extended the function of content observer.
Above-mentioned steps are specifically described below in conjunction with specific embodiment.
In step s310, the first eavesdropping target is preset.
Specifically, eavesdropping target can according to specific functional requirement and set, for example, it may be network state Information, information about power etc..Meanwhile eavesdropping target can carry out different settings according to feedback mechanism.In the present embodiment, it is A variety of different eavesdropping target's types can be set in system, and different eavesdropping target's types has different monitoring strategies.
In the present embodiment, step S310 can be carried out as follows:
Step S3101 establishes eavesdropping target's white list;
The eavesdropping target that is monitored is written as described the in step S3102 in eavesdropping target's white list One eavesdropping target.
Specifically, eavesdropping target's white list is for saving the first monitored object, when system listens to monitored object, with prison The element in object white list is listened to be compared.In the present embodiment, eavesdropping target URL.It is described in the eavesdropping target The step of eavesdropping target monitored is as first eavesdropping target is written in white list as in the eavesdropping target The URL monitored is written in white list.For example, the white list chained list for creating URL, is written into white list chained list The URL monitored.
In step S330, eavesdropping target is monitored.
Specifically, step S330 is carried out as follows:
Step S3301 creates content observer;
Step S3302, the content observer monitor the eavesdropping target.
Specifically, ContentObserver derived class is created, heavily loaded onChange () method goes the function after processing readjustment It realizes;RegisterContentObserver () method registration content observer is called, to monitor whether corresponding URL changes Become;When not needed, unregisterContentObserver () cancel register is called.
It in step S350, determines and listens to first eavesdropping target, control carries out and the first eavesdropping target phase Corresponding function callback.
Specifically, step S350 can be achieved by the steps of:
Step S3501, reception currently need the URL updated and are compared with eavesdropping target's white list;
Step S3502, when the URL that the current needs update is in eavesdropping target's white list, determination is listened to First eavesdropping target.
By present embodiment, so that will be responded when content observer listens to the first eavesdropping target, and simultaneously Non- only listen to when the corresponding value of eavesdropping target occurs just will do it function callback.Compared with prior art, so that content is observed The function of person is expanded.
Specifically, (the method for SettingsState.java in the interface for updating URL InsertSettingLocked), judgement wants whether URL is element in white list chained list, if it is, returning to true.
Further, the present processes further include:
Step S370 presets the second eavesdropping target;
Step S390 determines that the value for listening to second eavesdropping target changes, and control carries out and second prison Listen the corresponding function callback of object.
Specifically, in present embodiment, the second eavesdropping target is also URL.When specific implementation, when database corresponding field When URL changes, the onChange () of content observer ContentObserver will be called back, to be located accordingly Reason.But if the value of write-in URL when having not been changed (value being written is equal with the stored value of database), at this time The method of the onChange () of ContentObserver would not adjust back, i.e., content observer ContentObserver will not It listens to.
By above embodiment, by presetting the first eavesdropping target;Monitor eavesdropping target;It determines described in listening to First eavesdropping target, control carry out function callback corresponding with first eavesdropping target, in this manner, so that when interior When appearance observer detects the first eavesdropping target, corresponding function realization is adjusted back and carried out by force, compared to existing Have and detects that the value of eavesdropping target changes the scheme just adjusted back, the side of triggering content observer provided by the present application Method can be extended the function of content observer.
Fig. 4 is the structure composition schematic diagram of mobile terminal 100 provided by the embodiments of the present application, and mobile terminal 100 includes: touching Touch panel 1071;Processor 110;Memory 109 is connect with the processor 110, and the memory 109 includes control instruction, When the processor 110 reads the control instruction, controls the mobile terminal 100 and realizes following steps:
Preset the first eavesdropping target;Monitor eavesdropping target;It determines and listens to first eavesdropping target, control carries out Function callback corresponding with first eavesdropping target.
Optionally, the method also includes: preset the second eavesdropping target;Determination listens to second eavesdropping target Value change, control carries out corresponding with second eavesdropping target function callback.
Optionally, the step of monitoring eavesdropping target, comprising: creation content observer;The content observer monitors The eavesdropping target.
Optionally, the step of creation content observer is to call registerContentObserver () method note The volume content observer.
Optionally, described the step of presetting the first eavesdropping target, comprising: establish eavesdropping target's white list;Described The eavesdropping target monitored is written in eavesdropping target's white list as first eavesdropping target.
Optionally, the eavesdropping target is URL, what the write-in in eavesdropping target's white list was monitored The step of eavesdropping target is as first eavesdropping target is written in eavesdropping target's white list and monitors URL。
Optionally, the step of determination listens to first eavesdropping target, comprising: receive what current needs updated URL is simultaneously compared with eavesdropping target's white list;When the URL that the current needs update is in eavesdropping target's white list When middle, determination listens to first eavesdropping target.
Optionally, the method also includes: determine that listening to the value of second eavesdropping target does not change, without Control function readjustment.
By above-mentioned mobile terminal, by presetting the first eavesdropping target;Monitor eavesdropping target;It determines described in listening to First eavesdropping target, control carry out function callback corresponding with first eavesdropping target, in this manner, so that when interior When appearance observer detects the first eavesdropping target, corresponding function realization is adjusted back and carried out by force, compared to existing Have and detects that the value of eavesdropping target changes the scheme just adjusted back, the side of triggering content observer provided by the present application Method can be extended the function of content observer.
The embodiment of the present application also provides a kind of computer readable storage medium, and computer readable storage medium has one or more A program, one or more programs are executed by one or more processors, to realize following steps:
Preset the first eavesdropping target;Monitor eavesdropping target;It determines and listens to first eavesdropping target, control carries out Function callback corresponding with first eavesdropping target.
Optionally, the method also includes: preset the second eavesdropping target;Determination listens to second eavesdropping target Value change, control carries out corresponding with second eavesdropping target function callback.
Optionally, the step of monitoring eavesdropping target, comprising: creation content observer;The content observer monitors The eavesdropping target.
Optionally, the step of creation content observer is to call registerContentObserver () method note The volume content observer.
Optionally, described the step of presetting the first eavesdropping target, comprising: establish eavesdropping target's white list;Described The eavesdropping target monitored is written in eavesdropping target's white list as first eavesdropping target.
Optionally, the eavesdropping target is URL, what the write-in in eavesdropping target's white list was monitored The step of eavesdropping target is as first eavesdropping target is written in eavesdropping target's white list and monitors URL。
Optionally, the step of determination listens to first eavesdropping target, comprising: receive what current needs updated URL is simultaneously compared with eavesdropping target's white list;When the URL that the current needs update is in eavesdropping target's white list When middle, determination listens to first eavesdropping target.
Optionally, the method also includes: determine that listening to the value of second eavesdropping target does not change, without Control function readjustment.
By above-mentioned computer readable storage medium, by presetting the first eavesdropping target;Monitor eavesdropping target; It determines and listens to first eavesdropping target, control carries out function callback corresponding with first eavesdropping target, passes through this Kind mode, so that corresponding function realization is adjusted back and carried out by force when content observer detects the first eavesdropping target, It changes the scheme just adjusted back compared to the existing value for only detecting eavesdropping target, in triggering provided by the present application The method for holding observer, can be extended the function of content observer.
The embodiment of the present application also provides a kind of computer readable storage mediums.Here computer readable storage medium is deposited Contain one or more program.Wherein, computer readable storage medium may include volatile memory, such as arbitrary access Memory;Memory also may include nonvolatile memory, such as read-only memory, flash memory, hard disk or solid-state are hard Disk;Memory can also include the combination of the memory of mentioned kind.
Corresponding technical characteristic in the respective embodiments described above do not cause scheme contradiction or it is not implementable under the premise of, can Mutually to use.
It should be noted that, in this document, the terms "include", "comprise" or its any other variant are intended to non-row His property includes, so that the process, method, article or the device that include a series of elements not only include those elements, and And further include other elements that are not explicitly listed, or further include for this process, method, article or device institute it is intrinsic Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including being somebody's turn to do There is also other identical elements in the process, method of element, article or device.
Above-mentioned the embodiment of the present application serial number is for illustration only, does not represent the advantages or disadvantages of the embodiments.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side Method can be realized by means of software and necessary general hardware platform, naturally it is also possible to by hardware, but in many cases The former is more preferably embodiment.Based on this understanding, the technical solution of the application substantially in other words does the prior art The part contributed out can be embodied in the form of software products, which is stored in a storage medium In (such as ROM/RAM, magnetic disk, CD), including some instructions are used so that a terminal (can be mobile phone, computer, service Device, air conditioner or network equipment etc.) execute method described in each embodiment of the application.
Embodiments herein is described above in conjunction with attached drawing, but the application be not limited to it is above-mentioned specific Embodiment, the above mentioned embodiment is only schematical, rather than restrictive, those skilled in the art Under the enlightenment of the application, when not departing from the application objective and scope of the claimed protection, can also it make very much Form, these are belonged within the protection of the application.

Claims (10)

1. a kind of method for triggering content observer, which is characterized in that the described method includes:
Preset the first eavesdropping target;
Monitor eavesdropping target;
It determines and listens to first eavesdropping target, control carries out function callback corresponding with first eavesdropping target.
2. the method as described in claim 1, which is characterized in that the method also includes:
Preset the second eavesdropping target;
Determine that the value for listening to second eavesdropping target changes, control carries out corresponding with second eavesdropping target Function callback.
3. the method as described in claim 1, which is characterized in that the step of the monitoring eavesdropping target, comprising:
Create content observer;
The content observer monitors the eavesdropping target.
4. method as claimed in claim 3, which is characterized in that call the step of the creation content observer RegisterContentObserver () method registers the content observer.
5. the method as described in claim 1, which is characterized in that described the step of presetting the first eavesdropping target, comprising:
Establish eavesdropping target's white list;
The eavesdropping target monitored is written in eavesdropping target's white list as first eavesdropping target.
6. method as claimed in claim 5, which is characterized in that the eavesdropping target is URL, described white in the eavesdropping target It is white in the eavesdropping target that the step of eavesdropping target monitored is as first eavesdropping target is written in list The URL monitored is written in list.
7. method as claimed in claim 6, which is characterized in that the step of determination listens to first eavesdropping target, Include:
Reception currently needs the URL updated and is compared with eavesdropping target's white list;
When the URL that the current needs update is in eavesdropping target's white list, determines and listen to first monitoring pair As.
8. method according to claim 2, which is characterized in that the method also includes:
It determines that the value for listening to second eavesdropping target does not change, is adjusted back without control function.
9. a kind of mobile terminal, which is characterized in that the mobile terminal includes:
Touch screen;
Processor;
Memory is connected to the processor, and the memory includes control instruction, is referred to when the processor reads the control When enabling, the method that the mobile terminal realizes any one of claim 1-8 triggering content observer is controlled.
10. a kind of computer readable storage medium, which is characterized in that the computer readable storage medium has one or more journeys Sequence, one or more of programs are executed by one or more processors, to realize any one of claim 1 to 8 triggering content The method of observer.
CN201910690712.3A 2019-07-29 2019-07-29 Trigger method, mobile terminal and the computer readable storage medium of content observer Pending CN110427302A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910690712.3A CN110427302A (en) 2019-07-29 2019-07-29 Trigger method, mobile terminal and the computer readable storage medium of content observer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910690712.3A CN110427302A (en) 2019-07-29 2019-07-29 Trigger method, mobile terminal and the computer readable storage medium of content observer

Publications (1)

Publication Number Publication Date
CN110427302A true CN110427302A (en) 2019-11-08

Family

ID=68411179

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910690712.3A Pending CN110427302A (en) 2019-07-29 2019-07-29 Trigger method, mobile terminal and the computer readable storage medium of content observer

Country Status (1)

Country Link
CN (1) CN110427302A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015085906A1 (en) * 2013-12-10 2015-06-18 北京奇虎科技有限公司 Method and device for enterprise data protection
CN105204949A (en) * 2015-08-27 2015-12-30 威盛电子股份有限公司 Method and device for actively triggering system broadcast
CN108174035A (en) * 2017-12-27 2018-06-15 中国地质大学(武汉) A kind of smart mobile phone double mechanism long-range control method, equipment and storage device
CN109802919A (en) * 2017-11-16 2019-05-24 中移(杭州)信息技术有限公司 A kind of web page access interception method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015085906A1 (en) * 2013-12-10 2015-06-18 北京奇虎科技有限公司 Method and device for enterprise data protection
CN105204949A (en) * 2015-08-27 2015-12-30 威盛电子股份有限公司 Method and device for actively triggering system broadcast
CN109802919A (en) * 2017-11-16 2019-05-24 中移(杭州)信息技术有限公司 A kind of web page access interception method and device
CN108174035A (en) * 2017-12-27 2018-06-15 中国地质大学(武汉) A kind of smart mobile phone double mechanism long-range control method, equipment and storage device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
QINJUNING: "Android中内容观察者的使用—Content Observer类详解", 《HTTPS://BLOG.CSDN.NET/QINJUNING/ARTICLE/DETAILS/7047607》 *

Similar Documents

Publication Publication Date Title
CN109407957A (en) Screen touch control method, terminal and computer readable storage medium
CN109358940A (en) Desktop synchronization, mobile terminal and computer readable storage medium
CN109890022A (en) Data transfer control method, mobile terminal and computer readable storage medium
CN109299039A (en) A kind of file management method, equipment and computer readable storage medium
CN110187808A (en) Dynamic wallpaper setting method, device and computer readable storage medium
CN109660973A (en) Bluetooth control method, mobile terminal and storage medium
CN109462700A (en) A kind of call method, mobile terminal and computer readable storage medium
CN109783370A (en) A kind of log grasping means, terminal and computer readable storage medium
CN107770356A (en) A kind of communication establishing method, equipment and computer-readable recording medium
CN110290269A (en) Display control method, mobile terminal and computer readable storage medium
CN110347306A (en) A kind of multi-screen display method, terminal and computer readable storage medium
CN109640020A (en) A kind of video record control method, terminal and computer readable storage medium
CN109445660A (en) A kind of wearable device control method, mobile terminal and wearable device
CN109522276A (en) Application icon management method, terminal and computer readable storage medium
CN108900503A (en) Data communications method, communication processing equipment, terminal and readable storage medium storing program for executing
CN108776600A (en) Application program pretrigger method, mobile terminal and computer readable storage medium
CN108449736A (en) A kind of data transmission method, terminal and computer readable storage medium
CN107580357A (en) Limitation communication means, equipment and the computer-readable storage medium of a kind of black list user
CN109561221A (en) A kind of call control method, equipment and computer readable storage medium
CN109684020A (en) A kind of method for switching theme, equipment and computer readable storage medium
CN109656649A (en) A kind of desktop application control method, terminal and computer readable storage medium
CN109151163A (en) A kind of method for controlling mobile terminal, mobile terminal and computer readable storage medium
CN109089258A (en) ESIM card operating method, mobile terminal and eSIM card apparatus
CN108879117A (en) Mobile terminal and its antenna structure
CN110287381B (en) Page control node searching method, terminal and computer readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20191108