WO2016095681A1 - 应用的后台运行方法及装置 - Google Patents

应用的后台运行方法及装置 Download PDF

Info

Publication number
WO2016095681A1
WO2016095681A1 PCT/CN2015/095601 CN2015095601W WO2016095681A1 WO 2016095681 A1 WO2016095681 A1 WO 2016095681A1 CN 2015095601 W CN2015095601 W CN 2015095601W WO 2016095681 A1 WO2016095681 A1 WO 2016095681A1
Authority
WO
WIPO (PCT)
Prior art keywords
application
background
function
running
background running
Prior art date
Application number
PCT/CN2015/095601
Other languages
English (en)
French (fr)
Inventor
艾忠元
Original Assignee
北京奇虎科技有限公司
奇智软件(北京)有限公司
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 北京奇虎科技有限公司, 奇智软件(北京)有限公司 filed Critical 北京奇虎科技有限公司
Publication of WO2016095681A1 publication Critical patent/WO2016095681A1/zh

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/445Program loading or initiating

Definitions

  • the present invention relates to the field of information technology, and in particular, to an application running method and apparatus in the background.
  • the application is allowed to run in unlimited backgrounds.
  • the following two schemes are adopted.
  • One is to apply for the unlimited background running permission of the application to the developer of the smart terminal. After obtaining the authorization of the developer, the corresponding application can realize the unlimited background running.
  • Another solution is to use the developer's enterprise version development account of the smart terminal for development and application signature. Applying a signature allows the app to run infinitely in the background.
  • the first solution mentioned above can obtain the legal authorization of the developer, the type of authorized application of the smart terminal developer is very small and very strict, and the authorization rate is extremely low. For example, Apple only has the VoIP and map application to pass. Other applications are almost impossible to pass.
  • the second scheme can make the application run infinitely in the background, the developer of the smart terminal stipulates that the enterprise version development account can only be published and used within the enterprise, and cannot be released to the entire network user. If the release is released only in the jailbreak channel, there is no guarantee that the app store will be available.
  • the present invention provides an application running method and device in the background, one of the main purposes is This allows more types of applications to run infinitely in the background while ensuring that applications can be released normally.
  • an application background running method including:
  • an application background running device including:
  • the startup unit is configured to: when the application is run in an operating system that restricts the infinite background running of the application, if the application is switched to run in the background, launching a function that allows unlimited background running, so that the application implements unlimited background running.
  • a program comprising readable code, when the readable code is run on a computing device, causing the computing device to perform an application background running method according to an embodiment of the present invention .
  • the technical solution provided by the embodiment of the present invention has at least the following advantages:
  • An embodiment of the present invention provides an application running method and device, which firstly sets a function that allows unlimited background running, and then when the application runs in an operating system that restricts an application running in an infinite background, if the application is Switching to background running starts the function that allows unlimited background running, enabling the application to run infinitely in the background.
  • the embodiment of the present invention allows the unlimited background by starting the application while running the application.
  • the running function can realize the infinite background running of the application, so that various types of applications can run in an infinite background, and can be put on the shelf in the application store.
  • FIG. 1 is a flowchart of an application background running method according to an embodiment of the present invention
  • FIG. 2 is a flowchart of another application background running method according to an embodiment of the present invention.
  • FIG. 3 is a schematic structural diagram of an application background running device according to an embodiment of the present invention.
  • FIG. 4 is a schematic structural diagram of another application background running device according to an embodiment of the present invention.
  • Figure 5 shows a block diagram of a computing device for performing an application background runtime method in accordance with the present invention
  • Figure 6 illustrates a storage unit for holding or carrying program code that implements an application background run method in accordance with the present invention.
  • An embodiment of the present invention provides an application running method, as shown in FIG. 1 , the method includes:
  • Step 101 Set a function in the application that allows unlimited background running.
  • the application infinite background running means that the application runs in the background without the limitation of the operating system time.
  • Features that allow unlimited background operations can include music playback, navigation, VoIP, and more.
  • each type of application having a music playing function, or a navigation function, or a network telephone function has a higher authorization rate through the smart terminal operating system developer, for example, has a music playing function, or a navigation function, or The application of the VoIP function is approved by Apple, and the application rate of the above functions can be guaranteed. Publish normally with the store.
  • Step 102 When the application is running in an operating system that restricts an application running in an infinite background, if the application is switched to run in the background, a function of allowing unlimited background running is started, so that the application implements unlimited background running.
  • the operating system may be an iOS system, an Android system, or the like of the Apple, which is not limited by the embodiment of the present invention.
  • the ios system has strict restrictions on the types of applications that can be run in an infinite background. For example, only the VoIP and map applications can pass the audit, resulting in fewer types of applications that can perform normal unlimited background operations. The ability to allow unlimited background runs allows more categories of applications to run in normal infinite backgrounds.
  • the user can instruct the terminal to switch the application to the background by clicking or touching the HOME key (primary key).
  • the application of the infinite background running may include: the application can normally perform file reading and writing, network communication, and computing operations in the background.
  • An application running method in the embodiment of the present invention firstly sets a function that allows unlimited background running in an application, and then when the application is run in an operating system that restricts an application running in an infinite background, if the application is switched to Running in the background, it starts the function of allowing unlimited background running, so that the application can run infinite background.
  • the embodiment of the present invention allows the unlimited background by starting the application while running the application.
  • the running function can realize the infinite background running of the application, so that various types of applications can run in an infinite background, and can be put on the shelf in the application store.
  • an embodiment of the present invention provides another application background running method, where the method includes:
  • Step 201 Set a function in the application that allows unlimited background running.
  • the application infinite background running means that the application runs in the background without the limitation of the operating system time.
  • Features that allow unlimited background operations can include music playback, navigation, VoIP, and more.
  • each type of application having a music playing function, or a navigation function, or a network telephone function has a higher authorization rate through the smart terminal operating system developer, for example, has a music playing function, or a navigation function, or The application of the VoIP function is approved by Apple, and the application rate of the above functions can be guaranteed. Publish normally with the store.
  • Step 202 When the application is running in an operating system that restricts an application running in an infinite background, if the application is switched to run in the background, a function that allows unlimited background running is started.
  • the step 202 may specifically include: starting a function that allows unlimited background running while the application is switched to run in the background; or starting within a preset time after the application is switched to the background operation
  • the preset time may be 1s, 3s, 5s, etc., which is not limited in the embodiment of the present invention.
  • detecting whether the application is triggered to run in an operating system that restricts the application to run in an infinite background may include: detecting an icon display area corresponding to the application on the operation interface of the smart terminal, whether there is a click or a touch operation When there is a click or a touch operation, it is confirmed that the application is triggered to run.
  • the step of capturing the application being switched to the background may be specifically: when there is a user clicking or tapping the Home key operation, the application cuts into the background running state, and at this time, the callback function applicationDidEnterBackgound is triggered, that is, the application is cut. Background events.
  • the function of starting the infinite background running may specifically include: starting the function of allowing the infinite background to run after detecting that the callback function applicationDidEnterBackgound callback is completed.
  • the foreground operation of the application is executed, and the function of allowing unlimited background running is stopped. For example, when there is a user double-clicking the Home key operation, the application is triggered to perform the foreground operation again, indicating that the application does not need to perform background running at this time, and the function of stopping the unlimited background running can be stopped, thereby reducing the overhead and power consumption of the smart terminal. .
  • executing the foreground operation of the application may be: when there is a user double-clicking the Home key operation, the callback function applicationWillEnterForeground is triggered, that is, the application cutting foreground event is captured, and the foreground operation of the application is executed. .
  • the background event may be specifically: the callback function applicationDidEnterBackgound is triggered again, that is, the application cut background event is captured at this time, and the infinite background running of the corresponding application is implemented by allowing the infinite background running function.
  • the method may further include: detecting whether the application has started the application background unlimited running mode. If the application has started the application background unlimited running mode, then start the function that allows unlimited background running. For the embodiment of the present invention, by detecting whether the installed application has started the application background infinite running mode, the application can be prevented from performing unnecessary infinite background operations and reducing power consumption. For example, an application with an automatic backup photo function, if the user does not turn on the function of automatically backing up photos, that is, the application background unlimited running mode is not started, and then the application infinite background running may cause unnecessary power consumption.
  • Step 203 Perform the function that allows the infinite background operation to perform an operation that has no effect on the output device, so that the application implements an infinite background operation.
  • the performing the function of allowing the infinite background running function to perform the function of the output device may include: causing the music playing function to cyclically play the music file whose volume is 0; or causing the navigation function to play the navigation volume of 0. Voice file; or enable the network phone function to connect to a network communication address without data output.
  • the music file with the volume of 0 is played by the music playing function, or the navigation voice file with the navigation function playing volume 0 enables the network telephone function to be connected to the network communication address without data output, and the audio data is not output.
  • the operation interface is displayed, so that the application can be run in an infinite background without affecting the normal operation of the foreground application.
  • the format of the music file in the embodiment of the present invention may be the raw original format. Since the raw original format is an audio format that has not been compressed and encoded, the music file of the format does not need to be decoded during playback, thereby avoiding unnecessary system overhead for decoding the audio file, thereby reducing power consumption. .
  • Step 204 When the infinite background running of the application needs to be released, stopping the function of allowing unlimited background running.
  • the situation in which the infinite background operation of the application needs to be released may include: the application is triggered to run in the foreground, or the application is triggered to be transferred to the suspended state, etc., wherein, when the application is After being suspended, the application's process exists, but all foreground and background functions of the app are suspended.
  • the application When it is necessary to release the infinite background running of the application, it indicates that the application does not have a background running requirement at this time, and by stopping the function of allowing the unlimited background running, the consumption of the smart terminal system and the power consumption can be reduced.
  • Another application background running method provided by the embodiment of the present invention firstly sets a function that allows unlimited background running in an application, and then when the application is run in an operating system that restricts an application running in an infinite background, if the application is switched When running in the background, the function of allowing unlimited background running is started, so that the application realizes unlimited background running.
  • the embodiment of the present invention allows the unlimited background by starting the application while running the application.
  • the running function can realize the infinite background running of the application, so that various types of applications can run in an infinite background, and can be put on the shelf in the application store.
  • the embodiment of the present invention provides an application background running device.
  • the device may include: a setting unit 31 and a starting unit 32.
  • the setting unit 31 is configured to set a function in the application that allows unlimited background running.
  • the initiating unit 32 is configured to: when the application is run in an operating system that restricts an application running in an infinite background, if the application is switched to run in the background, start a function that allows unlimited background running, so that the application implements unlimited background running .
  • An application running background device provided by an embodiment of the present invention first sets an allowable setting in an application.
  • the function of running in the background and then when the application is running in an operating system that restricts the running of the application infinite background, if the application is switched to run in the background, the function of allowing unlimited background running is started, so that the application realizes unlimited background run.
  • the embodiment of the present invention allows the unlimited background by starting the application while running the application.
  • the running function can realize the infinite background running of the application, so that various types of applications can run in an infinite background, and can be put on the shelf in the application store.
  • the embodiment of the present invention provides another application background running device.
  • the device may include: a setting unit 41, a starting unit 42, and an executing unit 43. , stop unit 44.
  • the setting unit 41 is configured to set a function in the application that allows unlimited background running.
  • the initiating unit 42 is configured to: when the application is run in an operating system that restricts the infinite background running of the application, if the application is switched to run in the background, start a function that allows unlimited background running, so that the application implements unlimited background running .
  • the executing unit 43 is configured to enable the function that allows the infinite background operation to perform an operation that has no effect on the output device.
  • the functions of the infinite background running in the embodiment of the present invention include at least: a music playing function, a navigation function, and a network telephone function.
  • the executing unit 43 is specifically configured to: cause the music playing function to cyclically play a music file whose volume is 0; or enable the navigation function to play a navigation voice file whose volume is 0; or enable the network telephone function to be connected to a network without data output. mailing address.
  • the starting unit 42 is specifically configured to start a function that allows unlimited background running while the application is switched to run in the background; or start within a preset time after the application is switched to the background operation. A feature that allows unlimited background runs.
  • the stopping unit 44 is configured to stop the function of allowing unlimited background running when the infinite background running of the application needs to be released.
  • the operating system that restricts the application to run in an infinite background is an ios system.
  • the format of the music file is the raw original format.
  • Another application background running apparatus provided by the embodiment of the present invention firstly sets a function that allows unlimited background running in an application, and then when the application is run in an operating system that restricts an application running in an infinite background, if the application is switched When running in the background, the function of allowing unlimited background running is started, so that the application realizes unlimited background running.
  • the embodiment of the present invention allows the unlimited background by starting the application while running the application.
  • the running function can realize the infinite background running of the application, so that various types of applications can run in an infinite background, and can be put on the shelf in the application store.
  • the description is relatively simple, and the relevant parts can be referred to the description of the method embodiment.
  • modules in the devices of the embodiments can be adaptively changed and placed in one or more devices different from the embodiment.
  • the modules or units or components of the embodiments may be combined into one module or unit or component, and further they may be divided into a plurality of sub-modules or sub-units or sub-components.
  • any combination of the features disclosed in the specification, including the accompanying claims, the abstract and the drawings, and any methods so disclosed, or All processes or units of the device are combined.
  • Each feature disclosed in this specification (including the accompanying claims, the abstract and the drawings) may be replaced by alternative features that provide the same, equivalent or similar purpose.
  • the various component embodiments of the present invention may be implemented in hardware, or in a software module running on one or more processors, or in a combination thereof.
  • a microprocessor or digital signal processor may be used in practice to implement some or all of some or all of the components of the background operation method and apparatus of the application in accordance with embodiments of the present invention.
  • the invention can also be implemented as a device or device program (e.g., a computer program and a computer program product) for performing some or all of the methods described herein.
  • a program implementing the invention may be stored on a computer readable medium or may be in the form of one or more signals.
  • Such signals may be downloaded from an Internet website, provided on a carrier signal, or provided in any other form.
  • Figure 5 illustrates a computing device that can implement an application background run method in accordance with the present invention.
  • the computing device conventionally includes a processor 510 and a program product or readable medium in the form of a memory 520.
  • Memory 520 can be an electronic memory such as a flash memory, EEPROM (Electrically Erasable Programmable Read Only Memory), EPROM, or ROM.
  • the memory 520 has a method for performing the above
  • storage space 530 for program code may include various program code 531 for implementing various steps in the above methods, respectively.
  • These program codes can be read from or written to one or more program products.
  • These program products include program code carriers such as memory cards.
  • Such a program product is typically a portable or fixed storage unit as described with reference to FIG.
  • the storage unit may have storage segments, storage spaces, and the like that are similarly arranged to memory 520 in the computing device of FIG.
  • the program code can be compressed, for example, in an appropriate form.
  • the storage unit includes readable code 531', ie, code that can be read by a processor, such as 510, that when executed by a computing device causes the computing device to perform various steps in the methods described above .

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Telephone Function (AREA)

Abstract

本发明实施例公开了一种应用后台运行的方法及装置,涉及信息技术领域,能够使得更多类型的应用可以进行无限后台运行,同时能够保证应用可以正常发布。所述方法包括:首先将应用中设置允许无限后台运行的功能,然后当所述应用在限制应用无限后台运行的操作系统中运行时,如果所述应用被切换至后台运行,则启动允许无限后台运行的功能,使所述应用实现无限后台运行。本发明适用于应用的无限后台运行。

Description

应用的后台运行方法及装置 技术领域
本发明涉及信息技术领域,特别是涉及一种应用后台运行方法及装置。
背景技术
随着信息技术的不断发展,越来越多样的终端设备随之出现,如智能移动设备。同时为了实现终端设备功能的多样化,许多的应用也营运而生。应用在终端设备的系统中总共有4个状态:Not Running(未启动)、Foreground(前台运行)、Background(后台运行)、Suspended(后台挂起)。有些智能终端系统对应用的Background状态有着严格的控制,允许短时间的Background状态。然而,很多应用都有处于无限后台运行状态的需求,比如自动备份通信录,自动备份照片这种应用;如果不能无限后台运行,那么用户修改完通信录或拍完照片后,必须打开一下应用,才可以执行自动备份。
目前让应用无限后台运行一般采用如下的两种方案。一种是向智能终端的开发商申请应用的无限后台运行权限,获得开发商的授权后,对应的应用就可以实现无限后台运行。另一种方案是使用智能终端的开发商的企业版开发账号进行开发,并进行应用签名。应用签名后就可以使应用能够无限后台运行。
上述第一种方案,虽然能够得到开发商合法的授权,但是智能终端的开发商授权应用的类型很少并且非常严格,授权率极低,如苹果公司只有网络电话和地图类应用才可以通过,其他应用几乎不可能通过。第二种方案虽然可以让应用无限后台运行,但智能终端的开发商规定企业版开发账户只能在企业内部发布使用,不能向全网用户发布。若向外发布只能在越狱渠道发布,无法保证在应用商店正常上架。
发明内容
有鉴于此,本发明提供一种应用后台运行方法及装置,主要目的之一在 于使得更多类型的应用可以进行无限后台运行,同时能够保证应用可以正常发布。
依据本发明一个方面,提供了一种应用后台运行方法,包括:
将应用中设置允许无限后台运行的功能;
当所述应用在限制应用无限后台运行的操作系统中运行时,如果所述应用被切换至后台运行,则启动允许无限后台运行的功能,使所述应用实现无限后台运行。
依据本发明另一个方面,还提供了一种应用后台运行装置,包括:
设置单元,用于将应用中设置允许无限后台运行的功能;
启动单元,用于当所述应用在限制应用无限后台运行的操作系统中运行时,如果所述应用被切换至后台运行,则启动允许无限后台运行的功能,使所述应用实现无限后台运行。
依据本发明另一个方面,还提供了一种程序,包括可读代码,当所述可读代码在计算设备上运行时,导致所述计算设备执行根据本发明实施例所述的应用后台运行方法。
依据本发明另一个方面,还提供了一种可读介质,其中存储了如本发明实施例所述的程序。
借由上述技术方案,本发明实施例提供的技术方案至少具有下列优点:
本发明实施例提供了一种应用后台运行方法及装置,首先将应用中设置允许无限后台运行的功能,然后当所述应用在限制应用无限后台运行的操作系统中运行时,如果所述应用被切换至后台运行,则启动允许无限后台运行的功能,使所述应用实现无限后台运行。与目前向智能终端的开发商申请应用的无限后台运行权限或者使用智能终端的开发商的企业版开发账号进行应用开发相比,本发明实施例通过运行某一个应用的同时,通过启动允许无限后台运行的功能,可以实现该应用进行无限后台运行,从而使得各种类型应用均可以进行无限后台运行,同时可以在应用商店正常上架。
上述说明仅是本发明技术方案的概述,为了能够更清楚了解本发明的技术手段,而可依照说明书的内容予以实施,并且为了让本发明的上述和其它 目的、特征和优点能够更明显易懂,以下特举本发明的具体实施方式。
附图说明
通过阅读下文优选实施方式的详细描述,各种其他的优点和益处对于本领域普通技术人员将变得清楚明了。附图仅用于示出优选实施方式的目的,而并不认为是对本发明的限制。而且在整个附图中,用相同的参考符号表示相同的部件。在附图中:
图1示出了本发明实施例提供的一种应用后台运行方法流程图;
图2示出了本发明实施例提供的另一种应用后台运行方法流程图;
图3示出了本发明实施例提供的一种应用后台运行装置结构示意图;
图4示出了本发明实施例提供的另一种应用后台运行装置结构示意图;
图5示出了用于执行根据本发明的应用后台运行方法的计算设备的框图;
图6示出了用于保持或者携带实现根据本发明的应用后台运行方法的程序代码的存储单元。
具体实施方式
下面将参照附图更详细地描述本公开的示例性实施例。虽然附图中显示了本公开的示例性实施例,然而应当理解,可以以各种形式实现本公开而不应被这里阐述的实施例所限制。相反,提供这些实施例是为了能够更透彻地理解本公开,并且能够将本公开的范围完整的传达给本领域的技术人员。
本发明实施例提供一种应用后台运行方法,如图1所示,所述方法包括:
步骤101、将应用中设置允许无限后台运行的功能。
其中,应用无限后台运行是指应用不受操作系统时间限制地在后台运行。允许无限后台运行的功能可以包括音乐播放功能、导航功能、网络电话功能等。对于本发明实施例,由于具有音乐播放功能、或者导航功能、或者网络电话功能的各类别应用通过智能终端操作系统开发商审核的授权率较高,例如,具有音乐播放功能、或者导航功能、或者网络电话功能的应用通过苹果公司审核的授权率较高,从而可以保证具有上述功能的应用可以在应 用商店正常发布。
步骤102、当所述应用在限制应用无限后台运行的操作系统中运行时,如果所述应用被切换至后台运行,则启动允许无限后台运行的功能,使所述应用实现无限后台运行。
其中,操作系统可以为苹果的ios系统、安卓系统等,本发明实施例不做限定。ios系统对能够进行无限后台运行的应用类型有比较严格的限制,例如,只有网络电话和地图类应用能够通过审核,从而造成能够进行正常无限后台运行的应用种类较少,本发明实施例通过启动允许无限后台运行的功能,可以使得更多类别的应用能够进行正常无限后台运行。
对于本发明实施例,用户可以通过点击或者触击HOME键(主键、),以指示终端将应用切换到后台运行。应用无限后台运行具体可以包括:应用可以在后台正常进行文件的读写、网络通信、运算等操作。
本发明实施例提供的一种应用后台运行方法,首先将应用中设置允许无限后台运行的功能,然后当所述应用在限制应用无限后台运行的操作系统中运行时,如果所述应用被切换至后台运行,则启动允许无限后台运行的功能,使所述应用实现无限后台运行。与目前向智能终端的开发商申请应用的无限后台运行权限或者使用智能终端的开发商的企业版开发账号进行应用开发相比,本发明实施例通过运行某一个应用的同时,通过启动允许无限后台运行的功能,可以实现该应用进行无限后台运行,从而使得各种类型应用均可以进行无限后台运行,同时可以在应用商店正常上架。
进一步地,本发明实施例提供另一种应用后台运行方法,所述方法包括:
步骤201、将应用中设置允许无限后台运行的功能。
其中,应用无限后台运行是指应用不受操作系统时间限制地在后台运行。允许无限后台运行的功能可以包括音乐播放功能、导航功能、网络电话功能等。对于本发明实施例,由于具有音乐播放功能、或者导航功能、或者网络电话功能的各类别应用通过智能终端操作系统开发商审核的授权率较高,例如,具有音乐播放功能、或者导航功能、或者网络电话功能的应用通过苹果公司审核的授权率较高,从而可以保证具有上述功能的应用可以在应 用商店正常发布。
步骤202、当所述应用在限制应用无限后台运行的操作系统中运行时,如果所述应用被切换至后台运行,则启动允许无限后台运行的功能。
对于本发明实施例,步骤202具体可以包括:在所述应用被切换至后台运行的同时,启动允许无限后台运行的功能;或者在所述应用被切换至后台运行后的预置时间内,启动允许无限后台运行的功能。其中,预置时间可以为1s、3s、5s等,本发明实施例不做限定。通过在所述应用被切换至后台运行的同时,或者在所述应用被切换至后台运行后的预置时间内,启动允许无限后台运行的功能,可以防止操作系统关闭应用的后台运行,保证应用无限后台运行。
对于本发明实施例,检测是否存在触发所述应用在限制应用无限后台运行的操作系统中运行具体可以包括:检测在智能终端操作界面上该应用对应的图标显示区域,是否存在点击或者触击操作,当存在点击或者触击操作,则确认该应用被触发运行。捕获所述应用被切换到后台的步骤具体可以为:当存在用户点击或者触击Home键操作时,所述应用切入后台运行状态,此时,回调函数applicationDidEnterBackgound被触发,即捕获到所述应用切后台事件。所述启动允许无限后台运行的功能具体可以包括:当检测所述回调函数applicationDidEnterBackgound回调完成后,启动允许无限后台运行的功能。
进一步地,当所述应用被触发前台运行时,执行所述应用的前台运行后,并停止允许无限后台运行的功能。例如,当存在用户双击Home键操作时,触发所述应用再次进行前台运行,说明此时应用不需要再进行后台运行,通过停止允许无限后台运行的功能,能够减少智能终端系统开销和电量的消耗。其中,应用被触发前台运行时,执行所述应用的前台运行具体可以为:当存在用户双击Home键操作时,回调函数applicationWillEnterForeground被触发,即捕获到应用切前台事件,执行所述应用的前台运行。
进一步地,当再次捕获到所述应用切后台事件时,再次启动允许无限后台运行的功能,实现所述应用的无限后台运行。所述再次捕获到所述应用切 后台事件具体可以为:回调函数applicationDidEnterBackgound再次被触发,即此时捕获到所述应用切后台事件,通过允许无限后台运行的功能,实现所述对应应用的无限后台运行。
可选地,启动允许无限后台运行的功能之前还可以包括:检测应用是否已经启动应用后台无限运行模式。若应用已经启动应用后台无限运行模式,再启动允许无限后台运行的功能。对于本发明实施例,通过检测安装的应用是否已经启动应用后台无限运行模式,可以避免应用进行不必要的无限后台运行,减少电量消耗。例如,具有自动备份照片功能的应用,如果用户未开启自动备份照片的功能,即未启动应用后台无限运行模式,此时,再进行应用无限后台运行会造成不必要的电量消耗。
步骤203、使所述允许无限后台运行的功能执行对输出设备无影响的操作,使所述应用实现无限后台运行。
对于本发明实施例,使所述允许无限后台运行的功能执行对输出设备无影响的操作具体可以包括:使音乐播放功能循环播放音量为0的音乐文件;或者使导航功能播放音量为0的导航语音文件;或者使网络电话功能接通没有数据输出的网络通讯地址。可以看出,通过音乐播放功能循环播放音量为0的音乐文件,或者使导航功能播放音量为0的导航语音文件使网络电话功能接通没有数据输出的网络通讯地址,不会进行音频数据的输出或者操作界面展现,从而在保证应用可以进行无限后台运行的同时,不会影响前台应用的正常运行,
需要说明的是,本发明实施例中音乐文件的格式可以为raw原始格式。由于raw原始格式是没有经过压缩和编码处理过的音频格式,该格式的音乐文件在播放的时候无需经过解码操作,从而能够避免对音频文件进行解码操作引入不必要的系统开销,进而减少电量消耗。
步骤204、当需要解除所述应用的无限后台运行时,停止所述允许无限后台运行的功能。
对于本发明实施例,需要解除所述应用的无限后台运行的情况可以包括:应用被触发前台运行,或者应用被触发转入挂起状态等,其中,当应用 被挂起后,该应用的进程存在,但是应用的所有前台和后台功能被暂停。当需要解除所述应用的无限后台运行时,说明此时应用没有后台运行需求,通过停止所述允许无限后台运行的功能,从而能够减少智能终端系统开销和电量的消耗。
本发明实施例提供的另一种应用后台运行方法,首先将应用中设置允许无限后台运行的功能,然后当所述应用在限制应用无限后台运行的操作系统中运行时,如果所述应用被切换至后台运行,则启动允许无限后台运行的功能,使所述应用实现无限后台运行。与目前向智能终端的开发商申请应用的无限后台运行权限或者使用智能终端的开发商的企业版开发账号进行应用开发相比,本发明实施例通过运行某一个应用的同时,通过启动允许无限后台运行的功能,可以实现该应用进行无限后台运行,从而使得各种类型应用均可以进行无限后台运行,同时可以在应用商店正常上架。
对于方法实施例,为了简单描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本发明实施例并不受所描述的动作顺序的限制,因为依据本发明实施例,某些步骤可以采用其他顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作并不一定是本发明实施例所必须的。
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其他实施例的相关描述。
进一步地,作为图1所示方法的具体实现,本发明实施例提供一种应用后台运行装置,如图3所示,所述装置可以包括:设置单元31、启动单元32。
设置单元31,用于将应用中设置允许无限后台运行的功能。
启动单元32,用于当所述应用在限制应用无限后台运行的操作系统中运行时,如果所述应用被切换至后台运行,则启动允许无限后台运行的功能,使所述应用实现无限后台运行。
需要说明的是,本发明实施例提供的应用后台运行装置所涉及各功能单元的其他相应描述,可以参考图1所示方法的对应描述,在此不再赘述。
本发明实施例提供的一种应用后台运行装置,首先将应用中设置允许无 限后台运行的功能,然后当所述应用在限制应用无限后台运行的操作系统中运行时,如果所述应用被切换至后台运行,则启动允许无限后台运行的功能,使所述应用实现无限后台运行。与目前向智能终端的开发商申请应用的无限后台运行权限或者使用智能终端的开发商的企业版开发账号进行应用开发相比,本发明实施例通过运行某一个应用的同时,通过启动允许无限后台运行的功能,可以实现该应用进行无限后台运行,从而使得各种类型应用均可以进行无限后台运行,同时可以在应用商店正常上架。
再进一步地,作为图2所示方法的具体实现,本发明实施例提供另一种应用后台运行装置,如图4所示,所述装置可以包括:设置单元41、启动单元42、执行单元43,停止单元44。
设置单元41,用于将应用中设置允许无限后台运行的功能。
启动单元42,用于当所述应用在限制应用无限后台运行的操作系统中运行时,如果所述应用被切换至后台运行,则启动允许无限后台运行的功能,使所述应用实现无限后台运行。
所述执行单元43,用于使所述允许无限后台运行的功能执行对输出设备无影响的操作。
需要说明的是,本发明实施例中允许无限后台运行的功能至少包括:音乐播放功能、导航功能、网络电话功能。
进一步地,所述执行单元43,具体用于使音乐播放功能循环播放音量为0的音乐文件;或者使导航功能播放音量为0的导航语音文件;或者使网络电话功能接通没有数据输出的网络通讯地址。
进一步地,所述启动单元42,具体用于在所述应用被切换至后台运行的同时,启动允许无限后台运行的功能;或者在所述应用被切换至后台运行后的预置时间内,启动允许无限后台运行的功能。
所述停止单元44,用于当需要解除所述应用的无限后台运行时,停止所述允许无限后台运行的功能。
在本发明实施例中,所述限制应用无限后台运行的操作系统为ios系统。所述音乐文件的格式为raw原始格式。
需要说明的是,本发明实施例提供的应用后台运行装置所涉及各功能单元的其他相应描述,可以参考图2所示方法的对应描述,在此不再赘述。
本发明实施例提供的另一种应用后台运行装置,首先将应用中设置允许无限后台运行的功能,然后当所述应用在限制应用无限后台运行的操作系统中运行时,如果所述应用被切换至后台运行,则启动允许无限后台运行的功能,使所述应用实现无限后台运行。与目前向智能终端的开发商申请应用的无限后台运行权限或者使用智能终端的开发商的企业版开发账号进行应用开发相比,本发明实施例通过运行某一个应用的同时,通过启动允许无限后台运行的功能,可以实现该应用进行无限后台运行,从而使得各种类型应用均可以进行无限后台运行,同时可以在应用商店正常上架。
可以理解的是,上述方法及装置中的相关特征可以相互参考。
对于装置实施例而言,由于其与方法实施例基本相似,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。
在此提供的算法和显示不与任何特定计算机、虚拟系统或者其它设备固有相关。各种通用系统也可以与基于在此的示教一起使用。根据上面的描述,构造这类系统所要求的结构是显而易见的。此外,本发明也不针对任何特定编程语言。应当明白,可以利用各种编程语言实现在此描述的本发明的内容,并且上面对特定语言所做的描述是为了披露本发明的最佳实施方式。
在此处所提供的说明书中,说明了大量具体细节。然而,能够理解,本发明的实施例可以在没有这些具体细节的情况下实践。在一些实例中,并未详细示出公知的方法、结构和技术,以便不模糊对本说明书的理解。
类似地,应当理解,为了精简本公开并帮助理解各个发明方面中的一个或多个,在上面对本发明的示例性实施例的描述中,本发明的各个特征有时被一起分组到单个实施例、图、或者对其的描述中。然而,并不应将该公开的方法解释成反映如下意图:即所要求保护的本发明要求比在每个权利要求中所明确记载的特征更多的特征。更确切地说,如下面的权利要求书所反映的那样,发明方面在于少于前面公开的单个实施例的所有特征。因此,遵循具体实施方式的权利要求书由此明确地并入该具体实施方式,其中每个权利 要求本身都作为本发明的单独实施例。
本领域那些技术人员可以理解,可以对实施例中的设备中的模块进行自适应性地改变并且把它们设置在与该实施例不同的一个或多个设备中。可以把实施例中的模块或单元或组件组合成一个模块或单元或组件,以及此外可以把它们分成多个子模块或子单元或子组件。除了这样的特征和/或过程或者单元中的至少一些是相互排斥之外,可以采用任何组合对本说明书(包括伴随的权利要求、摘要和附图)中公开的所有特征以及如此公开的任何方法或者设备的所有过程或单元进行组合。除非另外明确陈述,本说明书(包括伴随的权利要求、摘要和附图)中公开的每个特征可以由提供相同、等同或相似目的的替代特征来代替。
此外,本领域的技术人员能够理解,尽管在此所述的一些实施例包括其它实施例中所包括的某些特征而不是其它特征,但是不同实施例的特征的组合意味着处于本发明的范围之内并且形成不同的实施例。例如,在下面的权利要求书中,所要求保护的实施例的任意之一都可以以任意的组合方式来使用。
本发明的各个部件实施例可以以硬件实现,或者以在一个或者多个处理器上运行的软件模块实现,或者以它们的组合实现。本领域的技术人员应当理解,可以在实践中使用微处理器或者数字信号处理器(DSP)来实现根据本发明实施例的应用的后台运行方法及装置设备中的一些或者全部部件的一些或者全部功能。本发明还可以实现为用于执行这里所描述的方法的一部分或者全部的设备或者装置程序(例如,计算机程序和计算机程序产品)。这样的实现本发明的程序可以存储在计算机可读介质上,或者可以具有一个或者多个信号的形式。这样的信号可以从因特网网站上下载得到,或者在载体信号上提供,或者以任何其他形式提供。
例如,图5示出了可以实现根据本发明的应用后台运行方法的计算设备。该计算设备传统上包括处理器510和以存储器520形式的程序产品或者可读介质。存储器520可以是诸如闪存、EEPROM(电可擦除可编程只读存储器)、EPROM或者ROM之类的电子存储器。存储器520具有用于执行上述方法 中的任何方法步骤的程序代码531的存储空间530。例如,用于程序代码的存储空间530可以包括分别用于实现上面的方法中的各种步骤的各个程序代码531。这些程序代码可以从一个或者多个程序产品中读出或者写入到这一个或者多个程序产品中。这些程序产品包括诸如存储卡之类的程序代码载体。这样的程序产品通常为如参考图6所述的便携式或者固定存储单元。该存储单元可以具有与图5的计算设备中的存储器520类似布置的存储段、存储空间等。程序代码可以例如以适当形式进行压缩。通常,存储单元包括可读代码531’,即可以由例如诸如510之类的处理器读取的代码,这些代码当由计算设备运行时,导致该计算设备执行上面所描述的方法中的各个步骤。
应该注意的是上述实施例对本发明进行说明而不是对本发明进行限制,并且本领域技术人员在不脱离所附权利要求的范围的情况下可设计出替换实施例。在权利要求中,不应将位于括号之间的任何参考符号构造成对权利要求的限制。单词“包含”不排除存在未列在权利要求中的元件或步骤。位于元件之前的单词“一”或“一个”不排除存在多个这样的元件。本发明可以借助于包括有若干不同元件的硬件以及借助于适当编程的计算机来实现。在列举了若干装置的单元权利要求中,这些装置中的若干个可以是通过同一个硬件项来具体体现。单词第一、第二、以及第三等的使用不表示任何顺序。可将这些单词解释为名称。

Claims (18)

  1. 一种应用后台运行方法,其特征在于,包括:
    将应用中设置允许无限后台运行的功能;
    当所述应用在限制应用无限后台运行的操作系统中运行时,如果所述应用被切换至后台运行,则启动允许无限后台运行的功能,使所述应用实现无限后台运行。
  2. 根据权利要求1所述的应用后台运行方法,其特征在于,所述启动允许无限后台运行的功能之后,还包括:
    使所述允许无限后台运行的功能执行对输出设备无影响的操作。
  3. 根据权利要求1或2所述的应用后台运行方法,其特征在于,所述允许无限后台运行的功能至少包括:音乐播放功能、导航功能、网络电话功能。
  4. 根据权利要求3所述的应用后台运行方法,其特征在于,所述使所述允许无限后台运行的功能执行对输出设备无影响的操作包括:
    使音乐播放功能循环播放音量为0的音乐文件;或者
    使导航功能播放音量为0的导航语音文件;或者
    使网络电话功能接通没有数据输出的网络通讯地址。
  5. 根据权利要求1所述的应用后台运行方法,其特征在于,所述应用被切换至后台运行,则启动允许无限后台运行的功能包括:
    在所述应用被切换至后台运行的同时,启动允许无限后台运行的功能;或者
    在所述应用被切换至后台运行后的预置时间内,启动允许无限后台运行的功能。
  6. 根据权利要求1所述的应用后台运行方法,其特征在于,所述方法还包括:
    当需要解除所述应用的无限后台运行时,停止所述允许无限后台运行的功能。
  7. 根据权利要求1-6任一项所述的应用后台运行方法,其特征在于,所述限制应用无限后台运行的操作系统为ios系统。
  8. 根据权利要求1-7任一项所述的方法,其特征在于,所述音乐文件的格式为raw原始格式。
  9. 一种应用后台运行装置,其特征在于,包括:
    设置单元,用于将应用中设置允许无限后台运行的功能;
    启动单元,用于当所述应用在限制应用无限后台运行的操作系统中运行时,如果所述应用被切换至后台运行,则启动允许无限后台运行的功能,使所述应用实现无限后台运行。
  10. 根据权利要求9所述的应用后台运行装置,其特征在于,所述装置还包括:
    执行单元,用于使所述允许无限后台运行的功能执行对输出设备无影响的操作。
  11. 根据权利要求9或10所述的应用后台运行装置,其特征在于,所述允许无限后台运行的功能至少包括:音乐播放功能、导航功能、网络电话功能。
  12. 根据权利要求11所述的应用后台运行装置,其特征在于,
    所述执行单元,具体用于使音乐播放功能循环播放音量为0的音乐文件;或者使导航功能播放音量为0的导航语音文件;或者使网络电话功能接通没有数据输出的网络通讯地址。
  13. 根据权利要求9所述的应用后台运行装置,其特征在于,
    所述启动单元,具体用于在所述应用被切换至后台运行的同时,启动允许无限后台运行的功能;或者在所述应用被切换至后台运行后的预置时间内,启动允许无限后台运行的功能。
  14. 根据权利要求9所述的应用后台运行装置,其特征在于,所述装置还包括:
    停止单元,用于当需要解除所述应用的无限后台运行时,停止所述允许无限后台运行的功能。
  15. 根据权利要求9-14任一项所述的应用后台运行装置,其特征在于,所述限制应用无限后台运行的操作系统为ios系统。
  16. 根据权利要求9-15任一项所述的应用后台运行装置,其特征在于,所述音乐文件的格式为raw原始格式。
  17. 一种程序,包括可读代码,当所述可读代码在计算设备上运行时,导致所述计算设备执行根据权利要求1-8中的任一个所述的应用后台运行方法。
  18. 一种可读介质,其中存储了如权利要求17所述的程序。
PCT/CN2015/095601 2014-12-19 2015-11-26 应用的后台运行方法及装置 WO2016095681A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201410805363.2A CN105760185A (zh) 2014-12-19 2014-12-19 应用的后台运行方法及装置
CN201410805363.2 2014-12-19

Publications (1)

Publication Number Publication Date
WO2016095681A1 true WO2016095681A1 (zh) 2016-06-23

Family

ID=56125873

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/095601 WO2016095681A1 (zh) 2014-12-19 2015-11-26 应用的后台运行方法及装置

Country Status (2)

Country Link
CN (1) CN105760185A (zh)
WO (1) WO2016095681A1 (zh)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109783156B (zh) * 2018-12-29 2021-11-16 奇安信科技集团股份有限公司 一种应用的启动控制方法及装置
CN111538541A (zh) * 2019-12-06 2020-08-14 杭州当虹科技股份有限公司 一种让Android App长期稳定后台运行的方法

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102981906A (zh) * 2012-11-16 2013-03-20 广东欧珀移动通信有限公司 一种应用程序后台进程管理方法及装置
CN104199711A (zh) * 2014-09-29 2014-12-10 北京奇虎科技有限公司 建立root权限的方法和装置

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2010131259A2 (en) * 2009-04-11 2010-11-18 Informate Mobile Intelligence Pvt. Ltd. A monitoring system for capturing information relating to the wireless smart device for behavioral analytics
CN102724212B (zh) * 2012-06-29 2014-10-22 北京奇虎科技有限公司 稍后阅读服务器实现方法、系统及稍后阅读服务器
CN103095528B (zh) * 2013-01-08 2016-04-13 北京瓦力网络科技有限公司 一种运行检测网络流量的应用的方法和装置
CN103399795A (zh) * 2013-06-28 2013-11-20 贵阳朗玛信息技术股份有限公司 通讯录同步方法及装置
CN103532972B (zh) * 2013-10-25 2017-01-18 苏州大拿信息技术有限公司 针对ios的系统app后台运行的方法

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102981906A (zh) * 2012-11-16 2013-03-20 广东欧珀移动通信有限公司 一种应用程序后台进程管理方法及装置
CN104199711A (zh) * 2014-09-29 2014-12-10 北京奇虎科技有限公司 建立root权限的方法和装置

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
"IOS RUNNING INFINITELY IN THE BACKGROUND", IOS MOBILE DEVELOPER'S GROWING BIT BY BIT COLUMN, 20 January 2014 (2014-01-20), Retrieved from the Internet <URL:http://www.2cto.com/kf/201401/273820.html> [retrieved on 20160221] *

Also Published As

Publication number Publication date
CN105760185A (zh) 2016-07-13

Similar Documents

Publication Publication Date Title
US9978384B2 (en) Audio decoding using modulator-demodulator
CN110336735B (zh) 一种用于发送提醒消息的方法与设备
US8930590B2 (en) Audio device and method of operating the same
TWI229806B (en) Method and system for data flow control of execution nodes of an adaptive computing engine (ACE)
WO2017101663A1 (zh) 应用的引导方法及装置、终端
US9606818B2 (en) Systems and methods of executing multiple hypervisors using multiple sets of processors
WO2015123937A1 (zh) 一种分屏处理方法、装置及计算机存储介质
US20140006948A1 (en) Method and mobile phone for capturing audio file or video file
BR112015000216B1 (pt) Método e dispositivo de processamento para um programa de aplicativo
TW201433967A (zh) 具有固持的原子鏈結實體之自動完成
CN111527746B (zh) 一种控制电子设备的方法及电子设备
CN103295604B (zh) 一种控制终端播放的方法、装置及终端
WO2018006587A1 (zh) 一种文件存储方法、终端及存储介质
CN103888605A (zh) 一种信息处理的方法及电子设备
CN103150085A (zh) 应用内容信息的展示方法及终端
WO2016095681A1 (zh) 应用的后台运行方法及装置
WO2019062615A1 (zh) 一种用户界面渲染方法及装置
WO2016145707A1 (zh) 一种在智能终端中添加主页的方法和装置
US9118756B2 (en) Recording method, recording device, and electronic device
US20180253538A1 (en) Method and device for controlling top floating window and mobile terminal
WO2016107104A1 (zh) 一种记录语音通信信息的方法及终端、计算机存储介质
KR102213429B1 (ko) 사운드 제공 방법 및 이를 구현하는 전자 장치
CN110166955B (zh) 一种进行日程提醒的方法与设备
US20170123753A1 (en) Electronic device and method for playing back sound data
CN104391742B (zh) 应用优化方法和装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 15869189

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 15869189

Country of ref document: EP

Kind code of ref document: A1