CN109451176A - A kind of application icon state switching method, terminal and computer storage medium - Google Patents

A kind of application icon state switching method, terminal and computer storage medium Download PDF

Info

Publication number
CN109451176A
CN109451176A CN201811592799.2A CN201811592799A CN109451176A CN 109451176 A CN109451176 A CN 109451176A CN 201811592799 A CN201811592799 A CN 201811592799A CN 109451176 A CN109451176 A CN 109451176A
Authority
CN
China
Prior art keywords
application
variable
memory
value
data request
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201811592799.2A
Other languages
Chinese (zh)
Other versions
CN109451176B (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.)
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 CN201811592799.2A priority Critical patent/CN109451176B/en
Publication of CN109451176A publication Critical patent/CN109451176A/en
Application granted granted Critical
Publication of CN109451176B publication Critical patent/CN109451176B/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/72469User interfaces specially adapted for cordless or mobile telephones for operating the device by selecting functions from two or more displayed items, e.g. menus or icons
    • 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/72451User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions according to schedules, e.g. using calendar applications

Landscapes

  • Engineering & Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • User Interface Of Digital Computer (AREA)
  • Telephone Function (AREA)

Abstract

The embodiment of the invention discloses a kind of application icon state switching methods, which comprises the first application detection trigger event;First application responds the trigger event, is the variate-value assignment of memory variable;First application sends the first request of data to the second application;Variate-value of second application according to the memory variable, application transmission the first request of data response of Xiang Suoshu first;First application is responded according to first request of data, switches the icon state of second application.In addition, the embodiment of the invention also provides a kind of terminal and computer storage mediums.

Description

Application icon state switching method, terminal and computer storage medium
Technical Field
The invention relates to the technical field of icon switching, in particular to an application icon state switching method, a terminal and a computer storage medium.
Background
Icons are computer graphics with explicit meaning. The desktop icon is a software (APP) identifier, and the icon in the interface is a function identifier. The icons include static icons and dynamic icons, wherein the dynamic icons are illustrations which can change the appearance along with the change of the corresponding data files, for example, calendar icons display the current date, so that the user can intuitively acquire related information when seeing the icons. When the desktop needs to update the calendar icon in the morning, a calendar function is called to acquire calendar data. When a calendar function is called, an Application function needs to be executed, and an onCreate () function in the Application function performs a server access operation, which easily causes a sudden increase of the server access amount in the morning and a server crash.
Disclosure of Invention
The invention mainly aims to provide an application icon state switching method, a terminal and a computer storage medium, and aims to solve the problems that when a calendar icon is switched in the morning, the access amount of a server is increased suddenly, and the server is crashed.
In order to achieve the above object, the present invention provides an application icon state switching method, including: a first application detects a trigger event; the first application responds to the trigger event and assigns values to variable values of the memory variables; the first application sends a first data request to a second application; the second application sends a first data request response to the first application according to the variable value of the memory variable; and the first application switches the icon state of the second application according to the first data request response.
In the foregoing solution, the detecting, by the first application, the trigger event includes: the first application detects an event that the system changes from a first time to a second time.
In the foregoing solution, the assigning the variable value of the memory variable by the first application in response to the trigger event includes: the first application determines the type of the trigger event; when the trigger event is determined to be of a first type, the first application assigns a variable value of the memory variable to a first value; and when the trigger event is determined to be of the second type, the first application assigns the variable value of the memory variable to a second value.
In the foregoing solution, the sending, by the second application, the first data request response to the first application according to the variable value of the memory variable includes: and the second application sends first data to the first application according to the variable value of the memory variable as a first value.
In the foregoing solution, the switching, by the first application, the icon state of the second application according to the first data request response includes: and the first application switches the icon state of the second application from the first state to the second state according to the first data.
In the foregoing solution, the sending, by the second application, the first data request response to the first application according to the variable value of the memory variable includes: the second application sends a second data request to the server according to the variable value of the memory variable as a second value; the second application receives a second data request response sent by the server; and the second application sends second data to the first application according to the second data request response.
In the foregoing solution, the switching, by the first application, the icon state of the second application according to the first data request response includes: and the first application switches the icon state of the second application from the first state to the third state according to the second data.
In the foregoing solution, after the second application sends a first data request response to the first application according to the variable value of the memory variable, the method further includes: and the second application assigns values to the variable values of the memory variables.
In order to achieve the above object, the present invention provides a terminal, which includes a processor, and a memory connected to the processor through a communication bus; the memory is used for storing a program for switching the state of the application icon; the processor is configured to execute the application icon state switching processing program to implement the following application icon state switching steps:
a first application detects a trigger event; the first application responds to the trigger event and assigns values to variable values of the memory variables; the first application sends a first data request to a second application; the second application sends a first data request response to the first application according to the variable value of the memory variable; and the first application switches the icon state of the second application according to the first data request response.
In the foregoing solution, the detecting, by the first application, the trigger event includes: the first application detects an event that the system changes from a first time to a second time.
In the foregoing solution, the assigning the variable value of the memory variable by the first application in response to the trigger event includes: the first application determines the type of the trigger event; when the trigger event is determined to be of a first type, the first application assigns a variable value of the memory variable to a first value; and when the trigger event is determined to be of the second type, the first application assigns the variable value of the memory variable to a second value.
In the foregoing solution, the sending, by the second application, the first data request response to the first application according to the variable value of the memory variable includes: and the second application sends first data to the first application according to the variable value of the memory variable as a first value.
In the foregoing solution, the switching, by the first application, the icon state of the second application according to the first data request response includes: and the first application switches the icon state of the second application from the first state to the second state according to the first data.
In the foregoing solution, the sending, by the second application, the first data request response to the first application according to the variable value of the memory variable includes: the second application sends a second data request to the server according to the variable value of the memory variable as a second value; the second application receives a second data request response sent by the server; and the second application sends second data to the first application according to the second data request response.
In the foregoing solution, the switching, by the first application, the icon state of the second application according to the first data request response includes: and the first application switches the icon state of the second application from the first state to the third state according to the second data.
In the foregoing solution, after the second application sends a first data request response to the first application according to the variable value of the memory variable, the method further includes: and the second application assigns values to the variable values of the memory variables.
To achieve the above object, the present invention proposes a computer storage medium storing one or more programs executable by one or more processors to cause the one or more processors to perform the application icon state switching step as follows:
a first application detects a trigger event; the first application responds to the trigger event and assigns values to variable values of the memory variables; the first application sends a first data request to a second application; the second application sends a first data request response to the first application according to the variable value of the memory variable; and the first application switches the icon state of the second application according to the first data request response.
In the foregoing solution, the detecting, by the first application, the trigger event includes: the first application detects an event that the system changes from a first time to a second time.
In the foregoing solution, the assigning the variable value of the memory variable by the first application in response to the trigger event includes: the first application determines the type of the trigger event; when the trigger event is determined to be of a first type, the first application assigns a variable value of the memory variable to a first value; and when the trigger event is determined to be of the second type, the first application assigns the variable value of the memory variable to a second value.
In the foregoing solution, the sending, by the second application, the first data request response to the first application according to the variable value of the memory variable includes: and the second application sends first data to the first application according to the variable value of the memory variable as a first value.
In the foregoing solution, the switching, by the first application, the icon state of the second application according to the first data request response includes: and the first application switches the icon state of the second application from the first state to the second state according to the first data.
In the foregoing solution, the sending, by the second application, the first data request response to the first application according to the variable value of the memory variable includes: the second application sends a second data request to the server according to the variable value of the memory variable as a second value; the second application receives a second data request response sent by the server; and the second application sends second data to the first application according to the second data request response.
In the foregoing solution, the switching, by the first application, the icon state of the second application according to the first data request response includes: and the first application switches the icon state of the second application from the first state to the third state according to the second data.
In the foregoing solution, after the second application sends a first data request response to the first application according to the variable value of the memory variable, the method further includes: and the second application assigns values to the variable values of the memory variables.
Compared with the prior art, the invention provides an application icon state switching method, which comprises the following steps: a first application detects a trigger event; the first application responds to the trigger event and assigns values to variable values of the memory variables; the first application sends a first data request to a second application; the second application sends a first data request response to the first application according to the variable value of the memory variable; and the first application switches the icon state of the second application according to the first data request response. Therefore, the trigger event is detected by the first application and the memory variable value is assigned, so that the first application can distinguish the trigger event; the second application sends a first data request response to the first application based on the variable value of the memory variable, so that the second application distinguishes the first data request sent by the first application; switching the icon state of the second application through the first application according to the first data request response, so that the icon state of the second application is switched; by distinguishing the trigger event by the first application and distinguishing the first data request sent by the first application by the second application, the condition that the server is crashed due to sudden increase of the access amount of the calendar application to the server is avoided, and the stability of a data transmission network is improved.
Drawings
Fig. 1 is a schematic diagram of a hardware structure of an optional terminal in implementing various embodiments of the present invention;
FIG. 2 is a diagram of a wireless communication system for the terminal shown in FIG. 1;
FIG. 3 is a flowchart illustrating a method for switching states of application icons according to an alternative embodiment of the present invention;
FIG. 4 is a flowchart illustrating a method for switching states of application icons according to an alternative embodiment of the present invention;
FIG. 5 is a flowchart illustrating a method for switching states of application icons according to an alternative embodiment of the present invention;
fig. 6 is a schematic diagram of a specific application scenario of the application icon state switching method in an optional embodiment of the present invention.
Reference numerals:
the implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
In the following description, suffixes such as "module", "component", or "unit" used to denote elements are used only for facilitating the explanation of the present invention, and have no specific meaning in itself. Thus, "module", "component" or "unit" may be used mixedly.
The terminal may be implemented in various forms. For example, the terminal described in the present invention may include terminals such as a mobile phone, a tablet computer, a notebook computer, a palm top computer, a Personal Digital Assistant (PDA), a Portable Media Player (PMP), a navigation device, a wearable device, a smart band, a pedometer, and the like, and fixed terminals such as a Digital TV, a desktop computer, and the like.
While the terminal will be described as an example in the following description, those skilled in the art will appreciate that the configuration according to the embodiment of the present invention can be applied to a terminal of a fixed type, in addition to elements particularly used for moving purposes.
Referring to fig. 1, which is a schematic diagram of a hardware structure of a terminal 100 for implementing various embodiments of the present invention, the terminal 100 may include: RF (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, memory 109, processor 110, and power supply 111. Those skilled in the art will appreciate that the terminal configuration shown in fig. 1 is not intended to be limiting, and that the terminal may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
The various components of terminal 100 are described in detail below with reference to fig. 1:
the radio frequency unit 101 may be configured to receive and transmit signals during information transmission and reception or during a call, and specifically, receive downlink information of a base station and then process the downlink information to the processor 110; in addition, the uplink data is transmitted to the base station. Typically, radio frequency unit 101 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like. In addition, the radio frequency unit 101 can also communicate with a network and other devices through wireless communication. The wireless communication may use any communication standard or protocol, including but not limited to GSM (Global System for Mobile communications), GPRS (General Packet Radio Service), CDMA2000(Code Division Multiple Access 2000), WCDMA (Wideband Code Division Multiple Access), TD-SCDMA (Time Division-Synchronous Code Division Multiple Access), FDD-LTE (Frequency Division duplex-Long Term Evolution), and TDD-LTE (Time Division duplex-Long Term Evolution).
WiFi belongs to short-distance wireless transmission technology, and the terminal can help a user to receive and send e-mails, browse webpages, access streaming media and the like through the WiFi module 102, and provides wireless broadband internet access for the user. Although fig. 1 shows the WiFi module 102, it is understood that it does not belong to the essential constitution of the terminal, and may be omitted entirely as needed within the scope not changing the essence of the invention.
The audio output unit 103 may convert audio data received by the radio frequency unit 101 or the WiFi module 102 or stored in the memory 109 into an audio signal and output as sound when the terminal 100 is in a call signal reception mode, a call mode, a recording mode, a voice recognition mode, a broadcast reception mode, or the like. Also, the audio output unit 103 may also provide audio output related to a specific function performed by the terminal 100 (e.g., a call signal reception sound, a message reception sound, etc.). The audio output unit 103 may include a speaker, a buzzer, and the like.
The a/V input unit 104 is used to receive audio or video signals. The a/V input Unit 104 may include a Graphics Processing Unit (GPU) 1041 and a microphone 1042, the Graphics processor 1041 Processing image data of still pictures or video obtained by an image capturing device (e.g., a camera) in a video capturing mode or an image capturing mode. The processed image frames may be displayed on the display unit 106. The image frames processed by the graphic processor 1041 may be stored in the memory 109 (or other storage medium) or transmitted via the radio frequency unit 101 or the WiFi module 102. The microphone 1042 may receive sounds (audio data) via the microphone 1042 in a phone call mode, a recording mode, a voice recognition mode, or the like, and may be capable of processing such sounds into audio data. The processed audio (voice) data may be converted into a format output transmittable to a mobile communication base station via the radio frequency unit 101 in case of a phone call mode. The microphone 1042 may implement various types of noise cancellation (or suppression) algorithms to cancel (or suppress) noise or interference generated in the course of receiving and transmitting audio signals.
The terminal 100 also includes at least one sensor 105, such as a light sensor, motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor that can adjust the brightness of the display panel 1061 according to the brightness of ambient light, and a proximity sensor that can turn off the display panel 1061 and/or a backlight when the terminal 100 is moved to the ear. As one of the motion sensors, the accelerometer sensor can detect the magnitude of acceleration in each direction (generally, three axes), can detect the magnitude and direction of gravity when stationary, and can be used for applications of recognizing the posture of a mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer and tapping), and the like; as for other sensors such as a fingerprint sensor, a pressure sensor, an iris sensor, a molecular sensor, a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor, which can be configured on the mobile phone, further description is omitted here.
The display unit 106 is used to display information input by a user or information provided to the user. The Display unit 106 may include a Display panel 1061, and the Display panel 1061 may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like.
The user input unit 107 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the terminal. Specifically, the user input unit 107 may include a touch panel 1071 and other input devices 1072. The touch panel 1071, also referred to as a touch screen, may collect a touch operation performed by a user on or near the touch panel 1071 (e.g., an operation performed by the user on or near the touch panel 1071 using a finger, a stylus, or any other suitable object or accessory), and drive a corresponding connection device according to a predetermined program. The touch panel 1071 may include two parts of a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 110, and can receive and execute commands sent by the processor 110. In addition, the touch panel 1071 may be implemented in various types, such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave. In addition to the touch panel 1071, the user input unit 107 may include other input devices 1072. In particular, other input devices 1072 may include, but are not limited to, one or more of a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like, and are not limited to these specific examples.
Further, the touch panel 1071 may cover the display panel 1061, and when the touch panel 1071 detects a touch operation thereon or nearby, the touch panel 1071 transmits the touch operation to the processor 110 to determine the type of the touch event, and then the processor 110 provides a corresponding visual output on the display panel 1061 according to the type of the touch event. Although the touch panel 1071 and the display panel 1061 are shown in fig. 1 as two separate components to implement the input and output functions of the terminal, in some embodiments, the touch panel 1071 and the display panel 1061 may be integrated to implement the input and output functions of the terminal, and is not limited herein.
The interface unit 108 serves as an interface through which at least one external device is connected to the terminal 100. For example, the external device may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device having an identification module, an audio input/output (I/O) port, a video I/O port, an earphone port, and the like. The interface unit 108 may be used to receive input (e.g., data information, power, etc.) from an external device and transmit the received input to one or more elements within the terminal 100 or may be used to transmit data between the terminal 100 and the external device.
The memory 109 may be used to store software programs as well as various data. The memory 109 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the cellular phone, and the like. Further, the memory 109 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
The processor 110 is a control center of the terminal, connects various parts of the entire terminal using various interfaces and lines, and performs various functions of the terminal and processes data by operating or executing software programs and/or modules stored in the memory 109 and calling data stored in the memory 109, thereby performing overall monitoring of the terminal. Processor 110 may include one or more processing units; preferably, the processor 110 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 110.
The terminal 100 may further include a power supply 111 (e.g., a battery) for supplying power to various components, and preferably, the power supply 111 may be logically connected to the processor 110 through a power management system, so as to manage charging, discharging, and power consumption management functions through the power management system.
Although not shown in fig. 1, the terminal 100 may further include a bluetooth module or the like, which is not described in detail herein.
In order to facilitate understanding of the embodiments of the present invention, a communication network system on which the terminal of the present invention is based is described below.
Referring to fig. 2, fig. 2 is an architecture diagram of a communication Network system according to an embodiment of the present invention, where the communication Network system is an LTE system of a universal mobile telecommunications technology, and the LTE system includes a UE (User Equipment) 201, an E-UTRAN (Evolved UMTS Terrestrial Radio Access Network) 202, an EPC (Evolved Packet Core) 203, and an IP service 204 of an operator, which are in communication connection in sequence.
Specifically, the UE201 may be the terminal 100 described above, and is not described herein again.
The E-UTRAN202 includes eNodeB2021 and other eNodeBs 2022, among others. Among them, the eNodeB2021 may be connected with other eNodeB2022 through backhaul (e.g., X2 interface), the eNodeB2021 is connected to the EPC203, and the eNodeB2021 may provide the UE201 access to the EPC 203.
The EPC203 may include an MME (Mobility Management Entity) 2031, an HSS (Home Subscriber Server) 2032, other MMEs 2033, an SGW (Serving gateway) 2034, a PGW (PDN gateway) 2035, and a PCRF (Policy and charging functions Entity) 2036, and the like. The MME2031 is a control node that handles signaling between the UE201 and the EPC203, and provides bearer and connection management. HSS2032 is used to provide registers to manage functions such as home location register (not shown) and holds subscriber specific information about service characteristics, data rates, etc. All user data may be sent through SGW2034, PGW2035 may provide IP address assignment for UE201 and other functions, and PCRF2036 is a policy and charging control policy decision point for traffic data flow and IP bearer resources, which selects and provides available policy and charging control decisions for a policy and charging enforcement function (not shown).
The IP services 204 may include the internet, intranets, IMS (IP Multimedia Subsystem), or other IP services, among others.
Although the LTE system is described as an example, it should be understood by those skilled in the art that the present invention is not limited to the LTE system, but may also be applied to other wireless communication systems, such as GSM, CDMA2000, WCDMA, TD-SCDMA, and future new network systems.
Based on the above terminal hardware structure and communication network system, the present invention provides various embodiments of the method.
Referring to fig. 3, the present invention provides a method for switching states of application icons, the method comprising:
step S301: the first application detects a trigger event.
Here, the first application detects a trigger event, which may be a click operation, a sliding operation, a shaking operation, or the like of a user; or may be some event in the system running, such as the specific application starting running, the specific application running ending, or the specific application executing a preset instruction.
Optionally, step S301 may include: the first application detects an event that the system changes from a first time to a second time. Here, the first application may periodically detect a time change of the system, and the first application may set a timer, and perform the detection of the time change of the system when a count value of the timer satisfies a predetermined value; the first application can also be provided with a timer, and when the value of the timer is zero, the time change of the system is detected; the first application may also detect the temporal changes of the system in real time. The first application detects an event that the system's time changes from a first time to a second time, wherein the first time may be 23:59 and the second time may be 00: 00; the first time may also be 11:59PM and, correspondingly, the second time may also be 12: 00.
Step S302: and the first application responds to the trigger event and assigns values to the variable values of the memory variables.
Here, after the first application detects the trigger event, in response to the trigger event, a memory variable var may be set and assigned to a variable value of the memory variable var, and the variable value of the memory variable var may be assigned to a numerical form, that is, a value of 0 or 1 or 2, etc.; the variable value of the memory variable var can also be assigned to a character form, namely a character 'T' or 'F' and the like; the variable value of the memory variable var can also be assigned in boolean form, i.e., true or false. The memory variable var may also be a global variable, and the first application assigns a variable value of the memory variable var. And assigning a variable value of the memory variable var by the first application to realize the differentiation of the first application on the trigger event.
Step S303: the first application sends a first data request to a second application.
Here, the first application may send the first data request to the second application through an interface function between application programs, or may send the first data request to the second application by calling a function of the second application. Wherein the first data request may include the memory variable var.
Step S304: and the second application sends a first data request response to the first application according to the variable value of the memory variable.
Here, the second application reads the variable value of the memory variable var and sends the first data request response to the first application according to the variable value of the memory variable var. If the variable value of the memory variable var is in a numerical value form, and the variable value of the memory variable var is 0 or 1, the second application sends first data to the first application; correspondingly, when the variable value of the memory variable var is 1 or 0, the second application sends second data to the first application. If the variable value of the memory variable var is in a character form, and the variable value of the memory variable var is 'T' or 'F', the second application sends first data to the first application; correspondingly, when the variable value of the memory variable var is 'F' or 'T', the second application sends second data to the first application. If the variable value of the memory variable var is in a Boolean form, and the variable value of the memory variable var is true or false by the second application, sending first data to the first application; correspondingly, when the variable value of the memory variable var is false or true, the second application sends second data to the first application.
Step S305: and the first application switches the icon state of the second application according to the first data request response.
Here, the first application receives the first data request response sent by the second application, and after receiving the first data request response sent by the second application, the first application switches the application icon state of the second application according to the first data request response.
Therefore, the trigger event is detected by the first application and the memory variable value is assigned, so that the first application can distinguish the trigger event; the second application sends a first data request response to the first application based on the variable value of the memory variable, so that the second application distinguishes the first data request sent by the first application; switching the icon state of the second application through the first application according to the first data request response, so that the icon state of the second application is switched; by distinguishing the trigger event by the first application and distinguishing the first data request sent by the first application by the second application, the condition that the server is crashed due to sudden increase of the access amount of the calendar application to the server is avoided, and the stability of a data transmission network is improved.
In an alternative embodiment, referring to fig. 4, step S302 includes:
step S3021: the first application determines a type of the triggering event. Here, the first application determines whether the type of the trigger time is a user operation event or an event generated by system operation.
Step S3022: and when the trigger event is determined to be of the first type, the first application assigns the variable value of the memory variable var to a first value. Here, when the first application determines that the trigger event is of a first type, that is, when the trigger event is a system operation generation event, the first application assigns the variable value of the memory variable var to a first value. The first application can assign the variable value of the memory variable var to a numerical value form, namely a numerical value 0 or 1 or 2 and the like; the variable value of the memory variable var can also be assigned to a character form, namely a character 'T' or 'F' and the like; the variable value of the memory variable var can also be assigned in boolean form, i.e., true or false.
Step S3023: and when the trigger event is determined to be of the second type, the first application assigns the variable value of the memory variable var to a second value. Here, when the first application determines that the trigger event is of the second type, that is, when the trigger event is a user operation event, the variable value of the memory variable var is assigned as the second value by the first application. The first application can assign the variable value of the memory variable var to a numerical value form, namely a numerical value 0 or 1 or 2 and the like; the variable value of the memory variable var can also be assigned to a character form, namely a character 'T' or 'F' and the like; the variable value of the memory variable var can also be assigned in boolean form, i.e., true or false. Wherein the second value is different from the first value.
In an alternative embodiment, step S304 includes: and the second application sends first data to the first application according to the variable value of the memory variable as a first value. Here, when the variable value of the memory variable var is a first value, the second application determines to send first data to the first application, and the second application sends the first data to the first application.
In an alternative embodiment, step S305 includes: and the first application switches the icon state of the second application from the first state to the second state according to the first data. Here, the first application receives first data sent by the second application, and determines that the icon state of the second application is switched from the first state to the second state according to the first data. The first application switches the icon state of the second application from the first state to the second state.
In an alternative embodiment, referring to fig. 5, step S304 includes:
step S3041: and the second application sends a second data request to the server according to the variable value of the memory variable as a second value. Here, when the variable value of the memory variable var is a second value, the second application generates a second data request based on the first data request of the first application, and sends the second data request to a server.
Step S3042: and the second application receives a second data request response sent by the server. Here, the second application receives a second data request response transmitted by the server based on the second data request.
Step S3043: and the second application sends second data to the first application according to the second data request response. Here, the second application parses the second data request response sent by the server, determines to send second data to the first application, and the second application sends the second data to the first application.
In an alternative embodiment, step S305 includes: and the first application switches the icon state of the second application from the first state to the third state according to the second data. Here, the first application receives second data sent by the second application, and determines that the icon state of the second application is switched from the first state to the third state according to the second data. The first application switches the icon state of the second application from the first state to the third state.
In an optional embodiment, after step S304, the method further includes: and the second application assigns values to the variable values of the memory variables. Under the condition that the form of the variable value of the memory variable var is not changed, namely if the variable value of the memory variable var is in a numerical form, the variable value of the memory variable var is assigned to be a numerical value 0 or 1 or 2 by the second application, and the like; if the variable value of the memory variable var is assigned in a character form, the variable value of the memory variable var is assigned as a character 'T' or 'F' and the like by the second application; and if the variable value of the memory variable var is assigned in a Boolean form, the variable value of the memory variable var is assigned as true or false by the second application. Here, the second application may assign the variable value of the memory variable var to a first value or a second value; in addition to the variable value of the memory variable var being in boolean form, the second application may also assign the variable value of the memory variable var to a third value other than the first value and the second value.
In an optional embodiment, after step S305, the method further includes: and the first application assigns the variable value of the memory variable again. Under the condition that the variable value form of the memory variable var is not changed, namely if the variable value of the memory variable var is in a numerical value form, the variable value of the memory variable var is assigned to be a numerical value 0 or 1 or 2 by the first application; if the variable value of the memory variable var is assigned in a character form, the variable value of the memory variable var is assigned as a character 'T' or 'F' and the like by the first application; and if the variable value of the memory variable var is assigned in a Boolean form, assigning the variable value of the memory variable var to true or false by the first application. Here, the first application may assign the variable value of the memory variable var to a first value or a second value; in addition to the variable value of the memory variable var being in boolean form, the first application may also assign the variable value of the memory variable var to a third value other than the first value and the second value.
Therefore, the trigger event is detected by the first application and the memory variable value is assigned, so that the first application can distinguish the trigger event; the second application sends a first data request response to the first application based on the variable value of the memory variable, so that the second application distinguishes the first data request sent by the first application; switching the icon state of the second application through the first application according to the first data request response, so that the icon state of the second application is switched; by distinguishing the trigger event by the first application and distinguishing the first data request sent by the first application by the second application, the condition that the server is crashed due to sudden increase of the access amount of the calendar application to the server is avoided, and the stability of a data transmission network is improved.
To further illustrate the invention, a specific example is described below. Referring to fig. 6, the terminal 100 is a mobile phone, the first application is a desktop launcher 601, and the second application is a calendar application 602. The desktop starter 601 detects the change of the system time 603, and can perform periodic detection, namely detection once in 24 hours; or may be detected in real time. When launcher 601 detects that system time 603 changes from 23:59 to 00:00, the variable value of memory variable var is assigned to Boolean type true. Desktop launcher 601 sends a data request to calendar application 602 requesting the current date data. The calendar Application 602 receives the data request, determines that an Application cycle function does not need to be executed according to the fact that the variable value of the memory variable var is true, and directly sends current date data to the desktop starter 601, wherein the current date data is 'monday 17'. The desktop launcher 601 receives the current date data, and switches the icon state of the calendar application from "sunday 16" to "monday 17". The desktop launcher 601 assigns the variable value of the memory variable var to boolean false. Through the embodiment, because the onCreate () function of the calendar Application 602 in the Application period function can access the server, the desktop starter 601 modifies the variable value of the memory variable var, and the calendar Application 602 operates according to the variable value of the memory variable var, the calendar Application 602 does not access the server for the specific request of the desktop starter 601, the condition that the access amount of the calendar Application 602 to the server suddenly increases when the icon state of the calendar Application 602 needs to be switched in the morning is avoided, the condition that the server crashes is also avoided, and the stability of the data transmission network is improved.
To achieve the above object, the present invention also proposes a terminal, which comprises a processor 110, and a memory 109 connected to the processor 110 through a communication bus; the memory 109 is used for storing a program for application icon state switching processing; the processor 110 is configured to execute the application icon state switching processing program to implement the following application icon state switching steps: a first application detects a trigger event; the first application responds to the trigger event and assigns values to variable values of the memory variables; the first application sends a first data request to a second application; the second application sends a first data request response to the first application according to the variable value of the memory variable; and the first application switches the icon state of the second application according to the first data request response.
Here, the processor 110 is configured to execute the program of the application icon state switching process to implement the following application icon state switching steps: the first application detects a trigger event, including: the first application detects an event that the system changes from a first time to a second time.
Here, the processor 110 is configured to execute the program of the application icon state switching process to implement the following application icon state switching steps: the first application responds to the trigger event and assigns values to variable values of the memory variables, and the method comprises the following steps: the first application determines the type of the trigger event; when the trigger event is determined to be of a first type, the first application assigns a variable value of the memory variable to a first value; and when the trigger event is determined to be of the second type, the first application assigns the variable value of the memory variable to a second value.
Here, the processor 110 is configured to execute the program of the application icon state switching process to implement the following application icon state switching steps: the second application sends a first data request response to the first application according to the variable value of the memory variable, and the method comprises the following steps: and the second application sends first data to the first application according to the variable value of the memory variable as a first value.
Here, the processor 110 is configured to execute the program of the application icon state switching process to implement the following application icon state switching steps: the first application switches the icon state of the second application according to the first data request response, and the switching comprises the following steps: and the first application switches the icon state of the second application from the first state to the second state according to the first data.
Here, the processor 110 is configured to execute the program of the application icon state switching process to implement the following application icon state switching steps: the second application sends a first data request response to the first application according to the variable value of the memory variable, and the method comprises the following steps: the second application sends a second data request to the server according to the variable value of the memory variable as a second value; the second application receives a second data request response sent by the server; and the second application sends second data to the first application according to the second data request response.
Here, the processor 110 is configured to execute the program of the application icon state switching process to implement the following application icon state switching steps: the first application switches the icon state of the second application according to the first data request response, and the switching comprises the following steps: and the first application switches the icon state of the second application from the first state to the third state according to the second data.
Here, the processor 110 is configured to execute the program of the application icon state switching process to implement the following application icon state switching steps: after the second application sends a first data request response to the first application according to the variable value of the memory variable, the method further includes: and the second application assigns values to the variable values of the memory variables.
Optionally, the processor 110 may be a general-purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, or discrete hardware components. Here, the program executed by the processor 110 may be stored in a memory connected to the processor through a bus, and the memory 109 may be a volatile memory or a nonvolatile memory, or may include both volatile and nonvolatile memories. Among them, the nonvolatile Memory may be a Read Only Memory (ROM), a Programmable Read Only Memory (PROM), an Erasable Programmable Read-Only Memory (EPROM), an Electrically Erasable Programmable Read-Only Memory (EEPROM), a magnetic random access Memory (FRAM), a flash Memory (flash Memory), a magnetic surface Memory, an optical disk, or a Compact Disc Read-Only Memory (CD-ROM); the magnetic surface storage may be disk storage or tape storage. Volatile Memory can be Random Access Memory (RAM), which acts as external cache Memory. By way of illustration and not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Synchronous Static Random Access Memory (SSRAM), Dynamic Random Access Memory (DRAM), Synchronous Dynamic Random Access Memory (SDRAM), Double Data Rate Synchronous Dynamic Random Access Memory (DDRSDRAM, Double Data Synchronous Random Access Memory), Enhanced Synchronous Dynamic Random Access Memory (ESDRAM, Enhanced Synchronous Dynamic Random Access Memory), Synchronous linked Dynamic Random Access Memory (SLDRAM, Synchronous Random Access Memory), Direct Memory bus (DRmb Access Memory, Random Access Memory). The memory 109 described in connection with the embodiments of the invention is intended to comprise, without being limited to, these and any other suitable types of memory 109. The memory 109 in embodiments of the present invention is used to store various types of data to support the operation of the processor. Examples of such data include: any computer program for operation of the processor 110, such as operating systems and application programs; contact data; telephone book data; a message; a picture; video, etc. The operating system includes various system programs, such as a framework layer, a core library layer, a driver layer, and the like, and is used for implementing various basic services and processing hardware-based tasks.
To achieve the above object, the present invention proposes a computer storage medium storing one or more programs executable by one or more processors 110 to cause the one or more processors 110 to perform the application icon state switching step as follows: a first application detects a trigger event; the first application responds to the trigger event and assigns values to variable values of the memory variables; the first application sends a first data request to a second application; the second application sends a first data request response to the first application according to the variable value of the memory variable; and the first application switches the icon state of the second application according to the first data request response.
Optionally, the one or more programs may be executable by the one or more processors 110 to cause the one or more processors 110 to perform the following application icon state switching steps: the first application detects a trigger event, including: the first application detects an event that the system changes from a first time to a second time.
Optionally, the one or more programs may be executable by the one or more processors 110 to cause the one or more processors 110 to perform the following application icon state switching steps: the first application responds to the trigger event and assigns values to variable values of the memory variables, and the method comprises the following steps: the first application determines the type of the trigger event; when the trigger event is determined to be of a first type, the first application assigns a variable value of the memory variable to a first value; and when the trigger event is determined to be of the second type, the first application assigns the variable value of the memory variable to a second value.
Optionally, the one or more programs may be executable by the one or more processors 110 to cause the one or more processors 110 to perform the following application icon state switching steps: the second application sends a first data request response to the first application according to the variable value of the memory variable, and the method comprises the following steps: and the second application sends first data to the first application according to the variable value of the memory variable as a first value.
Optionally, the one or more programs may be executable by the one or more processors 110 to cause the one or more processors 110 to perform the following application icon state switching steps: the first application switches the icon state of the second application according to the first data request response, and the switching comprises the following steps: and the first application switches the icon state of the second application from the first state to the second state according to the first data.
Optionally, the one or more programs may be executable by the one or more processors 110 to cause the one or more processors 110 to perform the following application icon state switching steps: the second application sends a first data request response to the first application according to the variable value of the memory variable, and the method comprises the following steps: the second application sends a second data request to the server according to the variable value of the memory variable as a second value; the second application receives a second data request response sent by the server; and the second application sends second data to the first application according to the second data request response.
Optionally, the one or more programs may be executable by the one or more processors 110 to cause the one or more processors 110 to perform the following application icon state switching steps: the first application switches the icon state of the second application according to the first data request response, and the switching comprises the following steps: and the first application switches the icon state of the second application from the first state to the third state according to the second data.
Optionally, the one or more programs may be executable by the one or more processors 110 to cause the one or more processors 110 to perform the following application icon state switching steps: after the second application sends a first data request response to the first application according to the variable value of the memory variable, the method further includes: and the second application assigns values to the variable values of the memory variables.
Optionally, the computer storage medium may be a volatile Memory (volatile Memory), such as a Random-Access Memory (RAM); or a non-volatile Memory (non-volatile Memory), such as a Read-Only Memory (ROM), a flash Memory (flash Memory), a Hard disk (Hard disk Drive, HDD) or a Solid-State Drive (SSD); or may be a respective device, such as a mobile phone, computer, tablet device, personal digital assistant, etc., that includes one or any combination of the above-mentioned memories.
Compared with the prior art, the embodiment of the invention provides an application icon state switching method, which comprises the following steps: a first application detects a trigger event; the first application responds to the trigger event and assigns values to variable values of the memory variables; the first application sends a first data request to a second application; the second application sends a first data request response to the first application according to the variable value of the memory variable; and the first application switches the icon state of the second application according to the first data request response. Therefore, the trigger event is detected by the first application and the memory variable value is assigned, so that the first application can distinguish the trigger event; the second application sends a first data request response to the first application based on the variable value of the memory variable, so that the second application distinguishes the first data request sent by the first application; switching the icon state of the second application through the first application according to the first data request response, so that the icon state of the second application is switched; by distinguishing the trigger event by the first application and distinguishing the first data request sent by the first application by the second application, the condition that the server is crashed due to sudden increase of the access amount of the calendar application to the server is avoided, and the stability of a data transmission network is improved.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
While the present invention has been described with reference to the embodiments shown in the drawings, the present invention is not limited to the embodiments, which are illustrative and not restrictive, and it will be apparent to those skilled in the art that various changes and modifications can be made therein without departing from the spirit and scope of the invention as defined in the appended claims.

Claims (10)

1. An application icon state switching method is characterized by comprising the following steps:
a first application detects a trigger event;
the first application responds to the trigger event and assigns values to variable values of the memory variables;
the first application sends a first data request to a second application;
the second application sends a first data request response to the first application according to the variable value of the memory variable;
and the first application switches the icon state of the second application according to the first data request response.
2. The method for switching the state of the application icon according to claim 1, wherein the detecting a trigger event by the first application includes:
the first application detects an event that the system changes from a first time to a second time.
3. The method according to claim 1, wherein the assigning the variable value of the memory variable by the first application in response to the trigger event comprises:
the first application determines the type of the trigger event;
when the trigger event is determined to be of a first type, the first application assigns a variable value of the memory variable to a first value;
and when the trigger event is determined to be of the second type, the first application assigns the variable value of the memory variable to a second value.
4. The method according to claim 3, wherein the sending, by the second application, a first data request response to the first application according to the variable value of the memory variable comprises:
and the second application sends first data to the first application according to the variable value of the memory variable as a first value.
5. The method for switching the icon state of the application according to claim 4, wherein the switching the icon state of the second application according to the first data request response by the first application comprises:
and the first application switches the icon state of the second application from the first state to the second state according to the first data.
6. The method according to claim 3, wherein the sending, by the second application, a first data request response to the first application according to the variable value of the memory variable comprises:
the second application sends a second data request to the server according to the variable value of the memory variable as a second value;
the second application receives a second data request response sent by the server;
and the second application sends second data to the first application according to the second data request response.
7. The method for switching the icon state of the application according to claim 6, wherein the switching the icon state of the second application according to the first data request response by the first application comprises:
and the first application switches the icon state of the second application from the first state to the third state according to the second data.
8. The method for switching states of application icons according to any one of claims 1 to 7, wherein after the second application sends a first data request response to the first application according to the variable value of the memory variable, the method further comprises:
and the second application assigns values to the variable values of the memory variables.
9. A terminal, characterized in that it comprises a processor and a memory connected to said processor by a communication bus; wherein,
the memory is used for storing a program for switching the application icon state;
the processor is configured to execute the program of the application icon state switching process to implement the application icon state switching step according to any one of claims 1 to 8.
10. A computer storage medium storing one or more programs, the one or more programs being executable by one or more processors to cause the one or more processors to perform the application icon state switching step of any one of claims 1 to 8.
CN201811592799.2A 2018-12-20 2018-12-20 Application icon state switching method, terminal and computer storage medium Active CN109451176B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811592799.2A CN109451176B (en) 2018-12-20 2018-12-20 Application icon state switching method, terminal and computer storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811592799.2A CN109451176B (en) 2018-12-20 2018-12-20 Application icon state switching method, terminal and computer storage medium

Publications (2)

Publication Number Publication Date
CN109451176A true CN109451176A (en) 2019-03-08
CN109451176B CN109451176B (en) 2021-01-01

Family

ID=65535420

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811592799.2A Active CN109451176B (en) 2018-12-20 2018-12-20 Application icon state switching method, terminal and computer storage medium

Country Status (1)

Country Link
CN (1) CN109451176B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104793845A (en) * 2015-04-01 2015-07-22 乐视致新电子科技(天津)有限公司 Date switching display method and date switching display device
US20160212210A1 (en) * 2015-01-20 2016-07-21 Michael J. Picciallo Electronic device with calendaring capabilities
CN106371701A (en) * 2016-09-05 2017-02-01 深圳铂睿智恒科技有限公司 Automatic switching method and system of dynamic festival calendar icon on basis of mobile terminal
CN106708482A (en) * 2015-07-30 2017-05-24 北京奇虎科技有限公司 Date information display method and apparatus
CN107682569A (en) * 2017-11-20 2018-02-09 深圳市万普拉斯科技有限公司 Time information renovation method, apparatus, mobile terminal and readable storage medium storing program for executing
CN108053184A (en) * 2017-12-27 2018-05-18 努比亚技术有限公司 Item reminding method, mobile terminal and computer readable storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160212210A1 (en) * 2015-01-20 2016-07-21 Michael J. Picciallo Electronic device with calendaring capabilities
CN104793845A (en) * 2015-04-01 2015-07-22 乐视致新电子科技(天津)有限公司 Date switching display method and date switching display device
CN106708482A (en) * 2015-07-30 2017-05-24 北京奇虎科技有限公司 Date information display method and apparatus
CN106371701A (en) * 2016-09-05 2017-02-01 深圳铂睿智恒科技有限公司 Automatic switching method and system of dynamic festival calendar icon on basis of mobile terminal
CN107682569A (en) * 2017-11-20 2018-02-09 深圳市万普拉斯科技有限公司 Time information renovation method, apparatus, mobile terminal and readable storage medium storing program for executing
CN108053184A (en) * 2017-12-27 2018-05-18 努比亚技术有限公司 Item reminding method, mobile terminal and computer readable storage medium

Also Published As

Publication number Publication date
CN109451176B (en) 2021-01-01

Similar Documents

Publication Publication Date Title
CN112799577B (en) Method, terminal and storage medium for projecting small window
CN107635070B (en) Message reminding method, terminal and storage medium
CN108121681B (en) Hot plug implementation method, terminal and storage medium
CN107862217B (en) Position information acquisition method, mobile terminal and computer storage medium
CN108307030A (en) A kind of SIM card management method, equipment and computer readable storage medium
CN107846725B (en) Notification message processing method, terminal and storage medium
CN110381202B (en) Display adjustment method, mobile terminal and computer-readable storage medium
CN109725967B (en) Method and device for adjusting horizontal and vertical screen display errors, mobile terminal and storage medium
CN107678622B (en) Application icon display method, terminal and storage medium
CN107239208B (en) Method, apparatus, and computer-readable storage medium for processing screenshot
CN107809527B (en) Method for presenting shortcut operation and electronic equipment
CN107360211B (en) Information flow information offline method, related equipment and computer storage medium
CN112395106A (en) Process management method, mobile terminal, and computer-readable storage medium
CN110187934B (en) Application control method, terminal and computer readable storage medium
CN112423211A (en) Multi-audio transmission control method, equipment and computer readable storage medium
CN109683796B (en) Interaction control method, equipment and computer readable storage medium
CN109062688B (en) Memory allocation method, server and mobile terminal
CN108900696B (en) Data processing method, terminal and computer readable storage medium
CN107404568B (en) Control switch management method and mobile terminal
CN108183833B (en) Response processing method and device and computer readable storage medium
CN109976644A (en) Using the implementation method and device of prompt operation, mobile terminal and storage medium
CN115914719A (en) Screen projection display method, intelligent terminal and storage medium
CN108833686A (en) Processing method for paging message, terminal device, network side equipment and storage medium
CN109451176B (en) Application icon state switching method, terminal and computer storage medium
CN107315613A (en) A kind of quick control method of background application, terminal and computer-readable recording 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
GR01 Patent grant
GR01 Patent grant