CN111399928A - Application program starting method and device, electronic equipment and readable storage medium - Google Patents
Application program starting method and device, electronic equipment and readable storage medium Download PDFInfo
- Publication number
- CN111399928A CN111399928A CN201811533754.8A CN201811533754A CN111399928A CN 111399928 A CN111399928 A CN 111399928A CN 201811533754 A CN201811533754 A CN 201811533754A CN 111399928 A CN111399928 A CN 111399928A
- Authority
- CN
- China
- Prior art keywords
- page
- starting
- application
- application program
- loading
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 32
- 230000000694 effects Effects 0.000 claims description 32
- 230000015654 memory Effects 0.000 claims description 13
- 230000008569 process Effects 0.000 abstract description 9
- 101100264195 Caenorhabditis elegans app-1 gene Proteins 0.000 description 10
- 230000006870 function Effects 0.000 description 8
- 238000005516 engineering process Methods 0.000 description 6
- 238000007667 floating Methods 0.000 description 4
- 238000010586 diagram Methods 0.000 description 3
- 238000009434 installation Methods 0.000 description 3
- 230000003287 optical effect Effects 0.000 description 3
- 244000035744 Hura crepitans Species 0.000 description 2
- 230000008859 change Effects 0.000 description 2
- 238000004891 communication Methods 0.000 description 2
- 238000004590 computer program Methods 0.000 description 2
- 238000011161 development Methods 0.000 description 2
- 230000007246 mechanism Effects 0.000 description 2
- 230000003068 static effect Effects 0.000 description 2
- 230000002159 abnormal effect Effects 0.000 description 1
- 238000013473 artificial intelligence Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000000802 evaporation-induced self-assembly Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000003672 processing method Methods 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
- 238000012795 verification Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
- G06F9/44521—Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
- G06F9/44568—Immediately runnable code
- G06F9/44578—Preparing or optimising for loading
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Stored Programmes (AREA)
Abstract
本申请提供了一种应用程序的启动方法、装置、电子设备及计算机可读存储介质,涉及应用程序处理领域。该方法包括:在本发明实施例中,当检测到启动应用程序的操作指令时,生成启动页面,并展示该启动页面,同时在该启动页面的下一层加载该应用程序的初始页面,当该初始页面加载完成时,注销该启动页面,就可以展示应用程序的初始页面了。这样,应用程序在启动的过程中,既可以展示启动页面,又可以在前台同时启动应用程序,解决了现有技术中“用户点击了快捷方式之后,经过短暂的等待才会展示应用程序的初始页面”的问题。
The present application provides a method, apparatus, electronic device, and computer-readable storage medium for starting an application program, and relates to the field of application program processing. The method includes: in the embodiment of the present invention, when an operation instruction to start an application program is detected, a startup page is generated, the startup page is displayed, and an initial page of the application program is loaded at the next layer of the startup page. When the initial page is loaded, log out of the start page, and the initial page of the application can be displayed. In this way, during the startup process of the application program, the startup page can be displayed, and the application program can be simultaneously started in the foreground, which solves the problem in the prior art that "after the user clicks the shortcut, the initial stage of the application program will be displayed after a short wait. page" problem.
Description
技术领域technical field
本申请涉及应用程序处理技术领域,具体而言,本申请涉及一种应用程序的启动方法、装置、电子设备及计算机可读存储介质。The present application relates to the technical field of application program processing, and in particular, the present application relates to a method, an apparatus, an electronic device, and a computer-readable storage medium for starting an application program.
背景技术Background technique
随着时代的改变,伴随着移动互联的崛起,我们身边渐渐出现了很多社交软件,比如微信、QQ、微博等。用户既可以通过社交软件与他人进行即时交流,也可以发布分享信息。With the change of the times and the rise of mobile internet, many social softwares such as WeChat, QQ, Weibo, etc. have gradually appeared around us. Users can communicate instantly with others through social software, and can also publish and share information.
在实际应用中,用户社交软件里的好友可能既包含家人、朋友,也包含客户、同事,这种情况下,用户发布的分享信息会被所有人看到,虽然在发布分享信息的时候可以选择对指定好友不显示,但是这种操作比较繁琐,特别是好友数量较多的时候。In practical applications, the friends in the user's social software may include not only family members, friends, but also customers and colleagues. In this case, the shared information published by the user will be seen by everyone, although the user can choose when publishing the shared information. It is not displayed for designated friends, but this operation is cumbersome, especially when the number of friends is large.
针对上述问题,现有技术会对社交软件的APP(Application,应用程序)进行“分身”,也就是对社交软件进行复制,生成一个分身应用,这样,终端里就存在两个同一款社交软件了,用户可以使用原生应用和分身应用同时登录两个账号,将家人、朋友与客户、同事区分开来。In view of the above problems, the existing technology will "separate" the APP (Application) of the social software, that is, copy the social software to generate a clone application, so that there are two identical social software in the terminal. , users can log in to two accounts at the same time using the native app and the avatar app to distinguish family members and friends from customers and colleagues.
但是,在启动分身应用时,启动时间较长,在展示应用界面之前,系统会生成一个窗口,这个窗口的背景一般都是白色,简单来说,就是用户在启动分身应用时会显示“白屏”,直到分身应用启动完成,“白屏”才会消失,展示应用的界面,用户体验较差。However, when starting the avatar application, the startup time is long. Before displaying the application interface, the system will generate a window. The background of this window is generally white. ”, until the clone application is started, the “white screen” will disappear, showing the interface of the application, and the user experience is poor.
而且,由于该窗口使用悬浮窗实现,而使用悬浮窗需要用户在终端的应用权限管理(比如手机的“设置”里)中手动打开,才算给予该悬浮窗权限,较为繁琐。Moreover, since the window is implemented by a floating window, the user needs to manually open the application permission management of the terminal (such as "Settings" of the mobile phone) to grant the permission of the floating window, which is rather cumbersome.
发明内容SUMMARY OF THE INVENTION
本申请提供了一种应用程序的处理方法、装置、电子设备及计算机可读存储介质,可以解决现有技术中“用户点击了快捷方式之后,经过短暂的等待才会展示应用程序的初始页面”的问题。所述技术方案如下:The present application provides an application processing method, device, electronic device and computer-readable storage medium, which can solve the problem in the prior art that "after the user clicks the shortcut, the initial page of the application will be displayed after a short wait". The problem. The technical solution is as follows:
第一方面,提供了一种应用程序的启动方法,该方法包括:In a first aspect, a method for starting an application program is provided, and the method includes:
检测到启动所述应用程序的操作指令时,生成启动页面;When detecting the operation instruction to start the application, generate a start page;
展示所述启动页面,并在启动页面的下一层同时加载所述应用程序的初始页面;displaying the startup page, and simultaneously loading the initial page of the application program at the next level of the startup page;
当初始页面加载完成时,注销所述启动页面,并展示所述初始页面。When the initial page is loaded, log out of the start page, and display the initial page.
第二方面,提供了一种应用程序的启动装置,该装置包括:In a second aspect, a device for starting an application program is provided, and the device includes:
生成模块,用于检测到启动所述应用程序的操作指令时,生成启动页面;a generating module, configured to generate a startup page when an operation instruction for starting the application is detected;
展示模块,用于展示所述启动页面;a display module for displaying the startup page;
加载模块,用于在启动页面的下一层同时加载所述应用程序的初始页面;a loading module for simultaneously loading the initial page of the application program at the next level of the startup page;
注销模块,用于当初始页面加载完成时,注销所述启动页面,并调用所述展示模块展示所述初始页面。The logout module is configured to logout the startup page when the loading of the initial page is completed, and call the display module to display the initial page.
第三方面,提供了一种电子设备,该电子设备包括:In a third aspect, an electronic device is provided, the electronic device comprising:
处理器、存储器和总线;processors, memories and buses;
所述总线,用于连接所述处理器和所述存储器;the bus for connecting the processor and the memory;
所述存储器,用于存储操作指令;the memory for storing operation instructions;
所述处理器,用于通过调用所述操作指令,可执行指令使处理器执行如本申请的第一方面所示的应用程序的启动方法对应的操作。The processor is used for invoking the operation instruction, and the executable instruction causes the processor to execute the operation corresponding to the method for starting the application program shown in the first aspect of the present application.
第四方面,提供了一种计算机可读存储介质,计算机可读存储介质上存储有计算机程序,该程序被处理器执行时实现本申请第一方面所示的应用程序的启动方法。In a fourth aspect, a computer-readable storage medium is provided, where a computer program is stored on the computer-readable storage medium, and when the program is executed by a processor, the application program startup method shown in the first aspect of the present application is implemented.
本申请提供的技术方案带来的有益效果是:The beneficial effects brought by the technical solution provided by the application are:
在本发明实施例中,当检测到启动应用程序的操作指令时,生成启动页面,并展示该启动页面,同时在该启动页面的下一层加载该应用程序的初始页面,当该初始页面加载完成时,注销该启动页面,就可以展示应用程序的初始页面了。这样,应用程序在启动的过程中,既可以展示启动页面,又可以在前台同时启动应用程序,解决了现有技术中“用户点击了快捷方式之后,经过短暂的等待才会展示应用程序的初始页面”的问题。In this embodiment of the present invention, when an operation instruction to start an application is detected, a startup page is generated and displayed, and an initial page of the application is loaded at the next layer of the startup page. When the initial page is loaded When you're done, log out of the splash page, and you're ready to show the app's initial page. In this way, during the startup process of the application program, the startup page can be displayed, and the application program can be simultaneously started in the foreground, which solves the problem in the prior art that "after the user clicks the shortcut, the initial stage of the application program will be displayed after a short wait. page" problem.
附图说明Description of drawings
为了更清楚地说明本申请实施例中的技术方案,下面将对本申请实施例描述中所需要使用的附图作简单地介绍。In order to illustrate the technical solutions in the embodiments of the present application more clearly, the following briefly introduces the accompanying drawings that need to be used in the description of the embodiments of the present application.
图1为本申请一个实施例提供的一种应用程序的启动方法的流程示意图;FIG. 1 is a schematic flowchart of a method for starting an application program provided by an embodiment of the present application;
图2为本申请又一实施例提供的一种应用程序的启动装置的结构示意图;FIG. 2 is a schematic structural diagram of an application startup device according to another embodiment of the present application;
图3为本申请又一实施例提供的一种应用程序的启动的电子设备的结构示意图。FIG. 3 is a schematic structural diagram of an electronic device for starting an application according to another embodiment of the present application.
具体实施方式Detailed ways
下面详细描述本申请的实施例,所述实施例的示例在附图中示出,其中自始至终相同或类似的标号表示相同或类似的元件或具有相同或类似功能的元件。下面通过参考附图描述的实施例是示例性的,仅用于解释本申请,而不能解释为对本发明的限制。The following describes in detail the embodiments of the present application, examples of which are illustrated in the accompanying drawings, wherein the same or similar reference numerals refer to the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present application, but not to be construed as limiting the present invention.
本技术领域技术人员可以理解,除非特意声明,这里使用的单数形式“一”、“一个”、“所述”和“该”也可包括复数形式。应该进一步理解的是,本申请的说明书中使用的措辞“包括”是指存在所述特征、整数、步骤、操作、元件和/或组件,但是并不排除存在或添加一个或多个其他特征、整数、步骤、操作、元件、组件和/或它们的组。应该理解,当我们称元件被“连接”或“耦接”到另一元件时,它可以直接连接或耦接到其他元件,或者也可以存在中间元件。此外,这里使用的“连接”或“耦接”可以包括无线连接或无线耦接。这里使用的措辞“和/或”包括一个或更多个相关联的列出项的全部或任一单元和全部组合。It will be understood by those skilled in the art that the singular forms "a", "an", "the" and "the" as used herein can include the plural forms as well, unless expressly stated otherwise. It should be further understood that the word "comprising" used in the specification of this application refers to the presence of stated features, integers, steps, operations, elements and/or components, but does not preclude the presence or addition of one or more other features, Integers, steps, operations, elements, components and/or groups thereof. It will be understood that when we refer to an element as being "connected" or "coupled" to another element, it can be directly connected or coupled to the other element or intervening elements may also be present. Furthermore, "connected" or "coupled" as used herein may include wirelessly connected or wirelessly coupled. As used herein, the term "and/or" includes all or any element and all combination of one or more of the associated listed items.
为使本申请的目的、技术方案和优点更加清楚,下面将结合附图对本申请实施方式作进一步地详细描述。In order to make the objectives, technical solutions and advantages of the present application clearer, the embodiments of the present application will be further described in detail below with reference to the accompanying drawings.
随着时代的改变,伴随着移动互联的崛起,我们身边渐渐出现了很多社交软件,比如微信、QQ、微博等。用户既可以通过社交软件与他人进行即时交流,也可以发布分享信息。With the change of the times and the rise of mobile internet, many social softwares such as WeChat, QQ, Weibo, etc. have gradually appeared around us. Users can communicate instantly with others through social software, and can also publish and share information.
在实际应用中,用户社交软件里的好友可能既包含家人、朋友,也包含客户、同事,这种情况下,用户发布的分享信息会被所有人看到,虽然在发布分享信息的时候可以选择对指定好友不显示,但是这种操作比较繁琐,特别是好友数量较多的时候。In practical applications, the friends in the user's social software may include not only family members, friends, but also customers and colleagues. In this case, the shared information published by the user will be seen by everyone, although the user can choose when publishing the shared information. It is not displayed for designated friends, but this operation is cumbersome, especially when the number of friends is large.
针对上述问题,现有技术会对社交软件的APP(Application,应用程序)进行“分身”,也就是对社交软件进行复制,生成一个分身应用,这样,终端里就存在两个同一款社交软件了,用户可以使用原生应用和分身应用同时登录两个账号,将家人、朋友与客户、同事区分开来。In view of the above problems, the existing technology will "separate" the APP (Application) of the social software, that is, copy the social software to generate a clone application, so that there are two identical social software in the terminal. , users can log in to two accounts at the same time using the native app and the avatar app to distinguish family members and friends from customers and colleagues.
但是,在启动分身应用时,启动时间较长,在展示应用界面之前,系统会生成一个窗口,这个窗口的背景一般都是白色,简单来说,就是用户在启动分身应用时会显示“白屏”,直到分身应用启动完成,“白屏”才会消失,展示应用的界面,用户体验较差。However, when starting the avatar application, the startup time is long. Before displaying the application interface, the system will generate a window. The background of this window is generally white. ”, until the clone application is started, the “white screen” will disappear, showing the interface of the application, and the user experience is poor.
而且,由于该窗口使用悬浮窗实现,而使用悬浮窗需要用户在终端的应用权限管理(比如手机的“设置”里)中手动打开,才算给予该悬浮窗权限,较为繁琐。Moreover, since the window is implemented by a floating window, the user needs to manually open the application permission management of the terminal (such as "Settings" of the mobile phone) to grant the permission of the floating window, which is rather cumbersome.
本申请提供的应用程序的启动方法、装置、电子设备和计算机可读存储介质,旨在解决现有技术的如上技术问题。The application startup method, device, electronic device, and computer-readable storage medium provided by the present application are intended to solve the above technical problems in the prior art.
下面以具体地实施例对本申请的技术方案以及本申请的技术方案如何解决上述技术问题进行详细说明。下面这几个具体的实施例可以相互结合,对于相同或相似的概念或过程可能在某些实施例中不再赘述。下面将结合附图,对本申请的实施例进行描述。The technical solutions of the present application and how the technical solutions of the present application solve the above-mentioned technical problems will be described in detail below with specific examples. The following specific embodiments may be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below with reference to the accompanying drawings.
在一个实施例中提供了一种应用程序的启动的方法,如图1所示,该方法包括:In one embodiment, a method for starting an application is provided, as shown in FIG. 1 , the method includes:
步骤S101,检测到启动所述应用程序的操作指令时,生成启动页面;Step S101, generating a startup page when detecting an operation instruction for starting the application;
在本发明实施例中,该应用程序可以为原生应用程序的分身应用程序,而对原生应用程序进行分身,可以使用“分身大师”,或者功能与“分身大师”类似的应用程序。In this embodiment of the present invention, the application may be an avatar application of the native application, and the avatar of the native application may be an “avatar master” or an application with similar functions to the “avatar master”.
具体而言,多开应用实现应用多开的主要技术方案包括:通过反射调用机制去加载与宿主应用程序具有相同包名的分身应用程序,由于与宿主应用程序具有相同的包名,在操作系统中,既能使活动组件和服务组件建立与Activity Manager Service(进程管理服务器)的正常通信,又能使活动组件、服务组件以及广播组件等,顺利被Package ManagerService(软件管理服务器)识别,降低现有技术中有关加壳应用程序运行异常的错误率;由于宿主应用程序与目标应用程序使用了相同的包名,不必为被反射调用的分身应用程序的各个组件(Activity,Service,Broadcast Receiver和Content Provider)单独构造主函数入口(Activity Thread.main),也不必考虑因包名而带来的Package Manager Service校验的程序实现复杂度问题,从而大大提高程序运行效率;通过宿主应用程序中建立起原安装包的分身应用程序与沙箱运行环境之间的通信,使得分身应用程序的活动过程可以进一步被沙箱运行环境监视,从而对其适用安全策略,并通过在宿主应用程序中建立分身应用程序的所需资源与原生应用程序的所需资源一一对应,可在宿主应用程序中通过钩子函数调用分身应用程序的所需的对应资源,确保分身应用程序能被宿主应用程序正常加载并保持安全运行,且实现了分身应用程序完全独立于原生应用程序。Specifically, the main technical solutions for implementing multiple applications by opening multiple applications include: using the reflection calling mechanism to load a clone application with the same package name as the host application. It can not only enable the active components and service components to establish normal communication with the Activity Manager Service (process management server), but also enable the active components, service components and broadcast components to be successfully identified by the Package Manager Service (software management server), reducing current The error rate of the abnormal operation of the packaged application in the prior art; since the host application and the target application use the same package name, it is not necessary for each component (Activity, Service, Broadcast Receiver and Content) of the avatar application to be called by reflection. Provider) separately constructs the main function entry (Activity Thread.main), and does not need to consider the complexity of the program implementation of the Package Manager Service verification caused by the package name, thereby greatly improving the efficiency of the program; The communication between the avatar application of the original installation package and the sandbox running environment enables the activity process of the avatar application to be further monitored by the sandbox running environment, so as to apply security policies to it, and establish the avatar application in the host application. The required resources of the program correspond to the required resources of the native application one by one, and the corresponding resources required by the avatar application can be called through the hook function in the host application to ensure that the avatar application can be loaded and maintained by the host application normally. It runs securely, and the avatar application is completely independent of the native application.
该原生应用程序、分身应用程序、“分身大师”都可以安装在智能终端上,所述智能终端可以具有如下特点:The native application, the avatar application, and the "avatar master" can all be installed on the smart terminal, and the smart terminal can have the following characteristics:
例如,终端设备的操作系统为Android系统,目标应用程序(即“分身应用程序”)为App1’,该目标应用程序欲实现原生应用程序App1的全部功能与相应服务;在终端设备的宿主应用程序中,“App1’.apk”为宿主应用程序附带资源的安装包,通过Java反射机制调用安装包“App1’.apk”,随后加载“App1’.apk”所实现的目标应用程序App1’,在宿主应用程序中加载“App1’.apk”的过程中,创建目标应用程序App1’的所需全部资源如ActivityManagerService资源、PackageManagerService资源、Activity组件、Service组件、Broadcast Receiver组件和Content Provider组件,其中,目标应用程序App1’的所需全部资源如ActivityManagerService资源、PackageManagerService资源、Activity组件、Service组件、Broadcast Receiver组件和Content Provider组件一一对应且相同于原生应用程序即在终端设备Android操作系统中运行的App1的所需全部资源如ActivityManagerService资源、PackageManagerService资源、Activity组件、Service组件、Broadcast Receiver组件和Content Provider组件。For example, the operating system of the terminal device is the Android system, and the target application (ie, the "separate application") is App1', and the target application intends to realize all the functions and corresponding services of the native application App1; the host application of the terminal device Among them, "App1'.apk" is the installation package with resources attached to the host application. The installation package "App1'.apk" is called through the Java reflection mechanism, and then the target application App1' realized by "App1'.apk" is loaded. In the process of loading "App1'.apk" in the host application, create all the resources required by the target application App1', such as ActivityManagerService resources, PackageManagerService resources, Activity components, Service components, Broadcast Receiver components and Content Provider components. Among them, the target All the resources required by the application App1', such as ActivityManagerService resources, PackageManagerService resources, Activity components, Service components, Broadcast Receiver components and Content Provider components, are in one-to-one correspondence and are the same as the native application, that is, the App1 running in the terminal device Android operating system. All required resources such as ActivityManagerService resources, PackageManagerService resources, Activity components, Service components, Broadcast Receiver components and Content Provider components.
在功能使用上,设备更加注重人性化、个性化和多功能化。随着计算机技术的发展,设备从“以设备为中心”的模式进入“以人为中心”的模式,集成了嵌入式计算、控制技术、人工智能技术以及生物认证技术等,充分体现了以人为本的宗旨。由于软件技术的发展,设备可以根据个人需求调整设置,更加个性化。同时,设备本身集成了众多软件和硬件,功能也越来越强大。In the use of functions, the equipment pays more attention to humanization, personalization and multi-function. With the development of computer technology, the equipment has changed from the "equipment-centered" model to the "people-centered" model, integrating embedded computing, control technology, artificial intelligence technology and biometric authentication technology, which fully reflects the purpose of people-oriented . Thanks to the development of software technology, the device can adjust the settings according to individual needs, making it more personalized. At the same time, the device itself integrates a lot of software and hardware, and its functions are becoming more and more powerful.
进一步,在智能终端的显示界面中,分身应用程序具有对应的快捷方式,当用户点击了该快捷方式时,就表示用户发起了启动该分身应用程序的操作指令。Further, in the display interface of the smart terminal, the avatar application program has a corresponding shortcut, and when the user clicks the shortcut, it means that the user has initiated an operation instruction to start the avatar application program.
所谓启动应用程序,其实就是加载应用程序初始页面所需要的各个组件,而加载各个组件是需要时间的,如果组件较多,那么加载的时间也会较长,从用户的角度来说,就是用户点击了快捷方式之后,经过短暂的等待才会展示应用程序的初始页面,用户体验较差。The so-called startup application is actually the various components required to load the initial page of the application, and it takes time to load each component. If there are many components, the loading time will also be longer. From the user's point of view, it is the user After the shortcut is clicked, the initial page of the application is displayed after a short wait, and the user experience is poor.
为了避免这种情况,在本申请中,当智能终端检测到该操作指令时,在启动分身应用程序的初始页面之前,先生成启动页面;其中,启动页面可以是activity类型的页面。In order to avoid this situation, in the present application, when the smart terminal detects the operation instruction, before starting the initial page of the avatar application, a startup page is generated; wherein, the startup page may be an activity type page.
需要说明的是,本申请并非只能对社交软件进行分身,社交软件仅仅只是用于举例说明,在实际应用中,本申请可以对任意应用程序进行分身,具体情况可以由用户自行选择,本申请对此不作限制。It should be noted that this application is not only for avatars of social software, and social software is only used for illustration. In practical applications, this application can avatar any application program, and the specific situation can be selected by the user. This application There is no restriction on this.
另外,用户可以直接点击分身应用程序的快捷方式,来启动分身应用程序,也可以先启动“分身大师”,然后再从“分身大师”中启动分身应用程序,二者都适用于本申请,本申请对启动分身应用程序的方式不作限制。In addition, the user can directly click on the shortcut of the avatar application to start the avatar application, or start the avatar application first, and then start the avatar application from the “avatar master”, both of which are applicable to this application. The application does not limit the way in which the avatar application can be launched.
步骤S102,展示所述启动页面,并在启动页面的下一层同时加载所述应用程序的初始页面;Step S102, displaying the startup page, and simultaneously loading the initial page of the application program at the next layer of the startup page;
初始页面,就是应用程序启动后展示的第一个页面。在本申请中,初始页面也可以是activity类型的页面。The initial page is the first page displayed after the application starts. In this application, the initial page may also be an activity type page.
具体而言,task是能包含很多activity的栈,其中,task由栈中的多个activities共同协作完成某一项应用,而不管activities具体属于哪个应用程序。例如,task a包括activity 1、activity 2,task b包括activity 3、activity 4、activity 5,task c包括activity 6、activity 7,而应用程序A包括task a和task b,应用程序B包括task b和taskc,应用程序C包括task a和task c。Specifically, a task is a stack that can contain many activities, in which a task is performed by multiple activities in the stack to complete an application, regardless of which application the activity belongs to. For example, task a includes activity 1, activity 2, task b includes activity 3, activity 4, activity 5, task c includes activity 6, activity 7, while application A includes task a and task b, and application B includes task b and taskc, application C includes task a and task c.
在本申请中,包含启动页面的activity的task与包含初始页面的activity的task不是同一个task。因为是先生成启动页面的activity,然后再启动分身应用程序的初始页面,所以,按照顺序,应该展示初始页面对应的task,但是这样就会出现“用户点击了快捷方式之后,经过短暂的等待才会展示应用程序的初始页面”的情况。因此,在本申请中,当监听到分身应用程序的activity在运行onCreate事件时,可以使用ActivityManager的moveTaskToFront(int taskId,int flags)把启动页面对应的task移动最上层,同时,将初始页面对应的task移动到启动页面对应的task的下一层。这样,初始页面的activity和启动页面的activity可以同时在前台运行,即,展示给用户的是启动页面的activity,同时初始页面的activity又不会被后台杀死。In the present application, the task of the activity containing the startup page is not the same task as the task of the activity containing the initial page. Because the activity of the startup page is generated first, and then the initial page of the avatar application is started, so, in order, the tasks corresponding to the initial page should be displayed, but this will appear "After the user clicks the shortcut, it will take a short wait. will show the initial page of the application". Therefore, in this application, when listening to the activity of the clone application running the onCreate event, you can use the moveTaskToFront(int taskId, int flags) of the ActivityManager to move the task corresponding to the startup page to the top, and at the same time, move the task corresponding to the initial page to the top. The task moves to the next level of the task corresponding to the startup page. In this way, the activity of the initial page and the activity of the start page can run in the foreground at the same time, that is, the activity of the start page is displayed to the user, and the activity of the initial page will not be killed by the background.
进一步,启动页面中可以展示文本、图片等多媒体内容,避免用户观看“白屏”,提高了用户体验。Further, multimedia content such as text and pictures can be displayed on the startup page, so as to prevent users from viewing a "white screen" and improve user experience.
步骤S103,当初始页面加载完成时,注销所述启动页面,并展示所述初始页面。Step S103, when the initial page is loaded, log out of the startup page, and display the initial page.
具体而言,当监听到分身应用程序的activity在运行onStop事件时,就表示分身应用程序的初始页面加载完成了,此时就可以注销顶层的启动页面,顶层的启动页面被注销后,自然就会展示分身应用程序的初始页面了。Specifically, when the activity of the avatar application is monitored to run the onStop event, it means that the initial page loading of the avatar application is completed. At this time, the top-level startup page can be logged out. After the top-level startup page is logged out, the The initial page of the avatar application will be displayed.
在本发明实施例中,当检测到启动应用程序的操作指令时,生成启动页面,并展示该启动页面,同时在该启动页面的下一层加载该应用程序的初始页面,当该初始页面加载完成时,注销该启动页面,就可以展示应用程序的初始页面了。这样,应用程序在启动的过程中,既可以展示启动页面,又可以在前台同时启动应用程序,解决了现有技术中“用户点击了快捷方式之后,经过短暂的等待才会展示应用程序的初始页面”的问题。In this embodiment of the present invention, when an operation instruction to start an application is detected, a startup page is generated and displayed, and an initial page of the application is loaded at the next layer of the startup page. When the initial page is loaded When you're done, log out of the splash page, and you're ready to show the app's initial page. In this way, during the startup process of the application program, the startup page can be displayed, and the application program can be simultaneously started in the foreground, which solves the problem in the prior art that "after the user clicks the shortcut, the initial stage of the application program will be displayed after a short wait. page" problem.
进一步,因为应用程序的初始页面和启动页面都是activity类型的页面,且不同的activity对应不同的task,所以,在启动二者时,既不需要用户对启动页面进行授权,又可以保证二者的activity同时运行,提高了应用程序的启动效率。Further, because the initial page and the startup page of the application are both activity-type pages, and different activities correspond to different tasks, when starting the two, it is not necessary for the user to authorize the startup page, and the two can be guaranteed. The activities run at the same time, which improves the startup efficiency of the application.
图2为本申请又一实施例提供的一种应用程序的启动装置的结构示意图,如图2所示,本实施例的装置可以包括:FIG. 2 is a schematic structural diagram of an apparatus for starting an application program provided by another embodiment of the present application. As shown in FIG. 2 , the apparatus in this embodiment may include:
生成模块201,用于检测到启动所述应用程序的操作指令时,生成启动页面;A
展示模块202,用于展示所述启动页面;A
加载模块203,用于在启动页面的下一层同时加载所述应用程序的初始页面;A
注销模块204,用于当初始页面加载完成时,注销所述启动页面,并调用所述展示模块展示所述初始页面。The
在本发明一种优选实施例中,所述展示模块包括:In a preferred embodiment of the present invention, the display module includes:
第一移动子模块,用于将包含所述启动页面的任务task移动到显示界面的顶层;The first moving submodule is used to move the task task including the startup page to the top level of the display interface;
第一展示子模块,用于在所述顶层展示所述启动页面。The first display sub-module is used to display the startup page on the top level.
在本发明一种优选实施例中,所述加载模块包括:In a preferred embodiment of the present invention, the loading module includes:
第二移动子模块,用于将所述任务task移动到所述顶层的下一层;The second moving submodule is used to move the task to the next layer of the top layer;
第一加载子模块,用于在所述顶层的下一层加载所述应用程序的初始页面。The first loading submodule is used for loading the initial page of the application program at the next layer of the top layer.
在本发明一种优选实施例中,所述初始页面和所述启动页面都为activity类型的页面。In a preferred embodiment of the present invention, both the initial page and the startup page are pages of activity type.
在本发明一种优选实施例中,所述应用程序为原生应用程序的分身应用程序。In a preferred embodiment of the present invention, the application is a separate application of the native application.
本实施例的应用程序的启动装置可执行本申请第一个实施例所示的应用程序的启动方法,其实现原理相类似,此处不再赘述。The device for starting an application program in this embodiment can execute the method for starting an application program shown in the first embodiment of the present application, and the implementation principle thereof is similar, which will not be repeated here.
本申请的又一实施例中提供了一种电子设备,该电子设备包括:存储器和处理器;至少一个程序,存储于存储器中,用于被处理器执行时,与现有技术相比可实现:当检测到启动应用程序的操作指令时,生成启动页面,并展示该启动页面,同时在该启动页面的下一层加载该应用程序的初始页面,当该初始页面加载完成时,注销该启动页面,就可以展示应用程序的初始页面了。这样,应用程序在启动的过程中,既可以展示启动页面,又可以在前台同时启动应用程序,解决了现有技术中“用户点击了快捷方式之后,经过短暂的等待才会展示应用程序的初始页面”的问题。Another embodiment of the present application provides an electronic device, the electronic device includes: a memory and a processor; at least one program, stored in the memory, for being executed by the processor, can be implemented compared with the prior art : When the operation instruction to start the application is detected, a startup page is generated, and the startup page is displayed, and the initial page of the application is loaded at the next layer of the startup page. When the initial page is loaded, the startup is logged out. page, you can display the initial page of the application. In this way, during the startup process of the application program, the startup page can be displayed, and the application program can be simultaneously started in the foreground, which solves the problem in the prior art that "after the user clicks the shortcut, the initial stage of the application program will be displayed after a short wait. page" problem.
在一个可选实施例中提供了一种电子设备,如图3所示,图3所示的电子设备3000包括:处理器3001和存储器3003。其中,处理器3001和存储器3003相连,如通过总线3002相连。可选地,电子设备3000还可以包括收发器3004。需要说明的是,实际应用中收发器3004不限于一个,该电子设备3000的结构并不构成对本申请实施例的限定。In an optional embodiment, an electronic device is provided. As shown in FIG. 3 , the
处理器3001可以是CPU,通用处理器,DSP,ASIC,FPGA或者其他可编程逻辑器件、晶体管逻辑器件、硬件部件或者其任意组合。其可以实现或执行结合本申请公开内容所描述的各种示例性的逻辑方框,模块和电路。处理器3001也可以是实现计算功能的组合,例如包含一个或多个微处理器组合,DSP和微处理器的组合等。The
总线3002可包括一通路,在上述组件之间传送信息。总线3002可以是PCI总线或EISA总线等。总线3002可以分为地址总线、数据总线、控制总线等。为便于表示,图3中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。The
存储器3003可以是ROM或可存储静态信息和指令的其他类型的静态存储设备,RAM或者可存储信息和指令的其他类型的动态存储设备,也可以是EEPROM、CD-ROM或其他光盘存储、光碟存储(包括压缩光碟、激光碟、光碟、数字通用光碟、蓝光光碟等)、磁盘存储介质或者其他磁存储设备、或者能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其他介质,但不限于此。The
存储器3003用于存储执行本申请方案的应用程序代码,并由处理器3001来控制执行。处理器3001用于执行存储器3003中存储的应用程序代码,以实现前述任一方法实施例所示的内容。The
其中,电子设备包括但不限于:移动电话、笔记本电脑、数字广播接收器、PDA(个人数字助理)、PAD(平板电脑)、PMP(便携式多媒体播放器)、车载终端(例如车载导航终端)等等的移动终端以及诸如数字TV、台式计算机等等的固定终端。Among them, electronic devices include but are not limited to: mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (such as in-vehicle navigation terminals), etc. Mobile terminals such as digital TVs, desktop computers, etc., as well as stationary terminals.
本申请的又一实施例提供了一种计算机可读存储介质,该计算机可读存储介质上存储有计算机程序,当其在计算机上运行时,使得计算机可以执行前述方法实施例中相应内容。与现有技术相比,当检测到启动应用程序的操作指令时,生成启动页面,并展示该启动页面,同时在该启动页面的下一层加载该应用程序的初始页面,当该初始页面加载完成时,注销该启动页面,就可以展示应用程序的初始页面了。这样,应用程序在启动的过程中,既可以展示启动页面,又可以在前台同时启动应用程序,解决了现有技术中“用户点击了快捷方式之后,经过短暂的等待才会展示应用程序的初始页面”的问题。Yet another embodiment of the present application provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when it runs on a computer, the computer can execute the corresponding content in the foregoing method embodiments. Compared with the prior art, when an operation instruction to start an application program is detected, a startup page is generated, and the startup page is displayed, and at the same time, the initial page of the application program is loaded at the next layer of the startup page. When you're done, log out of the splash page, and you're ready to show the app's initial page. In this way, during the startup process of the application program, the startup page can be displayed, and the application program can be simultaneously started in the foreground, which solves the problem in the prior art that "after the user clicks the shortcut, the initial stage of the application program will be displayed after a short wait. page" problem.
应该理解的是,虽然附图的流程图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,其可以以其他的顺序执行。而且,附图的流程图中的至少一部分步骤可以包括多个子步骤或者多个阶段,这些子步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,其执行顺序也不必然是依次进行,而是可以与其他步骤或者其他步骤的子步骤或者阶段的至少一部分轮流或者交替地执行。It should be understood that although the various steps in the flowchart of the accompanying drawings are sequentially shown in the order indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless explicitly stated herein, the execution of these steps is not strictly limited to the order and may be performed in other orders. Moreover, at least a part of the steps in the flowcharts of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but may be executed at different times, and the execution sequence is also It does not have to be performed sequentially, but may be performed alternately or alternately with other steps or at least a portion of sub-steps or stages of other steps.
以上所述仅是本发明的部分实施方式,应当指出,对于本技术领域的普通技术人员来说,在不脱离本发明原理的前提下,还可以做出若干改进和润饰,这些改进和润饰也应视为本发明的保护范围。The above are only some embodiments of the present invention. It should be pointed out that for those skilled in the art, without departing from the principles of the present invention, several improvements and modifications can be made. It should be regarded as the protection scope of the present invention.
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811533754.8A CN111399928B (en) | 2018-12-14 | 2018-12-14 | Application program starting method and device, electronic equipment and readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811533754.8A CN111399928B (en) | 2018-12-14 | 2018-12-14 | Application program starting method and device, electronic equipment and readable storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111399928A true CN111399928A (en) | 2020-07-10 |
CN111399928B CN111399928B (en) | 2024-09-17 |
Family
ID=71435816
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811533754.8A Active CN111399928B (en) | 2018-12-14 | 2018-12-14 | Application program starting method and device, electronic equipment and readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111399928B (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112416492A (en) * | 2020-11-18 | 2021-02-26 | 努比亚技术有限公司 | Terminal interaction method, terminal and computer readable storage medium |
CN115220672A (en) * | 2021-11-01 | 2022-10-21 | 富奥汽车零部件股份有限公司 | A layer display method, device, equipment and medium |
CN116661909A (en) * | 2023-08-01 | 2023-08-29 | 北京小米移动软件有限公司 | Application program running method and device, terminal equipment and storage medium |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106777184A (en) * | 2016-12-22 | 2017-05-31 | 北京猎豹移动科技有限公司 | A kind of page loading method, device and electronic equipment |
CN107402781A (en) * | 2017-06-26 | 2017-11-28 | 努比亚技术有限公司 | Spread its tail page display management method, terminal and computer-readable recording medium |
CN107436786A (en) * | 2017-07-28 | 2017-12-05 | 深圳Tcl新技术有限公司 | Using starting guide method, apparatus and computer-readable recording medium |
CN107908452A (en) * | 2017-11-15 | 2018-04-13 | 福建中金在线信息科技有限公司 | Multi-page starts method and device |
CN107957837A (en) * | 2017-12-30 | 2018-04-24 | 北京百度网讯科技有限公司 | Shortcut generation method, device and the terminal device of Web page application program |
US20180285173A1 (en) * | 2017-03-29 | 2018-10-04 | Microsoft Technology Licensing, Llc | Application startup control |
CN108762833A (en) * | 2018-05-16 | 2018-11-06 | 北京安云世纪科技有限公司 | Application in Android system starts method and apparatus |
CN108829487A (en) * | 2018-06-28 | 2018-11-16 | 北京五八信息技术有限公司 | A kind of methods of exhibiting of pop-up, device, storage medium and terminal |
-
2018
- 2018-12-14 CN CN201811533754.8A patent/CN111399928B/en active Active
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106777184A (en) * | 2016-12-22 | 2017-05-31 | 北京猎豹移动科技有限公司 | A kind of page loading method, device and electronic equipment |
US20180285173A1 (en) * | 2017-03-29 | 2018-10-04 | Microsoft Technology Licensing, Llc | Application startup control |
CN107402781A (en) * | 2017-06-26 | 2017-11-28 | 努比亚技术有限公司 | Spread its tail page display management method, terminal and computer-readable recording medium |
CN107436786A (en) * | 2017-07-28 | 2017-12-05 | 深圳Tcl新技术有限公司 | Using starting guide method, apparatus and computer-readable recording medium |
CN107908452A (en) * | 2017-11-15 | 2018-04-13 | 福建中金在线信息科技有限公司 | Multi-page starts method and device |
CN107957837A (en) * | 2017-12-30 | 2018-04-24 | 北京百度网讯科技有限公司 | Shortcut generation method, device and the terminal device of Web page application program |
CN108762833A (en) * | 2018-05-16 | 2018-11-06 | 北京安云世纪科技有限公司 | Application in Android system starts method and apparatus |
CN108829487A (en) * | 2018-06-28 | 2018-11-16 | 北京五八信息技术有限公司 | A kind of methods of exhibiting of pop-up, device, storage medium and terminal |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112416492A (en) * | 2020-11-18 | 2021-02-26 | 努比亚技术有限公司 | Terminal interaction method, terminal and computer readable storage medium |
CN112416492B (en) * | 2020-11-18 | 2024-06-07 | 努比亚技术有限公司 | Terminal interaction method, terminal and computer readable storage medium |
CN115220672A (en) * | 2021-11-01 | 2022-10-21 | 富奥汽车零部件股份有限公司 | A layer display method, device, equipment and medium |
CN116661909A (en) * | 2023-08-01 | 2023-08-29 | 北京小米移动软件有限公司 | Application program running method and device, terminal equipment and storage medium |
CN116661909B (en) * | 2023-08-01 | 2024-07-09 | 北京小米移动软件有限公司 | Application program running method and device, terminal equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN111399928B (en) | 2024-09-17 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20240259474A1 (en) | Method and procedure for dynamic services orchestration that runs within an on-device software container | |
JP5985631B2 (en) | Activate trust level | |
US11640457B2 (en) | System and methods for minimizing organization risk from users associated with a password breach | |
CN106471466B (en) | ephemeral application | |
US9465596B2 (en) | Cross system installation of web applications | |
US9189300B2 (en) | Dynamic service discovery | |
US10908948B2 (en) | Multiple application instances in operating systems that utilize a single process for application execution | |
WO2013133916A1 (en) | Tiers of data storage for web applications and browser extensions | |
CN114586005B (en) | System and method for hosting another browser within a browser | |
US20180025152A1 (en) | Securing multi-tenancy in a datacenter using nanoservices | |
CN111399928A (en) | Application program starting method and device, electronic equipment and readable storage medium | |
JP6276709B2 (en) | Context-sensitive application interaction | |
JP2019509567A (en) | Resource loading method, service function implementing method and apparatus for application (APP) | |
US9253056B2 (en) | System to enhance performance, throughput and reliability of an existing cloud offering | |
US20190141152A1 (en) | Web push notifications in the background | |
US20230169195A1 (en) | Database systems and methods for securely sharing a record within a conversation | |
WO2018064938A1 (en) | Method and device for realizing supporting function in application | |
WO2020064000A1 (en) | Method and apparatus for displaying message box, terminal and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |