Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Method for detecting whether current application positioned on foreground or not

A current application and application technology, applied in the field of information processing, can solve problems such as crashes, increased system overhead, and slow system response, and achieve the effects of increasing operating speed, reducing system overhead, and simple logical structure

Inactive Publication Date: 2017-02-01
ZHONGKE INFORMATION SECURITY COMMON TECH NAT ENG RES CENT CO LTD
View PDF3 Cites 4 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0012] This method needs to obtain all running applications for each judgment, which greatly increases the overhead of the system. When there are many applications opened by the system, the running speed of the system will decrease, especially for smart phones that have been used for a period of time. For mobile phones, due to the large number of temporary files in the system, when the system is judging the usage status of the application, the system will respond slowly or even crash

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0021] In the following detailed description, numerous details are set forth in order to provide a complete understanding of the present invention, but those skilled in the art will understand that the present invention may be practiced without these specific details. In the embodiments thereof, well-known methods, procedures, and components have not been described in detail so as not to unnecessarily obscure the embodiments.

[0022] A method for detecting whether the current application is in the foreground according to the present invention is to use the counting module to perform counting processing on the interface operations of the application program after startup, and judge whether the application program is running in the foreground or background according to the counting, specifically for the interface creation of the application program Complete and add 1 to the count of the counting module when the screen is visible, and decrement the count of the counting module by...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses a method for detecting whether a current application is positioned on a foreground or not. The method comprises the following steps: performing counting processing on interface operation of a started application program by using a counting module; judging whether the application program operates on the foreground or on the background according to the counting. Particularly, when the interface of the application program finishes the creation and is visible on the screen, counting is performed and one is added by the counting module; when the interface of the application program is invisible on the screen and is not destroyed, counting is performed and one is subtracted by the counting module; when a counting value of the counting module is 0, the application program runs on the background; when the counting value of the counting module is not equal to 0, the application program runs on the foreground. The technical scheme of the invention has the beneficial effects that compared with a traditional detection method, the method disclosed by the invention has the characteristic of simple logic structure; system overhead is effectively reduced, and the running efficiency of the system and software is improved.

Description

technical field [0001] The invention relates to the technical field of information processing, in particular to a method for detecting whether a current application is in the foreground. Background technique [0002] At present, in the Android application development technology, many applications need to judge whether the application is in the foreground or the background to meet the business logic needs. For example, the instant messaging application needs to judge whether it is currently running in the background. If it is in the background, it needs to display the received message to In the notification bar, if you switch from the background to the foreground, you need to display the message in the foreground. There are also some video playback applications that need to automatically pause when switching to the background and automatically play when switching to the foreground. These all need to determine whether the application is In the foreground and background, and th...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G06F11/30
CPCG06F11/302
Inventor 陈仲达高振鹏
Owner ZHONGKE INFORMATION SECURITY COMMON TECH NAT ENG RES CENT CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products