CN112162783A - Music playing application keep-alive processing method and system, storage medium and electronic equipment - Google Patents

Music playing application keep-alive processing method and system, storage medium and electronic equipment Download PDF

Info

Publication number
CN112162783A
CN112162783A CN202011035487.9A CN202011035487A CN112162783A CN 112162783 A CN112162783 A CN 112162783A CN 202011035487 A CN202011035487 A CN 202011035487A CN 112162783 A CN112162783 A CN 112162783A
Authority
CN
China
Prior art keywords
audio
stack
acquiring
information
identification mark
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
CN202011035487.9A
Other languages
Chinese (zh)
Other versions
CN112162783B (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.)
Gree Electric Appliances Inc of Zhuhai
Original Assignee
Gree Electric Appliances Inc of Zhuhai
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 Gree Electric Appliances Inc of Zhuhai filed Critical Gree Electric Appliances Inc of Zhuhai
Priority to CN202011035487.9A priority Critical patent/CN112162783B/en
Publication of CN112162783A publication Critical patent/CN112162783A/en
Application granted granted Critical
Publication of CN112162783B publication Critical patent/CN112162783B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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/4401Bootstrapping
    • G06F9/4418Suspend and resume; Hibernate and awake
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • G06F1/32Means for saving power
    • G06F1/3203Power management, i.e. event-based initiation of a power-saving mode
    • G06F1/3234Power saving characterised by the action undertaken
    • G06F1/329Power saving characterised by the action undertaken by task scheduling
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/60Information retrieval; Database structures therefor; File system structures therefor of audio data
    • G06F16/65Clustering; Classification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/60Information retrieval; Database structures therefor; File system structures therefor of audio data
    • G06F16/68Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually
    • G06F16/686Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using information manually generated, e.g. tags, keywords, comments, title or artist information, time, location or usage information, user ratings
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The invention discloses a keep-alive processing method, a keep-alive processing system, a storage medium and electronic equipment for music playing application under an android platform, wherein the method comprises the following steps: acquiring a first identification mark of an application program; acquiring audio focus stack information; analyzing the audio focus stack information to obtain stack top request information of the audio focus stack information; acquiring an audio request type stored in the stack top request information; detecting whether the type of the audio request is music; when the audio request type is music, acquiring a second identification mark of the application program corresponding to the stack top request information; detecting whether the first identification mark and the second identification mark are the same; and when the first identification mark is the same as the second identification mark, returning a first judgment value, and when the first identification mark is different from the second identification mark, returning a second judgment value. The method has better keep-alive effect on the music playing application process, is easier to select applications which are not needed by the user to pause, and reduces the power consumption.

Description

Music playing application keep-alive processing method and system, storage medium and electronic equipment
Technical Field
The invention relates to the technical field of mobile phone application program communication, in particular to a music playing application keep-alive processing method and system under an android platform, a storage medium and electronic equipment.
Background
Under the condition of a domestic Android multi-manufacturer self-defined system environment, background application management is stricter, and restrictions on power consumption, network IO, CPU awakening and the like are stricter. The Android background process operation has great influence on the endurance and performance of the mobile phone, so that many mobile phones can limit the operation of the background process, but all background processes cannot be limited, and the judgment and filtering are required, for example, the background music playing application cannot be limited, so that the use of a user is influenced.
Since many users like to put some music playing APPs on the background to play music, the system cannot accurately judge which applications can be frozen when freezing background applications, and which applications cannot be frozen accurately, so that the system cannot perform correct background application management.
An application that a user wants to play music remains running in the background for a long time without being frozen, and a method for keeping the application alive is needed.
Disclosure of Invention
The invention provides a keep-alive processing method for music playing application under an android platform, which solves the technical problem that a system cannot accurately judge which background APP plays music so as to carry out keep-alive processing when background application management is carried out, so that the music playing application required by a user is not suspended when entering a background mode.
The invention provides a keep-alive processing method of music playing application under an android platform, which comprises the following steps:
acquiring a first identification mark of an application program;
acquiring audio focus stack information;
analyzing the audio focus stack information to obtain stack top request information of the audio focus stack information;
acquiring an audio request type stored in the stack top request information;
detecting whether the audio request type is music;
when the audio request type is music, acquiring a second identification mark of an application program corresponding to the stack top request information;
detecting whether the first identification mark and the second identification mark are the same;
and when the first identification mark is the same as the second identification mark, returning a first judgment value, and when the first identification mark is different from the second identification mark, returning a second judgment value.
In an embodiment of the present invention, it is,
the step of obtaining the audio request type stored in the stack top request information includes:
detecting whether the value of the stack top request information is empty;
when the value of the stack top request information is not empty, acquiring an audio request type stored in the stack top request information;
and when the value of the stack top request information is null, returning the second judgment value.
In an embodiment of the present invention, it is,
the step of obtaining the audio request type stored in the stack top request information includes:
acquiring attribute variables stored in the stack top request information;
and acquiring the audio request type corresponding to the attribute variable.
In an embodiment of the present invention, it is,
the step of detecting whether the audio request type is music further comprises:
and when the audio request type is not music, returning the second judgment value.
In an embodiment of the present invention, it is,
the step of acquiring audio focus stack information includes:
and acquiring all the audio focus stack information in the audio service.
In an embodiment of the present invention, it is,
the step of acquiring the first identification of the application program comprises the following steps:
and acquiring the first identification of at least one application program in the background.
The invention provides a keep-alive processing system for music playing application under an android platform, which comprises:
the data acquisition module is used for acquiring a first identification mark of an application program, acquiring audio focus stack information, analyzing the audio focus stack information, acquiring stack top request information of the audio focus stack information, and acquiring an audio request type stored in the stack top request information;
the type detection module is used for detecting whether the audio request type is music or not, and when the audio request type is music, acquiring a second identification mark of the application program corresponding to the stack top request information;
and the identification detection module is used for detecting whether the first identification and the second identification are the same or not, returning a first judgment value when the first identification and the second identification are the same, and returning a second judgment value when the first identification and the second identification are different.
In an embodiment of the present invention, it is,
the type detection module further comprises a stack top information detection module, wherein the stack top information detection module is used for detecting whether the value of the stack top request information is empty, acquiring the audio request type stored in the stack top request information when the value of the stack top request information is not empty, and returning the second judgment value when the value of the stack top request information is empty.
The present invention provides a storage medium having stored thereon a computer program,
when being executed by a processor, the program realizes the steps of the keep-alive processing method of the music playing application under the android platform.
The present invention provides an electronic device, including:
a memory having a computer program stored thereon; and
a processor for executing the computer program in the memory to implement the steps of the keep-alive processing method for the music playing application under the android platform in any one of the above contents.
One or more embodiments of the present invention may have the following advantages over the prior art:
according to the method and the device, the audio playing process at the stack top of the audio focus stack is obtained, the state of continuous operation when the target music playing application is switched to the background mode is kept according to the condition that the user name of the audio playing process is the same as the user name of the background target music playing application, the target music playing application cannot be cleaned or suspended by a system, the keep-alive effect of the music playing application process with long-time connection requirement is better, the application which is not needed by a user can be easily selected to be suspended, and the power consumption is reduced.
Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by the practice of the invention. The objectives and other advantages of the invention will be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description serve to explain the principles of the invention and not to limit the invention. In the drawings:
fig. 1 is a schematic flow chart of a keep-alive processing method of a music playing application under an android platform according to an embodiment of the present invention;
fig. 2 is a schematic flow chart of a method for determining a music playing application under an android platform according to an embodiment of the present invention;
fig. 3 is a schematic diagram of a keep-alive processing system framework of a music playing application under an android platform according to another embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the following detailed description of the present invention with reference to the accompanying drawings is provided to fully understand and implement the technical effects of the present invention by solving the technical problems through technical means. It should be noted that, as long as there is no conflict, the embodiments and the features of the embodiments of the present invention may be combined with each other, and the technical solutions formed are within the scope of the present invention.
First embodiment
Fig. 1 is a schematic flow chart of a keep-alive processing method of a music playing application under an android platform according to this embodiment;
fig. 2 is a schematic flow chart of a method for determining a music playing application under an android platform according to this embodiment;
in this embodiment, the APP is an application program, Uid is a first identification identifier of the application program, preferably a user code of the application program, mFocusStack is an audio focus stack, focsrequster is stack top request information of the audio focus stack, preferably a stack top audio request process, mCallingUid is a second identification identifier of the application program, preferably an audio focus request user code, and mContentType is an audio request type.
The Android system is a multitasking operating system, thus allowing many tasks to work simultaneously at the same time. But this is a challenge for audio-like applications because the user experience is poor in many cases if multiple audios are played simultaneously. For example, when listening to music, a user comes a telephone, and at this time, the telephone and the music work together in your earphone, and under normal conditions, the user cannot accept 2 sounds simultaneously.
To solve this problem, the concept of audio focus (audio focus) was introduced starting from android 2.2. That is, when the user needs to play music or send a notification, the process may ask for audio focus, which is located at the top of the audio focus stack. Once audio focus is obtained, the audio output device is free to use. But at the same time the system also listens for changes in audio focus at that moment. When the audio focus changes, the user needs to properly process the audio output.
The embodiment provides a keep-alive processing method for music playing application under an android platform, which comprises the following steps:
acquiring a first identification mark of an application program;
acquiring audio focus stack information;
analyzing the audio focus stack information to obtain stack top request information of the audio focus stack information;
acquiring an audio request type stored in the stack top request information;
detecting whether the type of the audio request is music;
when the audio request type is music, acquiring a second identification mark of the application program corresponding to the stack top request information;
detecting whether the first identification mark and the second identification mark are the same;
and when the first identification mark is the same as the second identification mark, returning a first judgment value, and when the first identification mark is different from the second identification mark, returning a second judgment value.
Specifically, a keep-alive processing method for music playing application under an android platform includes the following steps:
s100, acquiring a first identification mark of the application program.
In this embodiment, under the android platform, each installed application has its own unique identification, and in this embodiment, the application is preferably a user code of the application. After the user opens the music playing application, there is a situation that other application programs are opened again, and the music playing application needs to enter a background mode, at this time, in order to reduce power consumption, the background management system can perform pause processing or quit processing on the application programs which are not used by the background part.
In this embodiment, when the music playing application enters the background mode, the first identification mark of the music playing application program is acquired. Further, if a plurality of music playing applications exist in the background, the first identification of at least one application in the background is acquired.
Further, in this embodiment, the user code of the target music playing application is also saved when the foreground mode is switched to the background mode.
S101, acquiring audio focus stack information.
In this embodiment, all audio playing under the android platform needs to perform an audio focus request, the target music playing application needs to perform an audio focus request when playing music in a foreground mode, the target music playing application also needs to apply for an audio focus when playing music in a background after transferring to a background mode, all relevant information of applying for the audio focus is stored in a focus request process (focsrequster), then the audio playing process that obtains the audio focus is placed in an audio focus stack (mfocus stack), and the stack top request information (focsrequster) of the audio focus stack is the audio playing process information that is currently using the audio focus. In the present embodiment, each of the top-of-stack request information (focusrequest) represents user information using an audio focus.
In this embodiment, the step of obtaining the audio focus stack information includes: all audio focus stack information in the audio service, including user information, is obtained.
S102, analyzing the audio focus stack information, and acquiring stack top request information of the audio focus stack information.
The audio focus stack is a data structure with the audio focus at the top of the audio focus stack. In this embodiment, the audio focus stack information is analyzed, the stack top request information of the audio focus stack is obtained through the corresponding data interface, and the audio playing process at the stack top of the audio focus stack is obtained.
S103, the audio request type stored in the stack top request information is obtained.
The step of obtaining the audio request type stored in the stack top request information comprises the following steps:
detecting whether the value of the stack top request information is empty; when the value of the stack top request information is not empty, acquiring the audio request type stored in the stack top request information;
and when the value of the stack top request information is empty, returning a second judgment value.
Specifically, in this embodiment, after acquiring the stack top request information, first detecting whether a value of the stack top request information of the audio focus stack is empty, that is, determining whether an audio playing process exists at the stack top, and when the value of the stack top request information is not empty, that is, there is an audio playing process at the stack top of the audio focus stack, acquiring an audio request type stored in the stack top request information, that is, acquiring an audio request type of the audio playing process; when the value of the stack top request information is null, namely the stack top of the audio focus stack has no audio playing process, returning a second judgment value, indicating that the target music playing application does not play music, and pausing the target music playing application;
in this embodiment, the step of obtaining the audio request type stored in the stack top request information includes: acquiring attribute variables stored in the stack top request information; and acquiring the audio request type corresponding to the attribute variable.
Specifically, in this embodiment, there is an AudioAttributes variable in the top of stack request information (focusrequest), where an audio request type is stored, and the audio request type includes at least one of music, video, call, and voice. And acquiring the audio request type stored in the stack top request information, acquiring mAttributes attribute variables of the audioAttributes type in the stack top request information (FocusRequester), and then acquiring the corresponding audio request type in the attribute variables.
S104, detecting whether the audio request type is music, and acquiring a second identification mark of the application program corresponding to the stack top request information when the audio request type is music; and when the audio request type is not music, returning a second judgment value.
In this embodiment, after the audio request TYPE stored in the stack top request information is obtained, that is, the audio request TYPE of the audio playing process is obtained, then it is detected whether the audio request TYPE of the audio playing process is MUSIC (CONTENT _ TYPE _ MUSIC), and when the audio request TYPE of the audio playing process is MUSIC, a second identification identifier of the application program corresponding to the stack top request information is obtained, that is, an audio focus request user code (mCallingUid) of the audio playing process is obtained; and if the audio request type in the audio playing process is not music, returning a second judgment value to indicate that the target music playing application does not play music, and pausing the target music playing application.
S105, detecting whether the first identification mark and the second identification mark are the same; and when the first identification mark is the same as the second identification mark, returning a first judgment value, and when the first identification mark is different from the second identification mark, returning a second judgment value.
The stack top request information (focsrequster) contains the user code of the audio playback process and also contains the user code of the music playback application.
In this embodiment, after obtaining the first identification mark and the second identification mark of the music playing application program, detecting whether the first identification mark and the second identification mark are the same, that is, detecting whether the user code of the target music playing application and the audio focus requesting user code are the same, and when the first identification mark and the second identification mark are the same, that is, the user code of the target music playing application and the audio focus requesting user code are the same, returning to the first judgment value, indicating that the target music playing application is playing music, and maintaining the background operation of the target music playing application without pausing, thereby avoiding affecting the use of the user and reducing the user experience; and when the first identification mark is different from the second identification mark, if the audio focus request user code is different from the user code of the target music playing application acquired in the previous step, returning a second judgment value to indicate that the target music playing application does not play music, pausing the target music playing application, and reducing the power consumption of the system.
Further, if the audio focus request user code is different from the user code of the target music playing application, after the step of pausing the target music playing application, the method further includes: and releasing the audio focus after the audio playing process at the stack top is finished, and obtaining the audio focus by the target music playing application to continue playing music.
Specifically, in this embodiment, if the user code requested by the audio focus is different from the user code of the target music playing application obtained in the previous step, it indicates that the target music playing application does not play music, and at present, other audio playing processes that have obtained the audio focus are playing audio, so the target music playing application is paused. And when the audio playing process at the stack top is finished, the audio focus is released, and the originally paused target music playing application obtains the audio focus to continue playing music.
In summary, the embodiment provides a keep-alive processing method for a music playing application under an android platform, by acquiring an audio playing process at the top of a stack of an audio focus stack, and keeping a state of continuous operation when a target music playing application is switched to a background mode according to that a user name of the audio playing process is the same as that of the background target music playing application, without being cleaned or suspended by a system, the keep-alive effect is better for the music playing application process requiring long-time connection, an application not required by a user can be more easily selected to be suspended, and power consumption is reduced.
Second embodiment
Fig. 2 is a schematic diagram of a keep-alive processing system framework of a music playing application under an android platform according to the embodiment.
This embodiment provides a keep-alive processing system of music broadcast application under android platform, and the system includes:
the data acquisition module is used for acquiring a first identification mark of an application program, acquiring audio focus stack information, analyzing the audio focus stack information, acquiring stack top request information of the audio focus stack information, and acquiring an audio request type stored in the stack top request information;
the type detection module is used for detecting whether the audio request type is music or not, and acquiring a second identification mark of the application program corresponding to the stack top request information when the audio request type is music;
and the identification detection module is used for detecting whether the first identification mark and the second identification mark are the same or not, returning a first judgment value when the first identification mark and the second identification mark are the same, and returning a second judgment value when the first identification mark and the second identification mark are different.
The type detection module further comprises a stack top information detection module, wherein the stack top information detection module is used for detecting whether the value of the stack top request information is empty, acquiring the audio request type stored in the stack top request information when the value of the stack top request information is not empty, and returning a second judgment value when the value of the stack top request information is empty.
In the embodiment of the invention, the keep-alive processing system of the music playing application can be embedded in at least one of a smart phone, a smart home appliance, a smart television and a smart vehicle-mounted system of an android platform.
In summary, the embodiment provides a keep-alive processing system for a music playing application under an android platform, by acquiring an audio playing process at the top of a stack of an audio focus stack, and keeping a state of continuous operation when a target music playing application is switched to a background mode according to the fact that a user name of the audio playing process is the same as a user name of the target music playing application at a background, the keep-alive processing system cannot be cleaned or suspended by a system, a keep-alive effect is better for the music playing application process requiring long-time connection, an application not required by a user can be more easily selected to be suspended, and power consumption is reduced.
Third embodiment
Fig. 1 is a schematic flow chart of a keep-alive processing method of a music playing application under an android platform according to this embodiment;
the present embodiment provides a storage medium, on which a computer program is stored,
when being executed by a processor, the program realizes the steps of the keep-alive processing method of the music playing application under the android platform.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware related to instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
Fourth embodiment
Fig. 1 is a schematic flow chart of a keep-alive processing method of a music playing application under an android platform according to this embodiment;
the embodiment provides an electronic device, including:
a memory having a computer program stored thereon; and
a processor for executing the computer program in the memory to implement the steps of the keep-alive processing method for the music playing application under the android platform in any one of the above contents.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
Although the embodiments of the present invention have been described above, the above description is only for the convenience of understanding the present invention, and is not intended to limit the present invention. It will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the invention as disclosed, and that the scope of the invention is not to be limited to the particular embodiments disclosed herein but is to be accorded the full scope of the claims.

Claims (10)

1. A keep-alive processing method for music playing application under an android platform is characterized by comprising the following steps:
acquiring a first identification mark of an application program;
acquiring audio focus stack information;
analyzing the audio focus stack information to obtain stack top request information of the audio focus stack information;
acquiring an audio request type stored in the stack top request information;
detecting whether the audio request type is music;
when the audio request type is music, acquiring a second identification mark of an application program corresponding to the stack top request information;
detecting whether the first identification mark and the second identification mark are the same;
and when the first identification mark is the same as the second identification mark, returning a first judgment value, and when the first identification mark is different from the second identification mark, returning a second judgment value.
2. The method of claim 1, wherein the step of obtaining the type of audio request stored in the top-of-stack request information comprises:
detecting whether the value of the stack top request information is empty;
when the value of the stack top request information is not empty, acquiring an audio request type stored in the stack top request information;
and when the value of the stack top request information is null, returning the second judgment value.
3. The method of claim 1, wherein the step of obtaining the type of audio request stored in the top-of-stack request information comprises:
acquiring attribute variables stored in the stack top request information;
and acquiring the audio request type corresponding to the attribute variable.
4. The method of claim 1, wherein the step of detecting whether the type of audio request is music further comprises:
and when the audio request type is not music, returning the second judgment value.
5. The method of any of claims 1 to 4, wherein the step of obtaining audio focus stack information comprises:
and acquiring all the audio focus stack information in the audio service.
6. The method of any one of claims 1 to 4, wherein the step of obtaining a first identifier of the application comprises:
and acquiring the first identification of at least one application program in the background.
7. A keep-alive processing system for a music playing application under an android platform, the system comprising:
the data acquisition module is used for acquiring a first identification mark of an application program, acquiring audio focus stack information, analyzing the audio focus stack information, acquiring stack top request information of the audio focus stack information, and acquiring an audio request type stored in the stack top request information;
the type detection module is used for detecting whether the audio request type is music or not, and when the audio request type is music, acquiring a second identification mark of the application program corresponding to the stack top request information;
and the identification detection module is used for detecting whether the first identification and the second identification are the same or not, returning a first judgment value when the first identification and the second identification are the same, and returning a second judgment value when the first identification and the second identification are different.
8. The method according to claim 7,
the type detection module further comprises a stack top information detection module, wherein the stack top information detection module is used for detecting whether the value of the stack top request information is empty, acquiring the audio request type stored in the stack top request information when the value of the stack top request information is not empty, and returning the second judgment value when the value of the stack top request information is empty.
9. A storage medium having a computer program stored thereon, wherein,
the program is executed by a processor to realize the steps of the keep-alive processing method of the music playing application under the android platform in any claim 1 to 6.
10. An electronic device, comprising:
a memory having a computer program stored thereon; and
a processor for executing the computer program in the memory to implement the steps of the keep-alive processing method for the music playing application under the android platform of any of claims 1 to 6.
CN202011035487.9A 2020-09-27 2020-09-27 Music playing application keep-alive processing method and system, storage medium and electronic equipment Active CN112162783B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011035487.9A CN112162783B (en) 2020-09-27 2020-09-27 Music playing application keep-alive processing method and system, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011035487.9A CN112162783B (en) 2020-09-27 2020-09-27 Music playing application keep-alive processing method and system, storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN112162783A true CN112162783A (en) 2021-01-01
CN112162783B CN112162783B (en) 2021-09-14

Family

ID=73861265

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011035487.9A Active CN112162783B (en) 2020-09-27 2020-09-27 Music playing application keep-alive processing method and system, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN112162783B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023071582A1 (en) * 2021-10-29 2023-05-04 荣耀终端有限公司 Application keep-alive method and electronic device

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080028094A1 (en) * 2006-07-31 2008-01-31 Widerthan Co., Ltd. Method and system for servicing bgm request and for providing sound source information
CN104239094A (en) * 2014-08-29 2014-12-24 小米科技有限责任公司 Method and device for controlling background application programs and terminal equipment
CN105335171A (en) * 2014-06-24 2016-02-17 北京奇虎科技有限公司 Method and device for long residence of application program in background of operating system
CN106157970A (en) * 2016-06-22 2016-11-23 努比亚技术有限公司 A kind of audio identification methods and terminal
CN106484461A (en) * 2016-09-13 2017-03-08 北京智能管家科技有限公司 Service keepalive method and device in intelligent terminal
US20170171518A1 (en) * 2015-12-15 2017-06-15 BOT Home Automation, Inc. Video on demand for audio/video recording and communication devices
CN109766178A (en) * 2019-01-16 2019-05-17 四川科瑞软件有限责任公司 A kind of application process keep-alive system and method under Android system
CN109992310A (en) * 2019-03-12 2019-07-09 中国平安财产保险股份有限公司 Application program keepalive method, device, computer equipment and storage medium
CN110687998A (en) * 2019-09-18 2020-01-14 华为技术有限公司 Application management method and device

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080028094A1 (en) * 2006-07-31 2008-01-31 Widerthan Co., Ltd. Method and system for servicing bgm request and for providing sound source information
CN105335171A (en) * 2014-06-24 2016-02-17 北京奇虎科技有限公司 Method and device for long residence of application program in background of operating system
CN104239094A (en) * 2014-08-29 2014-12-24 小米科技有限责任公司 Method and device for controlling background application programs and terminal equipment
US20170171518A1 (en) * 2015-12-15 2017-06-15 BOT Home Automation, Inc. Video on demand for audio/video recording and communication devices
CN106157970A (en) * 2016-06-22 2016-11-23 努比亚技术有限公司 A kind of audio identification methods and terminal
CN106484461A (en) * 2016-09-13 2017-03-08 北京智能管家科技有限公司 Service keepalive method and device in intelligent terminal
CN109766178A (en) * 2019-01-16 2019-05-17 四川科瑞软件有限责任公司 A kind of application process keep-alive system and method under Android system
CN109992310A (en) * 2019-03-12 2019-07-09 中国平安财产保险股份有限公司 Application program keepalive method, device, computer equipment and storage medium
CN110687998A (en) * 2019-09-18 2020-01-14 华为技术有限公司 Application management method and device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023071582A1 (en) * 2021-10-29 2023-05-04 荣耀终端有限公司 Application keep-alive method and electronic device

Also Published As

Publication number Publication date
CN112162783B (en) 2021-09-14

Similar Documents

Publication Publication Date Title
EP2907099B1 (en) Testing framework for applications
CN107423213B (en) File descriptor distribution detection method and device
CN110673964A (en) Audio playing control method and device of vehicle-mounted system
WO2014005328A1 (en) Method and device for allocating resource
CN104756080A (en) Augmenting capabilities of a host device
CN111341315B (en) Voice control method, device, computer equipment and storage medium
CN112162783B (en) Music playing application keep-alive processing method and system, storage medium and electronic equipment
CN110837391B (en) Application program hot updating method and device, storage medium and electronic equipment
WO2016070690A1 (en) Method, device and system for realizing communication between application and webpage on terminal device
CN108647102B (en) Service request processing method and device of heterogeneous system and electronic equipment
CN114138961A (en) Playing processing method of audio electronic book, computing equipment and computer storage medium
CN103677979A (en) Interactive method and device for application software and plugin
CN110121001B (en) Online song playing method and device and terminal
CN104717103A (en) Method and device for testing network device
CN104391742B (en) Optimizing application method and apparatus
CN109147783B (en) Voice recognition method, medium and system based on Karaoke system
CN111767558A (en) Data access monitoring method, device and system
CN103297516A (en) Multi-type providing method, multi-type providing system and multi-type providing device of applications
CN108241748B (en) Method, device, medium and equipment for acquiring live broadcast music name
CN105740009B (en) Version upgrading method and terminal device
CN115017062A (en) Method, system, device and medium for optimizing terminal memory
CN103618961A (en) Method, system and browser for displaying video title
CN110175040B (en) Data processing method, OTA client, electronic device and storage medium
US20110197202A1 (en) Handling Messages in a Computing Device
EP2768206B1 (en) Download management method and device based on android browser

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