技术领域technical field
本发明涉及智能终端技术领域,更具体地说,是涉及一种快速切换应用程序及其界面的方法及装置。The present invention relates to the technical field of intelligent terminals, and more specifically, relates to a method and device for quickly switching application programs and their interfaces.
背景技术Background technique
如何方便快捷地切换应用程序是现有智能终端需要考虑的问题之一。目前,普遍的切换方式有以下两种:1、从前台运行的应用程序界面返回桌面,并重新点击桌面上的应用程序图标来打开其他正在运行的应用程序,来实现应用程序切换;2、长按Home键或者双击Home键,调出最近打开的应用程序界面,点击相应的应用图标。How to switch applications conveniently and quickly is one of the issues that need to be considered in existing smart terminals. At present, there are two general switching methods as follows: 1. Return to the desktop from the application program interface running in the foreground, and click the application program icon on the desktop again to open other running applications to realize application switching; 2. Press the Home button or double-click the Home button to bring up the recently opened application program interface, and click the corresponding application icon.
上述两种方式在用户需频繁在某两个应用之间切换时会显得过于繁琐,均需要用户退出前台运行的应用程序进入任务管理器或返回桌面才能进行切换,而且容易在操作中不小心打开别的应用程序,导致用户体验很差。The above two methods will be too cumbersome when the user needs to frequently switch between two applications. Both require the user to exit the application running in the foreground and enter the task manager or return to the desktop to switch, and it is easy to accidentally open the application during operation. other applications, resulting in a poor user experience.
发明内容Contents of the invention
本发明的目的在于克服现有技术中的上述缺陷,提供一种快速切换应用程序及其界面的方法及装置,能够使应用程序的切换更为方便和快速,可大大降低误操作,提升了用户体验。The purpose of the present invention is to overcome the above-mentioned defects in the prior art, and provide a method and device for quickly switching application programs and their interfaces, which can make the switching of application programs more convenient and fast, greatly reduce misoperations, and improve user experience. experience.
为实现上述目的,本发明提供的技术方案如下:一种快速切换应用程序及其界面的方法,包括以下步骤:In order to achieve the above object, the technical solution provided by the present invention is as follows: a method for quickly switching application programs and their interfaces, comprising the following steps:
响应用户指令,预先在终端运行到某一应用程序时记录所述应用程序的包名和所处的应用界面对应的activity名称,并生成一浮动切换按键;In response to user instructions, when the terminal runs to a certain application program, record the package name of the application program and the activity name corresponding to the application interface where it is located, and generate a floating switch button;
当接收到作用于所述浮动切换按键的点触信号时,判断当前运行的应用程序的包名是否与被记录的应用程序的包名相同;When a touch signal acting on the floating switch button is received, it is judged whether the package name of the currently running application program is the same as the package name of the recorded application program;
若当前运行的应用程序的包名与被记录的应用程序的包名不相同,则将当前运行的应用程序切换到被记录包名的应用程序,并显示与被记录的activity名称相对应的应用界面。If the package name of the currently running application is different from the package name of the recorded application, switch the currently running application to the application with the recorded package name, and display the application corresponding to the recorded activity name interface.
作为优选的,在上述方法中,所述将当前运行的应用程序切换到被记录包名的应用程序,并显示与被记录的activity名称相对应的应用界面的步骤之后还包括:Preferably, in the above method, after the step of switching the currently running application program to the application program whose package name is recorded, and displaying the application interface corresponding to the recorded activity name, it also includes:
当切换应用程序时,记录切换前运行的应用程序的包名和所处的应用界面对应的activity名称;When switching applications, record the package name of the running application before switching and the activity name corresponding to the application interface;
当再次接收到作用于所述浮动切换按键的点触信号时,重新执行将当前运行的应用程序切换到被记录包名的应用程序,并显示与被记录的activity名称相对应的应用界面的步骤。When the touch signal acting on the floating switching button is received again, re-execute the step of switching the currently running application program to the application program with the recorded package name, and displaying the application interface corresponding to the recorded activity name .
作为优选的,在上述方法中,所述当接收到作用于所述浮动切换按键的点触信号时,判断当前运行的应用程序的包名是否与被记录的应用程序的包名相同的步骤之后还包括:As preferably, in the above method, after the step of determining whether the package name of the currently running application program is the same as the package name of the recorded application program when the touch signal acting on the floating switch button is received Also includes:
若当前运行的应用程序的包名与被记录的应用程序的包名相同,则判断当前运行的应用程序所处的应用界面对应的activity名称是否与被记录的activity名称相同;If the package name of the currently running application program is the same as the package name of the recorded application program, then determine whether the activity name corresponding to the application interface where the currently running application program is located is the same as the recorded activity name;
若当前运行的应用程序所处的应用界面对应的activity名称与被记录的activity名称不相同,则将当前运行的应用程序所处的应用界面切换到与被记录的activity名称相对应的应用界面。If the activity name corresponding to the application interface where the currently running application program is located is different from the recorded activity name, switch the application interface where the currently running application program is located to the application interface corresponding to the recorded activity name.
作为优选的,在上述方法中,所述响应用户指令,预先在终端运行到某一应用程序时记录所述应用程序的包名和所处的应用界面对应的activity名称,并生成一浮动切换按键的步骤之前还包括:Preferably, in the above method, in response to the user instruction, when the terminal runs to a certain application program, the package name of the application program and the activity name corresponding to the application interface where it is located are recorded in advance, and a floating switch button is generated. Before the steps also include:
检测用户是否长按终端的设置键,其中,所述设置键能够显示在任意界面中;Detecting whether the user has long pressed the setting key of the terminal, wherein the setting key can be displayed in any interface;
若检测到用户长按终端的设置键,则生成所述用户指令。If it is detected that the user presses the setting key of the terminal for a long time, the user instruction is generated.
作为优选的,在上述方法中,所述响应用户指令,预先在终端运行到某一应用程序时记录所述应用程序的包名和所处的应用界面对应的activity名称,并生成一浮动切换按键的步骤之后还包括:Preferably, in the above method, in response to the user instruction, when the terminal runs to a certain application program, the package name of the application program and the activity name corresponding to the application interface where it is located are recorded in advance, and a floating switch button is generated. After the steps also include:
当接收到作用于所述浮动切换按键的长按信号时,隐藏所述浮动切换按键,其中,所述长按信号是由终端检测到用户长按浮动切换按键的时间达到预设的时间阈值时生成。When a long press signal acting on the floating switch button is received, the floating switch button is hidden, wherein the long press signal is detected by the terminal when the user presses the floating switch button for a long time and reaches a preset time threshold generate.
此外,本发明还提供了一种快速切换应用程序及其界面的装置,包括:In addition, the present invention also provides a device for quickly switching application programs and their interfaces, including:
记录模块,用于响应用户指令,预先在终端运行到某一应用程序时记录所述应用程序的包名和所处的应用界面对应的activity名称,并启动按键生成模块;The recording module is used to respond to user instructions, record the package name of the application program and the activity name corresponding to the application interface where the terminal runs to a certain application program in advance, and start the button generation module;
按键生成模块,用于生成一浮动切换按键;A button generating module, configured to generate a floating switch button;
第一判断模块,用于当接收到作用于所述浮动切换按键的点触信号时,判断当前运行的应用程序的包名是否与被记录的应用程序的包名相同;The first judging module is used to judge whether the package name of the currently running application program is the same as the package name of the recorded application program when receiving the touch signal acting on the floating switch button;
第一切换模块,用于若当前运行的应用程序的包名与被记录的应用程序的包名不相同,则将当前运行的应用程序切换到被记录包名的应用程序,并显示与被记录的activity名称相对应的应用界面。The first switching module is used to switch the currently running application program to the application program with the recorded package name if the package name of the currently running application program is different from the package name of the recorded application program, and display the same package name as the recorded application program The activity name corresponds to the application interface.
作为优选的,在上述装置中,所述记录模块还用于当切换应用程序时,记录切换前运行的应用程序的包名和所处的应用界面对应的activity名称;As a preference, in the above device, the recording module is also used to record the package name of the application running before switching and the activity name corresponding to the application interface where it is located when the application is switched;
所述第一切换模块还用于当再次接收到作用于所述浮动切换按键的点触信号时,重新将当前运行的应用程序切换到被记录包名的应用程序,并显示与被记录的activity名称相对应的应用界面。The first switching module is also used to re-switch the currently running application program to the application program with the recorded package name when the touch signal acting on the floating switch button is received again, and display the activity related to the recorded activity The name corresponds to the application interface.
作为优选的,在上述装置中,该装置还包括:As preferably, in the above-mentioned device, the device also includes:
第二判断模块,用于若当前运行的应用程序的包名与被记录的应用程序的包名相同,则判断当前运行的应用程序所处的应用界面对应的activity名称是否与被记录的activity名称相同;The second judging module is used to determine whether the activity name corresponding to the application interface where the currently running application program is located is the same as the recorded activity name if the package name of the currently running application program is the same as the package name of the recorded application program same;
第二切换模块,用于若当前运行的应用程序所处的应用界面对应的activity名称与被记录的activity名称不相同,则将当前运行的应用程序所处的应用界面切换到与被记录的activity名称相对应的应用界面。The second switching module is used to switch the application interface where the currently running application is located to the recorded activity if the activity name corresponding to the application interface where the currently running application is located is different from the recorded activity name The name corresponds to the application interface.
作为优选的,在上述装置中,该装置还包括:As preferably, in the above-mentioned device, the device also includes:
检测模块,用于检测用户是否长按终端的设置键,其中,所述设置键能够显示在任意界面中;The detection module is used to detect whether the user presses and holds the setting key of the terminal, wherein the setting key can be displayed in any interface;
指令生成模块,用于若检测到用户长按终端的设置键,则生成所述用户指令。The instruction generating module is configured to generate the user instruction if it is detected that the user presses the setting key of the terminal for a long time.
作为优选的,在上述装置中,该装置还包括:As preferably, in the above-mentioned device, the device also includes:
按键隐藏模块,用于当接收到作用于所述浮动切换按键的长按信号时,隐藏所述浮动切换按键,其中,所述长按信号是由终端检测到用户长按浮动切换按键的时间达到预设的时间阈值时生成。A button hiding module, configured to hide the floating switch button when a long press signal acting on the floating switch button is received, wherein the long press signal is detected by the terminal when the user presses the floating switch button for a long time. Generated at a preset time threshold.
与现有技术相比,本发明的有益效果在于:Compared with prior art, the beneficial effect of the present invention is:
本发明通过点触浮动切换按键即可在后台判断当前运行的应用程序的包名是否与被记录的应用程序的包名相同;若当前运行的应用程序的包名与被记录的应用程序的包名不相同,则将当前运行的应用程序切换到被记录包名的应用程序,并显示与被记录的activity名称相对应的应用界面,运用本发明之后,用户可以方便地在其使用极为频繁的应用程序与其他应用程序之间进行快速切换,并切换至相对应的应用界面,不需要退出前台运行的应用程序进入任务管理器或返回桌面进行切换,能够避免在操作中不小心打开别的应用程序,大大降低误操作,提升了用户体验。The present invention can judge whether the package name of the currently running application is the same as the package name of the recorded application in the background by touching the floating switching button; if the package name of the currently running application is the same as the package name of the recorded application If the name of the activity is not the same, the currently running application will be switched to the application with the recorded package name, and the application interface corresponding to the recorded activity name will be displayed. Quickly switch between applications and other applications, and switch to the corresponding application interface. There is no need to exit the application running in the foreground and enter the task manager or return to the desktop to switch, which can avoid accidentally opening other applications during operation. The program greatly reduces misoperation and improves user experience.
另外,本发明通过点触浮动切换按键也能够在当前运行的应用程序的包名与被记录的应用程序的包名相同时,判断当前运行的应用程序所处的应用界面对应的activity名称是否与被记录的activity名称相同;若当前运行的应用程序所处的应用界面对应的activity名称与被记录的activity名称不相同,则将当前运行的应用程序所处的应用界面切换到被记录的activity名称所对应的应用界面,本发明通过点触浮动切换按键既可以实现应用程序之间的快速切换,也可以实现同一应用程序的不同界面之间的快速切换。In addition, the present invention can also judge whether the activity name corresponding to the application interface where the currently running application is located is the same as the package name of the currently running application when the package name of the currently running application is the same as the package name of the recorded application by touching the floating switching button. The name of the recorded activity is the same; if the name of the activity corresponding to the application interface where the currently running application is located is different from the name of the recorded activity, switch the application interface where the currently running application is located to the recorded activity name For the corresponding application interface, the present invention can realize fast switching between application programs and fast switching between different interfaces of the same application program by touching the floating switching button.
附图说明Description of drawings
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are For some embodiments of the present invention, those skilled in the art can also obtain other drawings based on these drawings without creative work.
图1是本发明实施例一提供的一种快速切换应用程序及其界面的方法流程图;FIG. 1 is a flow chart of a method for quickly switching an application program and its interface provided by Embodiment 1 of the present invention;
图2是本发明实施例二提供的一种快速切换应用程序及其界面的方法流程图;Fig. 2 is a flow chart of a method for quickly switching application programs and their interfaces provided by Embodiment 2 of the present invention;
图3是本发明实施例三提供的一种快速切换应用程序及其界面的装置的结构框图;FIG. 3 is a structural block diagram of a device for quickly switching application programs and their interfaces provided by Embodiment 3 of the present invention;
图4是本发明实施例四提供的一种快速切换应用程序及其界面的装置的结构框图;FIG. 4 is a structural block diagram of a device for quickly switching application programs and their interfaces provided by Embodiment 4 of the present invention;
图5是本发明实施例五提供的一种快速切换应用程序及其界面的装置的结构框图。FIG. 5 is a structural block diagram of an apparatus for quickly switching application programs and their interfaces according to Embodiment 5 of the present invention.
具体实施方式Detailed ways
为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments It is a part of embodiments of the present invention, but not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without creative efforts fall within the protection scope of the present invention.
本发明的实施例一提供了一种快速切换应用程序及其界面的方法,下面结合附图对本实施例进行详细说明。图1是本发明实施例一的方法流程图,请参考图1,本发明实施例的方法包括以下步骤:Embodiment 1 of the present invention provides a method for quickly switching an application program and its interface, and this embodiment will be described in detail below with reference to the accompanying drawings. Fig. 1 is a method flow chart of the first embodiment of the present invention, please refer to Fig. 1, the method of the embodiment of the present invention includes the following steps:
步骤S101、响应用户指令,预先在终端运行到某一应用程序时记录所述应用程序的包名和所处的应用界面对应的activity名称,并生成一浮动切换按键;Step S101, in response to user instructions, record the package name of the application program and the activity name corresponding to the application interface where the terminal runs to a certain application program in advance, and generate a floating switch button;
其中,Activity是Android系统组件中最基本也是最为常用的四大组件(Activity,Service服务,ContentProvider内容提供者,BroadcastReceiver广播接收器)之一,主要负责系统与用户之间的交互操作。在Android系统中,一个Activity相当于一个界面,该界面一方面用于向用户显示各种内容,另一方面还用于监听并响应用户的操作行为。在Android系统运行过程中,各种系统服务或应用程序可能会创建多个Activity,而在某一时刻,系统仅允许一个Activity在前台运行,该Activity处于激活状态,其他Activity则处于暂停或停止状态,因此,在终端运行到某一应用程序时即可记录所述应用程序当前所处的应用界面对应的activity名称。Among them, Activity is one of the most basic and most commonly used four components in the Android system components (Activity, Service service, ContentProvider content provider, BroadcastReceiver broadcast receiver), which is mainly responsible for the interactive operation between the system and the user. In the Android system, an Activity is equivalent to an interface. On the one hand, the interface is used to display various content to the user, and on the other hand, it is also used to monitor and respond to the user's operation behavior. During the running of the Android system, various system services or applications may create multiple activities, but at a certain moment, the system only allows one activity to run in the foreground, the activity is active, and other activities are suspended or stopped , therefore, when the terminal runs to a certain application program, the activity name corresponding to the application interface where the application program is currently located can be recorded.
具体的,所述浮动切换按键的形状和颜色可根据实际情况设置,如可将浮动切换按键设置成小方块形、圆形等,颜色为灰色、蓝色等。此外,所述浮动切换按键可以为透明或半透明的显示于终端的任意界面。Specifically, the shape and color of the floating switch button can be set according to the actual situation, for example, the floating switch button can be set in a small square shape, a circle, etc., and the color is gray, blue, etc. In addition, the floating switch button can be transparent or translucent and displayed on any interface of the terminal.
步骤S102、当接收到作用于所述浮动切换按键的点触信号时,判断当前运行的应用程序的包名是否与被记录的应用程序的包名相同;Step S102, when receiving a touch signal acting on the floating switch button, judge whether the package name of the currently running application program is the same as the package name of the recorded application program;
具体的,用户可以通过点触(即点击)浮动切换按键使终端在后台进行应用程序包名的判断,若当前运行的应用程序的包名与被记录的应用程序的包名不相同,则执行步骤S103。Specifically, the user can touch (that is, click) the floating switch button to make the terminal judge the application package name in the background. If the package name of the currently running application is different from the package name of the recorded application, execute Step S103.
步骤S103、将当前运行的应用程序切换到被记录包名的应用程序,并显示与被记录的activity名称相对应的应用界面。Step S103, switch the currently running application program to the application program whose package name is recorded, and display the application interface corresponding to the recorded activity name.
运用本发明之后,用户可以方便地在其使用极为频繁的应用程序与其他应用程序之间进行快速切换,并切换至相对应的应用界面,不需要退出前台运行的应用程序进入任务管理器或返回桌面进行切换,能够避免在操作中不小心打开别的应用程序,大大降低误操作,提升了用户体验。After using the present invention, the user can conveniently quickly switch between the frequently used application program and other application programs, and switch to the corresponding application interface without exiting the application program running in the foreground to enter the task manager or return to the Switching the desktop can avoid accidentally opening other applications during operation, greatly reducing misoperations and improving user experience.
本发明的实施例二提供了一种快速切换应用程序及其界面的方法,是在实施例一的基础之上进行的改进。图2是本发明实施例二的方法流程图,请参考图2,本发明实施例的方法包括以下步骤:Embodiment 2 of the present invention provides a method for quickly switching application programs and their interfaces, which is an improvement on the basis of Embodiment 1. Fig. 2 is a method flowchart of the second embodiment of the present invention, please refer to Fig. 2, the method of the embodiment of the present invention includes the following steps:
步骤S201、检测用户是否长按终端的设置键;Step S201, detecting whether the user has long pressed the setting key of the terminal;
其中,所述设置键能够显示在任意界面中。若检测到用户长按终端的设置键,则执行步骤S202。Wherein, the setting key can be displayed in any interface. If it is detected that the user presses and holds the setting key of the terminal, step S202 is performed.
步骤S202、生成用户指令;Step S202, generating a user instruction;
当然,本发明实施例也不局限于设置键,也可以通过长按其他预设的按键生成用户指令。Of course, the embodiment of the present invention is not limited to the setting key, and user instructions can also be generated by long pressing other preset keys.
步骤S203、响应用户指令,预先在终端运行到某一应用程序时记录所述应用程序的包名和所处的应用界面对应的activity名称,并生成一浮动切换按键;Step S203, in response to user instructions, record the package name of the application program and the activity name corresponding to the application interface where the terminal runs to a certain application program in advance, and generate a floating switch button;
具体的,所述浮动切换按键的形状和颜色可根据实际情况设置,如可将浮动切换按键设置成小方块形、圆形等,颜色为灰色、蓝色等。此外,所述浮动切换按键可以为透明或半透明的显示于终端的任意界面。Specifically, the shape and color of the floating switch button can be set according to the actual situation, for example, the floating switch button can be set in a small square shape, a circle, etc., and the color is gray, blue, etc. In addition, the floating switch button can be transparent or translucent and displayed on any interface of the terminal.
步骤S204、接收作用于所述浮动切换按键的点触信号;Step S204, receiving a touch signal acting on the floating switch button;
步骤S205、判断当前运行的应用程序的包名是否与被记录的应用程序的包名相同;Step S205, judging whether the package name of the currently running application program is the same as the package name of the recorded application program;
具体的,用户可以通过点触(即点击)浮动切换按键使终端在后台进行应用程序包名的判断,若当前运行的应用程序的包名与被记录的应用程序的包名不相同,则执行步骤S206以及后续的步骤S207~S208,若当前运行的应用程序的包名与被记录的应用程序的包名相同,则执行步骤S209。Specifically, the user can touch (that is, click) the floating switch button to make the terminal judge the application package name in the background. If the package name of the currently running application is different from the package name of the recorded application, execute In step S206 and subsequent steps S207-S208, if the package name of the currently running application program is the same as the package name of the recorded application program, step S209 is executed.
步骤S206、将当前运行的应用程序切换到被记录包名的应用程序,并显示与被记录的activity名称相对应的应用界面;Step S206, switch the currently running application program to the application program whose package name is recorded, and display the application interface corresponding to the recorded activity name;
步骤S207、当切换应用程序时,记录切换前运行的应用程序的包名和所处的应用界面对应的activity名称;Step S207, when switching the application program, record the package name of the application program running before switching and the activity name corresponding to the application interface where it is located;
步骤S208、当再次接收到作用于所述浮动切换按键的点触信号时,重新执行步骤S206;Step S208, when the touch signal acting on the floating switch button is received again, step S206 is re-executed;
步骤S209、判断当前运行的应用程序所处的应用界面对应的activity名称是否与被记录的activity名称相同;Step S209, judging whether the activity name corresponding to the application interface where the currently running application is located is the same as the recorded activity name;
若当前运行的应用程序所处的应用界面对应的activity名称与被记录的activity名称不相同,则执行步骤S210,若当前运行的应用程序所处的应用界面对应的activity名称与被记录的activity名称相同,则界面保持不变。If the activity name corresponding to the application interface where the currently running application program is located is not the same as the recorded activity name, then perform step S210, if the activity name corresponding to the application interface where the currently running application program is located is not the same as the recorded activity name If they are the same, the interface remains unchanged.
步骤S210、将当前运行的应用程序所处的应用界面切换到与被记录的activity名称相对应的应用界面。Step S210, switching the application interface where the currently running application is located to the application interface corresponding to the recorded activity name.
举例而言,手机运行时,用户在任意界面长按设置键,手机系统记录当前运行的应用程序的包名A1和activity名称B1,如果手机运行到另一个应用程序界面,假设此时所运行的应用程序的包名为A2,activity名称B2,点触浮动切换按键,则跳转至应用程序A1的B1界面。跳转后,如果再次点触浮动切换按键,则跳转至应用程序A2的B2界面。其中,点触浮动切换按键能够实现应用程序A1的B1界面与应用程序A2的B2界面之间的来回切换。For example, when the mobile phone is running, the user presses and holds the setting button on any interface, and the mobile phone system records the package name A1 and activity name B1 of the currently running application. The package name of the application is A2, the activity name is B2, and the floating switching button is touched to jump to the B1 interface of the application A1. After the jump, if the floating switching button is touched again, it will jump to the B2 interface of the application program A2. Wherein, touching the floating switching button can switch back and forth between the B1 interface of the application program A1 and the B2 interface of the application program A2.
此外,当手机系统记录了当前运行的应用程序的包名A1和activity名称B1后,如果手机此时仍然在运行应用程序A1,但所处界面对应的activity名称为B3,则点触浮动切换按键后,界面跳转至B1;如果仍然在运行应用程序A1且activity名称为B1,则点触浮动切换按键后,界面保持不变。In addition, after the mobile phone system records the package name A1 and activity name B1 of the currently running application, if the mobile phone is still running the application A1 at this time, but the activity name corresponding to the interface is B3, then touch the floating switch button After that, the interface jumps to B1; if the application A1 is still running and the activity name is B1, the interface remains unchanged after touching the floating switch button.
作为另一优选的实施方式,步骤S203之后还可以包括以下步骤:当接收到作用于所述浮动切换按键的长按信号时,隐藏所述浮动切换按键。As another preferred implementation manner, after step S203, the following step may be further included: when a long press signal acting on the floating switch button is received, hiding the floating switch button.
其中,所述长按信号是由终端检测到用户长按浮动切换按键的时间达到预设的时间阈值时生成。例如,用户长按浮动切换按键2秒钟,浮动切换按键消失。Wherein, the long press signal is generated when the terminal detects that the user presses and holds the floating switch button for a time reaching a preset time threshold. For example, if the user presses and holds the floating switch button for 2 seconds, the floating switch button disappears.
运用本发明之后,用户既可以通过点触浮动切换按键实现应用程序之间的快速切换,也可以实现同一应用程序的不同界面之间的快速切换,操作便捷,提升了用户体验。After using the present invention, the user can not only realize quick switching between application programs by touching the floating switching button, but also realize quick switching between different interfaces of the same application program, which is convenient to operate and improves user experience.
本发明的实施例三提供了一种快速切换应用程序及其界面的装置,请参考图3,其包括记录模块1、按键生成模块2、第一判断模块3和第一切换模块4,下面将对各个模块进行详细说明。Embodiment 3 of the present invention provides a device for quickly switching application programs and their interfaces. Please refer to FIG. Describe each module in detail.
记录模块1,用于响应用户指令,预先在终端运行到某一应用程序时记录所述应用程序的包名和所处的应用界面对应的activity名称,并启动按键生成模块2。The recording module 1 is configured to respond to user instructions, record the package name of the application program and the activity name corresponding to the application interface where the terminal runs to a certain application program in advance, and start the key generation module 2 .
按键生成模块2,用于生成一浮动切换按键。The button generation module 2 is used to generate a floating switch button.
具体的,所述浮动切换按键的形状和颜色可根据实际情况设置,如可将浮动切换按键设置成小方块形、圆形等,颜色为灰色、蓝色等。此外,所述浮动切换按键可以为透明或半透明的显示于终端的任意界面。Specifically, the shape and color of the floating switch button can be set according to the actual situation, for example, the floating switch button can be set in a small square shape, a circle, etc., and the color is gray, blue, etc. In addition, the floating switch button can be transparent or translucent and displayed on any interface of the terminal.
第一判断模块3,用于当接收到作用于所述浮动切换按键的点触信号时,判断当前运行的应用程序的包名是否与被记录的应用程序的包名相同。The first judging module 3 is configured to judge whether the package name of the currently running application program is the same as the package name of the recorded application program when receiving the touch signal acting on the floating switch button.
第一切换模块4,用于若当前运行的应用程序的包名与被记录的应用程序的包名不相同,则将当前运行的应用程序切换到被记录包名的应用程序,并显示与被记录的activity名称相对应的应用界面。The first switching module 4 is used to switch the currently running application program to the application program with the recorded package name if the package name of the currently running application program is different from the package name of the recorded application program, and display the same The application interface corresponding to the recorded activity name.
在另一实施例中,所述记录模块1还用于当切换应用程序时,记录切换前运行的应用程序的包名和所处的应用界面对应的activity名称。相应的,所述第一切换模块4还用于当再次接收到作用于所述浮动切换按键的点触信号时,重新将当前运行的应用程序切换到被记录包名的应用程序,并显示与被记录的activity名称相对应的应用界面。In another embodiment, the recording module 1 is further configured to record the package name of the running application before switching and the activity name corresponding to the application interface where the application is located when the application is switched. Correspondingly, the first switching module 4 is also used to re-switch the currently running application program to the application program whose package name is recorded when the touch signal acting on the floating switch button is received again, and display the same The application interface corresponding to the recorded activity name.
运用本发明之后,用户可以方便地在其使用极为频繁的应用程序与其他应用程序之间进行快速切换,并切换至相对应的应用界面,不需要退出前台运行的应用程序进入任务管理器或返回桌面进行切换,能够避免在操作中不小心打开别的应用程序,大大降低误操作,提升了用户体验。After using the present invention, the user can conveniently quickly switch between the frequently used application program and other application programs, and switch to the corresponding application interface without exiting the application program running in the foreground to enter the task manager or return to the Switching the desktop can avoid accidentally opening other applications during operation, greatly reducing misoperations and improving user experience.
本发明的实施例四提供了一种快速切换应用程序及其界面的装置,请参考图4,本发明实施例的装置与上述实施例三的装置的区别在于,还包括第二判断模块5和第二切换模块6,下面仅对不同的模块进行说明,相同的模块在此不进行赘述。Embodiment 4 of the present invention provides a device for quickly switching application programs and their interfaces. Please refer to FIG. For the second switching module 6 , only different modules will be described below, and the same modules will not be described in detail here.
第二判断模块5,用于若当前运行的应用程序的包名与被记录的应用程序的包名相同,则判断当前运行的应用程序所处的应用界面对应的activity名称是否与被记录的activity名称相同。The second judging module 5 is used to determine whether the activity name corresponding to the application interface where the currently running application program is located is the same as the recorded activity if the package name of the currently running application program is the same as the package name of the recorded application program. same name.
第二切换模块6,用于若当前运行的应用程序所处的应用界面对应的activity名称与被记录的activity名称不相同,则将当前运行的应用程序所处的应用界面切换到与被记录的activity名称相对应的应用界面。The second switching module 6 is used to switch the application interface where the currently running application program is located to the one corresponding to the recorded activity name if the activity name corresponding to the application interface where the currently running application program is located is different from the recorded activity name. The application interface corresponding to the activity name.
举例而言,手机运行时,用户在任意界面长按设置键,手机系统记录当前运行的应用程序的包名A1和activity名称B1,如果手机运行到另一个应用程序界面,假设此时所运行的应用程序的包名为A2,activity名称B2,点触浮动切换按键,则跳转至应用程序A1的B1界面。跳转后,如果再次点触浮动切换按键,则跳转至应用程序A2的B2界面。其中,点触浮动切换按键能够实现应用程序A1的B1界面与应用程序A2的B2界面之间的来回切换。For example, when the mobile phone is running, the user presses and holds the setting button on any interface, and the mobile phone system records the package name A1 and activity name B1 of the currently running application. The package name of the application is A2, the activity name is B2, and the floating switching button is touched to jump to the B1 interface of the application A1. After the jump, if the floating switching button is touched again, it will jump to the B2 interface of the application program A2. Wherein, touching the floating switching button can switch back and forth between the B1 interface of the application program A1 and the B2 interface of the application program A2.
此外,当手机系统记录了当前运行的应用程序的包名A1和activity名称B1后,如果手机此时仍然在运行应用程序A1,但所处界面对应的activity名称为B3,则点触浮动切换按键后,界面跳转至B1;如果仍然在运行应用程序A1且activity名称为B1,则点触浮动切换按键后,界面保持不变。In addition, after the mobile phone system records the package name A1 and activity name B1 of the currently running application, if the mobile phone is still running the application A1 at this time, but the activity name corresponding to the interface is B3, then touch the floating switch button After that, the interface jumps to B1; if the application A1 is still running and the activity name is B1, the interface remains unchanged after touching the floating switch button.
运用本发明之后,用户既可以通过点触浮动切换按键实现应用程序之间的快速切换,也可以实现同一应用程序的不同界面之间的快速切换,操作便捷,提升了用户体验。After using the present invention, the user can not only realize quick switching between application programs by touching the floating switching button, but also realize quick switching between different interfaces of the same application program, which is convenient to operate and improves user experience.
本发明的实施例五提供了一种快速切换应用程序及其界面的装置,请参考图5,本发明实施例的装置与上述实施例四的装置的区别在于,还包括:检测模块7、指令生成模块8和按键隐藏模块9,下面仅对不同的模块进行说明,相同的模块在此不进行赘述。Embodiment 5 of the present invention provides a device for quickly switching application programs and their interfaces. Please refer to FIG. The generation module 8 and the key hiding module 9, only the different modules will be described below, and the same modules will not be described in detail here.
检测模块7,用于检测用户是否长按终端的设置键。其中,所述设置键能够显示在任意界面中。The detection module 7 is used to detect whether the user has long pressed the setting key of the terminal. Wherein, the setting key can be displayed in any interface.
指令生成模块8,用于若检测到用户长按终端的设置键,则生成所述用户指令。当然,本发明实施例也不局限于设置键,也可以通过长按其他预设的按键生成用户指令。The instruction generation module 8 is configured to generate the user instruction if it is detected that the user presses the setting key of the terminal for a long time. Of course, the embodiment of the present invention is not limited to the setting key, and user instructions can also be generated by long pressing other preset keys.
按键隐藏模块9,用于当接收到作用于所述浮动切换按键的长按信号时,隐藏所述浮动切换按键。其中,所述长按信号是由终端检测到用户长按浮动切换按键的时间达到预设的时间阈值时生成。例如,用户长按浮动切换按键2秒钟,浮动切换按键消失。The button hiding module 9 is configured to hide the floating switch button when a long press signal acting on the floating switch button is received. Wherein, the long press signal is generated when the terminal detects that the user presses and holds the floating switch button for a time reaching a preset time threshold. For example, if the user presses and holds the floating switch button for 2 seconds, the floating switch button disappears.
需要说明的是,上述实施例提供的一种快速切换应用程序及其界面的装置,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将系统的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。此外,上述实施例所述的终端可以是手机、平板电脑、人机交互终端或其他具有触摸屏的移动终端设备。It should be noted that the device for quickly switching application programs and their interfaces provided by the above-mentioned embodiments is only illustrated by dividing the above-mentioned functional modules. In practical applications, the above-mentioned functions can be assigned to different function modules as required Module completion means that the internal structure of the system is divided into different functional modules to complete all or part of the functions described above. In addition, the terminal described in the foregoing embodiments may be a mobile phone, a tablet computer, a human-computer interaction terminal or other mobile terminal devices with a touch screen.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,所述的程序可以在存储于一计算机可读取存储介质中,所述的存储介质,如ROM/RAM、磁盘、光盘等。Those of ordinary skill in the art can understand that all or part of the steps in the method of the above embodiments can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable storage medium, and the described Storage media, such as ROM/RAM, magnetic disk, optical disk, etc.
上述实施例为本发明较佳的实施方式,但本发明的实施方式并不受上述实施例的限制,其他的任何未背离本发明的精神实质与原理下所作的改变、修饰、替代、组合、简化,均应为等效的置换方式,都包含在本发明的保护范围之内。The above-mentioned embodiment is a preferred embodiment of the present invention, but the embodiment of the present invention is not limited by the above-mentioned embodiment, and any other changes, modifications, substitutions, combinations, Simplification should be equivalent replacement methods, and all are included in the protection scope of the present invention.
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201410841391.XACN104536666B (en) | 2014-12-29 | 2014-12-29 | A method and device for quickly switching application programs and their interfaces |
| CN201711232844.9ACN108008888B (en) | 2014-12-29 | 2014-12-29 | A method and device for quickly switching application programs and interfaces thereof |
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201410841391.XACN104536666B (en) | 2014-12-29 | 2014-12-29 | A method and device for quickly switching application programs and their interfaces |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201711232844.9ADivisionCN108008888B (en) | 2014-12-29 | 2014-12-29 | A method and device for quickly switching application programs and interfaces thereof |
| Publication Number | Publication Date |
|---|---|
| CN104536666A CN104536666A (en) | 2015-04-22 |
| CN104536666Btrue CN104536666B (en) | 2018-01-23 |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201410841391.XAActiveCN104536666B (en) | 2014-12-29 | 2014-12-29 | A method and device for quickly switching application programs and their interfaces |
| CN201711232844.9AExpired - Fee RelatedCN108008888B (en) | 2014-12-29 | 2014-12-29 | A method and device for quickly switching application programs and interfaces thereof |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201711232844.9AExpired - Fee RelatedCN108008888B (en) | 2014-12-29 | 2014-12-29 | A method and device for quickly switching application programs and interfaces thereof |
| Country | Link |
|---|---|
| CN (2) | CN104536666B (en) |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN106371901A (en)* | 2015-07-24 | 2017-02-01 | 东莞酷派软件技术有限公司 | Application program switching method and device |
| CN105100951A (en)* | 2015-08-12 | 2015-11-25 | 深圳Tcl数字技术有限公司 | Television main interface switching method and device |
| CN106469044B (en)* | 2015-08-14 | 2021-02-02 | 腾讯科技(深圳)有限公司 | Method and device for realizing page jump |
| CN105975337B (en)* | 2016-04-29 | 2020-03-17 | 上海斐讯数据通信技术有限公司 | System and method for switching application programs |
| CN106201548A (en)* | 2016-07-22 | 2016-12-07 | 惠州Tcl移动通信有限公司 | The control method of a kind of mobile terminal key event and system |
| CN107918515A (en)* | 2016-10-09 | 2018-04-17 | 中兴通讯股份有限公司 | One key enters the method and system of APP designated modules |
| CN106874091A (en)* | 2017-02-06 | 2017-06-20 | 宇龙计算机通信科技(深圳)有限公司 | A kind of application call method, device and mobile terminal |
| CN107390968A (en)* | 2017-06-14 | 2017-11-24 | 努比亚技术有限公司 | Method, terminal and the computer-readable recording medium that application interface exchanges |
| CN107608771A (en)* | 2017-08-16 | 2018-01-19 | 深圳天珑无线科技有限公司 | Mobile terminal and its open application program method and with store function device |
| CN109725786A (en)* | 2018-05-15 | 2019-05-07 | 平安科技(深圳)有限公司 | Starting method, user equipment, storage medium and the device of program |
| CN110069291A (en)* | 2019-03-14 | 2019-07-30 | 努比亚技术有限公司 | A kind of display control method, mobile terminal and computer readable storage medium |
| CN112073780A (en)* | 2019-06-10 | 2020-12-11 | 海信视像科技股份有限公司 | Display device and control method for application jump |
| CN115033139B (en)* | 2021-03-04 | 2024-02-27 | 合肥杰发科技有限公司 | Method and related device for starting application program interface |
| CN114153538A (en)* | 2021-11-12 | 2022-03-08 | 统信软件技术有限公司 | Window switching method, computing device and storage medium |
| CN117555462B (en)* | 2024-01-11 | 2024-05-24 | 深圳市天之眼高新科技有限公司 | Control method of vehicle-mounted terminal, control device of vehicle-mounted terminal and storage medium |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102945138A (en)* | 2012-11-14 | 2013-02-27 | 李江涛 | Switching method and terminal for application programs |
| CN103246445A (en)* | 2012-02-13 | 2013-08-14 | 宇龙计算机通信科技(深圳)有限公司 | Method and communication terminal for switching application programs |
| CN104239136A (en)* | 2014-08-12 | 2014-12-24 | 广州三星通信技术研究有限公司 | Application program switching method and device |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| KR20080010734A (en)* | 2006-07-28 | 2008-01-31 | 엘지전자 주식회사 | Application switching control method of the mobile terminal |
| CN103870093B (en)* | 2012-12-12 | 2017-04-05 | 上海斐讯数据通信技术有限公司 | A kind of display packing and mobile terminal of application program |
| CN103870114A (en)* | 2014-02-18 | 2014-06-18 | 联想(北京)有限公司 | Information processing method and electronic equipment |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN103246445A (en)* | 2012-02-13 | 2013-08-14 | 宇龙计算机通信科技(深圳)有限公司 | Method and communication terminal for switching application programs |
| CN102945138A (en)* | 2012-11-14 | 2013-02-27 | 李江涛 | Switching method and terminal for application programs |
| CN104239136A (en)* | 2014-08-12 | 2014-12-24 | 广州三星通信技术研究有限公司 | Application program switching method and device |
| Title |
|---|
| 一键返回快捷高效《应用切换器》试用;闫瑾;《URL:http://www.cnmo.com/soft/425227.html》;20140807;1-2* |
| Publication number | Publication date |
|---|---|
| CN108008888A (en) | 2018-05-08 |
| CN108008888B (en) | 2021-05-04 |
| CN104536666A (en) | 2015-04-22 |
| Publication | Publication Date | Title |
|---|---|---|
| CN104536666B (en) | A method and device for quickly switching application programs and their interfaces | |
| CN106201219B (en) | The quick call method of function of application and system | |
| TWI626591B (en) | System and method for switching applications | |
| CN103425453B (en) | A kind of multi-screen display method and device | |
| US20140002396A1 (en) | Information processing method, information processing apparatus and electronic device | |
| CN104239136A (en) | Application program switching method and device | |
| WO2015106510A1 (en) | Screen splitting method and device for applications, intelligent terminal and storage medium | |
| CN105487742A (en) | Method and device for displaying plurality of application windows | |
| CN104156171A (en) | Method and device for preventing touch key misoperations in landscape screen state of mobile terminal | |
| CN103279303A (en) | Event message processing method and device | |
| WO2014101101A1 (en) | Task switching method and terminal | |
| CN103309756A (en) | Method for preventing application program from quitting or being interrupted accidently and mobile terminal | |
| CN108614655B (en) | Split screen display method and device, storage medium and electronic equipment | |
| WO2020048246A1 (en) | Window switching method and apparatus, and terminal and computer-readable storage medium | |
| CN104407799A (en) | Method and system for avoiding incorrect operation of touch screen in video playing process | |
| CN110134237B (en) | Interface control method and related equipment | |
| WO2017113821A1 (en) | Method and apparatus for operating smart phone and smart phone | |
| US9823778B2 (en) | Method and apparatus for controlling touch device, and touch device | |
| CN107450838A (en) | Black screen gesture response method, device, storage medium and mobile terminal | |
| CN104866198A (en) | A method for quickly switching display interfaces | |
| WO2016112791A1 (en) | Method and device for displaying interface of application program on mobile terminal | |
| US9412339B2 (en) | Display method and display device | |
| WO2020024640A1 (en) | Application display method and apparatus, and storage medium and electronic device | |
| CN104866356B (en) | It is a kind of to realize the quick method for starting APP | |
| CN105389116A (en) | Terminal application processing method and system for terminal equipment, terminal equipment |
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| C10 | Entry into substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant | ||
| CP01 | Change in the name or title of a patent holder | ||
| CP01 | Change in the name or title of a patent holder | Address after:Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18 Patentee after:GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd. Address before:Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18 Patentee before:GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd. |