CN113138806A - Method and device for processing mobile application running environment - Google Patents

Method and device for processing mobile application running environment Download PDF

Info

Publication number
CN113138806A
CN113138806A CN202110320382.6A CN202110320382A CN113138806A CN 113138806 A CN113138806 A CN 113138806A CN 202110320382 A CN202110320382 A CN 202110320382A CN 113138806 A CN113138806 A CN 113138806A
Authority
CN
China
Prior art keywords
environment
shortcut
mobile application
key value
value pair
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110320382.6A
Other languages
Chinese (zh)
Other versions
CN113138806B (en
Inventor
禹飞飞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
CHEZHI HULIAN (BEIJING) SCIENCE & TECHNOLOGY CO LTD
Original Assignee
CHEZHI HULIAN (BEIJING) SCIENCE & TECHNOLOGY CO LTD
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 CHEZHI HULIAN (BEIJING) SCIENCE & TECHNOLOGY CO LTD filed Critical CHEZHI HULIAN (BEIJING) SCIENCE & TECHNOLOGY CO LTD
Priority to CN202110320382.6A priority Critical patent/CN113138806B/en
Publication of CN113138806A publication Critical patent/CN113138806A/en
Application granted granted Critical
Publication of CN113138806B publication Critical patent/CN113138806B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44536Selecting among different versions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing

Abstract

The invention discloses a method and a device for processing the running environment of a mobile application, wherein in the installation process of the mobile application, shortcuts with the same number as the number of environment key value pairs in an environment key value pair list are created, shortcut names of the created shortcuts are assigned to keys of the environment key value pairs corresponding to the shortcuts, the created shortcuts are clicked by a response user, the name of the shortcut clicked at present is obtained, the key value of the key value pair corresponding to the name of the shortcut clicked at present is inquired in the environment key value pair list, and finally, an interface of a mobile application access server is set as the inquired key value, so that the mobile application runs in the running environment corresponding to the shortcut clicked at present. According to the technical scheme of the invention, the switching of the operation environment can be realized only by installing the mobile application once, so that the working efficiency of developers is improved. The invention also discloses a computing device.

Description

Method and device for processing mobile application running environment
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a processing method, a computing device, and a readable storage medium for a mobile application execution environment.
Background
The mobile application running environment refers to that in the process from the development of the mobile application to the online process, the running environments required in different development stages need to be switched back and forth in different running environments. The operating environment such as a development environment, a test environment and a production environment generally operates on the development environment in a development stage of a product, the test environment is changed into the test environment when the test stage is started after the development is completed, and the production environment needs to be configured and packaged for release after the test is passed.
Because only one mobile application with the same installation package name can exist in the same computing device, a plurality of mobile applications corresponding to different running environments cannot be installed in the same computing device. In order to solve the above problems, in the prior art, the mobile application installation package is mostly stored as a debug installation package and a releas installation package, the debug installation package and the releas installation package respectively correspond to a test environment and a production environment, the debug installation package and the releas installation package correspond to two different mobile applications, and the debug installation package and the releas installation package can be simultaneously installed on the same computing device. However, when a third operating environment, such as a development environment, is needed, an installed mobile application (e.g., a production environment) needs to be uninstalled, and the development version installation package continues to be installed, and so on, so that switching of three or more operating environments on one computing device is achieved. However, in the process of switching different operating environments on the same computing device, the installation package needs to be packaged for many times and installed and uninstalled for many times, which results in low efficiency.
Therefore, a processing method for a mobile application running environment is needed to solve the problems in the above technical solutions.
Disclosure of Invention
To this end, the present invention provides a processing method, a computing device and a readable storage medium of a mobile application execution environment to solve or at least alleviate the above-existing problems.
According to an aspect of the present invention, there is provided a processing method of a mobile application execution environment, adapted to be executed in a computing device, the computing device including a memory, the memory storing therein a list of environment key-value pairs associated with the mobile application, the list of environment key-value pairs including a plurality of environment key-value pairs, wherein a key of each environment key-value pair is an environment name of the mobile application execution environment, and a key value is a server address corresponding to the environment name, the method including:
in the installation process of the mobile application, creating shortcuts with the same number as the environment key value pairs in the environment key value pair list, wherein each shortcut corresponds to one environment key value pair, and each shortcut is bound with the mobile application;
assigning the shortcut name of the created shortcut as the key of the corresponding environment key value pair;
responding to the shortcut clicked by the user, and acquiring the name of the current clicked shortcut;
inquiring the key value of the key value pair corresponding to the name of the shortcut clicked at present in the environment key value pair list;
and setting an interface of the mobile application access server as a queried key value so that the mobile application runs under the running environment corresponding to the currently clicked shortcut.
Optionally, the step of creating shortcuts equal to the number of environment key-value pairs in the environment key-value pair list includes:
and judging whether an operating system running the mobile application meets a first condition, and if so, creating desktop shortcuts with the number equal to that of the environment key value pairs in the environment key value pair list.
Optionally, the method further comprises the step of:
if the operating system running the mobile application does not meet the first condition, continuously judging whether the number of the environment key value pairs in the environment key value pair list is larger than a first numerical value or not, if not, creating a long-press shortcut equal to the number of the environment key value pairs in the environment key value pair list, if so, sequentially reading the previous first numerical value pairs by taking the first key value pair in the environment key value pair list as an initial position, and creating the long-press shortcut with the same number as the read key value pairs.
Optionally, the operating system is an Android operating system, the first condition is whether the operating system of the mobile application is smaller than an 8.0 version, and the first numerical value is 4.
Optionally, the step of responding to the user clicking the created shortcut and acquiring the name of the currently clicked shortcut includes:
responding to the shortcut clicked by the user, and entering a mobile application home page associated with the clicked shortcut;
acquiring the name of a shortcut clicked currently;
the step of querying the key value of the key value pair corresponding to the name of the currently clicked shortcut in the environment key value pair list comprises the following steps:
transmitting the name of the currently clicked shortcut serving as a parameter to an Activity component of a home page of the mobile application;
and taking the parameter of the Activity component as a key of the environment key value pair, and inquiring the key value corresponding to the key in the environment key value pair list.
Optionally, the method further comprises the step of:
adding shortcut permission before installing the mobile application, wherein the shortcut permission comprises one or more of adding shortcut permission, removing shortcut permission, reading permission set by the mobile application and writing permission set by the mobile application.
Optionally, the operating environment includes one or more of a development environment, a testing environment, a production environment, and a production environment.
Optionally, before installing the mobile application, the method further includes the steps of:
judging whether the environment key value pair list used by the previous version of the mobile application is the same as the environment key value pair list stored in the memory, if not, creating the environment key value pair list;
saving the list of environment key-value pairs to the memory.
According to an aspect of the present invention, there is provided a computing device comprising: at least one processor; and a memory storing program instructions, wherein the program instructions are configured to be executed by the at least one processor, the program instructions comprising instructions for performing the method as described above.
According to an aspect of the present invention, there is provided a readable storage medium storing program instructions that, when read and executed by a mobile terminal, cause the computing device to perform the method as described above.
According to the technical scheme of the invention, the method for processing the running environment of the mobile application corresponds each shortcut associated with the mobile application to one running environment server address, so that the switching of a plurality of running environments is realized under the condition of installing the mobile application once. Specifically, in the process of installing the mobile application, shortcuts with the same number as the number of the environment key value pairs in the environment key value pair list are created, names of the created shortcuts are assigned to the keys of the environment key value pairs corresponding to the shortcuts, then, a user is responded to click on the created shortcuts, the name of the shortcut clicked currently is obtained, the key value of the key value pair corresponding to the name of the shortcut clicked currently is inquired in the environment key value pair list, and finally, the inquired key value is accessed to access the server corresponding to the environment name. That is, the method of the present invention can realize the switching of the operation environment only by installing the mobile application once, and the work efficiency of the developer is improved.
The foregoing description is only an overview of the technical solutions of the present invention, and the embodiments of the present invention are described below in order to make the technical means of the present invention more clearly understood and to make the above and other objects, features, and advantages of the present invention more clearly understandable.
Drawings
To the accomplishment of the foregoing and related ends, certain illustrative aspects are described herein in connection with the following description and the annexed drawings, which are indicative of various ways in which the principles disclosed herein may be practiced, and all aspects and equivalents thereof are intended to be within the scope of the claimed subject matter. The above and other objects, features and advantages of the present disclosure will become more apparent from the following detailed description read in conjunction with the accompanying drawings. Throughout this disclosure, like reference numerals generally refer to like parts or elements.
FIG. 1 shows a schematic diagram of a computing device 100, according to one embodiment of the invention;
FIG. 2 illustrates a flow diagram of a method 200 for processing a mobile application execution environment, according to one embodiment of the invention;
FIG. 3 illustrates a schematic diagram of a desktop shortcut, in accordance with an embodiment of the present invention; and
FIG. 4 shows a schematic diagram of a long press shortcut in accordance with an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
The mobile application running environment refers to that in the process from development of the mobile application to online, the running environments required in different development stages need to be switched back and forth among different running environments. The operation environment in the present invention may include a development environment, a test environment, a quasi-production environment, and a production environment, but the present invention is not limited to a specific operation environment, and all the operation environments are within the protection scope of the present invention. The quasi-production environment is that after the mobile application passes the test environment test, the performance of the mobile application is tested by using data used after the mobile application is online, and the quasi-production environment is different from the production environment in that a used server is used.
Generally, the product is operated in a development environment in a development stage, the product is changed into a test environment when entering a test stage after the development is completed, and a production environment needs to be configured and packaged for release after the test is passed. Because only one mobile application with the same installation package name exists in the same computing device, a plurality of mobile applications corresponding to different operating environments cannot be installed in the same computing device, which brings great inconvenience to switching of different operating environments in a development stage.
In order to solve the above problems, in the prior art, the mobile application installation package is mostly stored as a debug installation package and a releas installation package, the debug installation package and the releas installation package respectively correspond to a test environment and a production environment, the debug installation package and the releas installation package correspond to two different mobile applications, the debug installation package and the releas installation package can be simultaneously installed on the same computing device, and therefore switching between two operating environments on the same computing device is achieved. However, when a third execution environment, such as a development environment, is needed, it is necessary to uninstall an already installed mobile application (e.g., a releas version installation package), and continue to install the development version installation package, and so on, so as to implement switching multiple execution environments on the same computing device. However, in the process of switching different operating environments on the same computing device, the installation package needs to be packaged for many times and installed and uninstalled for many times, which results in low efficiency.
Therefore, the invention provides a mobile application running environment processing method, which corresponds each shortcut associated with the mobile application to a running environment server address, thereby realizing the switching of a plurality of running environments under the condition of installing the mobile application once. Specifically, in the process of installing the mobile application, shortcuts with the same number as the number of the environment key value pairs in the environment key value pair list are created, names of the created shortcuts are assigned to the keys of the environment key value pairs corresponding to the shortcuts, then, a user is responded to click on the created shortcuts, the name of the shortcut clicked currently is obtained, the key value of the key value pair corresponding to the name of the shortcut clicked currently is inquired in the environment key value pair list, and finally, the inquired key value is accessed to access the server corresponding to the environment name. That is, the method of the present invention can realize the switching of the operation environment only by installing the mobile application once, and does not need to pack the installation package for many times and uninstall and install the mobile application for many times, thereby having simple and convenient realization, reducing the workload of developers and improving the working efficiency of the developers.
The processing method of the mobile application running environment provided by the invention is executed in the computing device, and fig. 1 shows a structural diagram of the computing device 100 according to one embodiment of the invention. A block diagram of a computing device 100 as shown in fig. 1, in a basic configuration 102, the computing device 100 typically includes a system memory 106 and one or more processors 104. A memory bus 108 may be used for communication between the processor 104 and the system memory 106.
Depending on the desired configuration, the processor 104 may be any type of processing, including but not limited to: a microprocessor (μ P), a microcontroller (μ C), a Digital Signal Processor (DSP), or any combination thereof. The processor 104 may include one or more levels of cache, such as a level one cache 110 and a level two cache 112, a processor core 114, and registers 116. The example processor core 114 may include an Arithmetic Logic Unit (ALU), a Floating Point Unit (FPU), a digital signal processing core (DSP core), or any combination thereof. The example memory controller 118 may be used with the processor 104, or in some implementations the memory controller 118 may be an internal part of the processor 104.
Depending on the desired configuration, system memory 106 may be any type of memory, including but not limited to: volatile memory (such as RAM), non-volatile memory (such as ROM, flash memory, etc.), or any combination thereof. System memory 106 may include an operating system 120, one or more applications 122, and program data 124. In some embodiments, application 122 may be arranged to operate with program data 124 on an operating system. The program data 124 includes instructions, and in the computing device 100 according to the present invention, the program data 124 contains instructions for performing the mobile application execution environment processing method 200.
The computing device 100 further includes a storage device 132, and the storage device 132 of the computing device 100 is a memory for storing the environment key-value pair list according to the present invention. The storage device 132 includes removable storage 136 and non-removable storage 138, both the removable storage 136 and the non-removable storage 138 being connected to the storage interface bus 134. In the present invention, the data related to each event occurring during the program execution process and the time information indicating the occurrence of each event may be stored in the storage device 132, and the operating system 120 is adapted to manage the storage device 132. The storage device 132 may be a magnetic disk.
Computing device 100 may also include an interface bus 140 that facilitates communication from various interface devices (e.g., output devices 142, peripheral interfaces 144, and communication devices 146) to the basic configuration 102 via the bus/interface controller 130. The example output device 142 includes a graphics processing unit 148 and an audio processing unit 150. They may be configured to facilitate communication with various external devices, such as a display or speakers, via one or more a/V ports 152. Example peripheral interfaces 144 may include a serial interface controller 154 and a parallel interface controller 156, which may be configured to facilitate communication with external devices such as input devices (e.g., keyboard, mouse, pen, voice input device, touch input device) or other peripherals (e.g., printer, scanner, etc.) via one or more I/O ports 158. An example communication device 146 may include a network controller 160, which may be arranged to facilitate communications with one or more other computing devices 162 over a network communication link via one or more communication ports 164.
A network communication link may be one example of a communication medium. Communication media may typically be embodied by computer readable instructions, data structures, program modules, and may include any information delivery media, such as carrier waves or other transport mechanisms, in a modulated data signal. A "modulated data signal" may be a signal that has one or more of its data set or its changes made in such a manner as to encode information in the signal. By way of non-limiting example, communication media may include wired media such as a wired network or private-wired network, and various wireless media such as acoustic, Radio Frequency (RF), microwave, Infrared (IR), or other wireless media. The term computer readable media as used herein may include both storage media and communication media.
Computing device 100 may be implemented as a server, such as a file server, a database server, an application server, a WEB server, etc., or as part of a small-form factor portable (or mobile) electronic device, such as a cellular telephone, a Personal Digital Assistant (PDA), a personal media player device, a wireless WEB-watch device, a personal headset device, an application specific device, or a hybrid device that include any of the above functions. Computing device 100 may also be implemented as a personal computer including both desktop and notebook computer configurations. In some embodiments, the computing device 100 is configured to perform a processing method 200 for a mobile application execution environment in accordance with the present invention.
FIG. 2 shows a schematic flow diagram of a processing method 200 of a mobile application execution environment according to one embodiment of the invention. The method 200 is adapted to be executed in the computing device 100, the method 200 starting at step S210. Before step S210 is executed, that is, before the mobile application is installed, it needs to be determined in advance whether the environment key-value pair list used by the previous version of the mobile application is the same as the environment key-value pair list stored in the storage device 132 of the computing device 100 and associated with the mobile application, and if the environment key-value pair list is the same, it indicates that the environment key-value pair list already exists, and in order to prevent confusion caused by repeated definitions, the environment key-value pair list is not created, but the environment key-value pair list stored by the previous version of the mobile application is continuously used. If not, then the same list of environment key-value pairs as used by the previous version of the mobile application needs to be created.
The environment key value pair list includes a plurality of environment key value pairs, a key (key) of each environment key value pair is an environment name of the mobile application running environment, and a key value (value) is a server address corresponding to the environment name, that is, a server URL. The environment key-value pairs are predefined by a developer or tester according to a desired operating environment, and the computing device 100 generates a list of key-value pairs based on the defined key-value pairs and then stores the list of environment key-value pairs in the storage device 132 of the computing device 100. The environment key-value pair list is shown in table 1:
TABLE 1
List
("Debug","http://debug.com.cn")
("Test","http://test.com.cn")
("PreProduct","http://preproduct.com.cn")
("Product","http://product.com.cn")
"Debug", "Test", "pre Product", "Product" in table 1 are keys of key value pairs respectively indicating development environment, Test environment, quasi-production environment, and "http:// debug.com.cn", "http:// test.com.cn", "http:// pre product.com.cn", "http:// product.com.cn" are values of key value pairs respectively indicating development environment server address (development environment server URL), Test environment server address (Test environment server URL), quasi-production environment server address (quasi-production environment server URL), and production environment server address (production environment server URL). Of course, the environment key-value pair may also include key-value pairs of other operating environments, which are not specifically limited herein, and all operating environments are within the scope of the present invention.
Then, in step S210, during the installation process of the mobile application, shortcuts equal to the number of environment key value pairs in the environment key value pair list are created, where each shortcut corresponds to one environment key value pair, and the shortcuts and the mobile application are bound to each other. Since the mobile application and the shortcut are bound to each other, when the mobile application is uninstalled, the shortcut bound thereto is also deleted.
Specifically, whether an operating system running the mobile application meets a first condition is judged, and if yes, desktop shortcuts equal to the number of the environment key value pairs in the environment key value pair list are created. If the operating system running the mobile application does not meet the first condition, continuously judging whether the number of the environment key value pairs in the environment key value pair list is larger than a first numerical value or not, if not, creating a long-press shortcut equal to the number of the environment key value pairs in the environment key value pair list, if so, sequentially reading the first numerical value pairs by taking the position of the first environment key value pair in the environment key value pair list as an initial position, and creating the long-press shortcut with the same number as the read key value pairs. The operating system is an android operating system, which is a Linux-based operating system with free and open source codes and is mainly used for mobile devices such as smart phones and tablet computers.
In one embodiment, for example, whether the Android operating system for running the mobile application is smaller than the 8.0 version is taken as the first condition. When the Android operating system is known to be smaller than the 8.0 version, the number of shortcut entries associated with the mobile application is not limited, and only desktop shortcut entries associated with the mobile application are created. And when the Android operating system is in a version above 8.0, each mobile application is associated with 4 shortcut entries at most, so that the first value is set to 4, but two shortcut entries associated with the mobile application are created, namely a desktop shortcut entry and a long press shortcut entry. It should be noted that the shortcut icon is a shortcut entry for the shortcut to enter the home page of the mobile application, and the mobile application icon is a mobile application entry for the mobile application to enter the home page of the mobile application
In one embodiment, since ShortcutManager classes are provided to manage the creation of shortcuts from the Android8.0 version, and two shortcuts are provided, namely a long-press shortcut and a desktop shortcut, but the desktop shortcut requires stricter authority check and a user actively clicks to add the shortcut, the compatibility and the usability of the shortcut are considered, so that the long-press shortcut is used when the Android operating system is in the version above 8.0.
Fig. 3 is a schematic diagram of desktop shortcuts, and it can be seen from fig. 3 that the names of two desktop shortcut icons 310 corresponding to the mobile application are Debug and Test, and the sizes of the desktop shortcut icons 310 and the mobile application icons bound to the desktop shortcuts are the same, where each desktop shortcut icon corresponds to one desktop shortcut. Fig. 4 is a schematic diagram of long press shortcuts, which is the same as the desktop shortcuts, and each long press shortcut icon corresponds to a long press shortcut. The long press of the mobile application displays the shortcut list 420 of the mobile application, and it is assumed that the Android operating system of the mobile application is 8.1 version, so that only 4 long press shortcut icons can be displayed in the shortcut list at most. As shown in fig. 4, the shortcut list 420 includes four long-press shortcut icons 410, including Debug, Test, pre-Product, and Product, respectively, and the 4 long-press shortcuts corresponding to the 4 long-press shortcut icons are associated with the mobile application, and the long-press shortcut icon 410 is smaller than the mobile application icon compared to the size of the mobile application icon. ,
it should be noted that before creating a shortcut, a right needs to be added to the shortcut. In one embodiment, the authority supporting the addition and removal of the shortcut is added to a list of the list, such as android manifest. Meanwhile, in some computing devices 100, the addition permission of the desktop shortcut may be closed by default, so that the read permission and the write permission set for the mobile application also need to be added. An example of code for registering a shortcut right is as follows:
< | A! -adding shortcuts >
<uses-permission android:name="com.android.launcher.permission.INSTALL_SHORTCUT"/>
< | A! - - -remove shortcut- - >)
<uses-permission android:name="com.android.launcher.permission.UNINSTALL_SHORTCUT"/>
< | A! -Mobile application sets read permission >
<uses-permission android:name="com.android.launcher.permission.READ_SETTINGS"/>
< | A! -Mobile application set write permission >
<uses-permission android:name="com.android.launcher.permission.WRITE_SETTINGS"/>
In one embodiment, for example, whether the Android operating system for running the mobile application is smaller than the 8.0 version is taken as the first condition. Judging whether the Android operating system for running the mobile application is smaller than the 8.0 version, if so, creating desktop shortcuts with the number equal to that of the environment key value pairs in the environment key value pair list, wherein code examples are as follows:
Figure BDA0002992626230000101
if the android system for running the mobile application is larger than or equal to the 8.0 version, continuously judging whether the number of the environment key value pairs in the environment key value pair list is larger than 4, if not, creating long-press shortcuts which are equal to the number of the environment key value pairs in the environment key value pair list, if so, sequentially reading the four key value pair pairs by taking the position of the first key value pair in the environment key value pair list as an initial position, and creating the long-press shortcuts which are the same as the selected key value pairs in number. If five operating environments are needed, the created shortcut needs to be deleted, and because the authority for removing and adding the shortcut is registered, one created shortcut (for example, developing the environment shortcut) can be deleted, the remaining environment key-value pair in the environment key-value pair list is continuously read, and the same number of long-press shortcuts as the read key-value pair can be created.
In one embodiment, the specific process of creating the same number of long press shortcuts as key-value pairs that have been read is as follows: the computing device 100 first obtains an instance shortcutManager of the operating system SERVICE short _ SERVICE by using the current Activity component, then traverses the environment key-value pair list to generate a corresponding shortcutlnfo list, and then calls a method setdynamicshortcutfor () by the instance shortcutManager and transmits the generated shortcutlnfo list, so that a corresponding number of long-press SHORTCUTs can be generated according to the environment key-value pair list. After the shortcut is generated, if the mobile application icon needs to be pressed for a long time, a shortcut menu pops up, such as a shortcut list popped up by pressing the pay icon for a long time as shown in fig. 4. Of course, the present invention does not specifically limit the above manner, so that a method for creating the same number of long-press shortcuts as the selected key-value pairs is within the protection scope of the present invention. An example of the above code for creating the same number of long-press shortcuts as the selected key-value pairs is as follows:
Figure BDA0002992626230000111
Figure BDA0002992626230000121
next, in step S220, the shortcut name of the created shortcut is assigned to the key of its corresponding environment key-value pair, for example, as the keys of the environment key-value pairs in table 1 are "Debug", "Test", "pre Product", "Product", respectively, then the shortcut names of the created shortcut are Debug, Test, pre Product, respectively.
Then, in step S230, in response to the user clicking the created shortcut, the name of the currently clicked shortcut is obtained, and in step S240, the key value of the key-value pair corresponding to the name of the currently clicked shortcut is queried in the environment key-value pair list. In one embodiment, in response to the user clicking a created shortcut icon (e.g., a development environment shortcut icon), entering a home page of the mobile application bound to the shortcut, at which point the computing device 100 will transmit a shortcut name (Debug, i.e., a development environment) as a parameter to an Activity component of the home page of the mobile application, query a value corresponding to the key in an environment key-value pair list (at which point the value is "Debug"), and use the queried value as a parameter to the unified environment exit function. Of course, the present invention does not specifically limit the above-mentioned manner, so that the method for obtaining the shortcut name and querying the key value of the key value pair corresponding to the currently clicked shortcut name in the environment key value pair list is within the protection scope of the present invention.
Wherein, the Activity component is a mobile application component, the user can interact with the screen provided by the Activity component, and the content which can be seen in the mobile application is mostly provided by the Activity component. Meanwhile, Activities can jump among different Activities, different pages are connected in series to finish a specific operation process together, and each application consists of one or more Activities and is an indispensable part in the Android mobile application.
Finally, in step S250, the interface of the mobile application accessing the server is set to the queried key value, where the interface is the server address where each function module of the mobile application interacts with the server, in the present invention, each interface where each function module of the mobile application interacts with the server is set to the queried key value (at this time, the key value is "http:// debug.com.cn"), that is, each function module of the mobile application interacts with the queried key value, that is, each function module of the mobile application interacts with the queried server address (the server address is the server address corresponding to the shortcut clicked at present). Each functional module of the mobile application can access the server corresponding to the server address through the server address, and each functional module of the mobile application accesses the server, which is equivalent to the fact that the mobile application runs in the server, so that the mobile application runs in the running environment corresponding to the currently clicked shortcut.
By the method, each shortcut associated with the mobile application corresponds to one running environment server address, so that switching of a plurality of running environments is realized under the condition of installing the mobile application once. Specifically, in the process of installing the mobile application, shortcuts with the same number as the number of the environment key value pairs in the environment key value pair list are created, names of the created shortcuts are assigned to the keys of the environment key value pairs corresponding to the shortcuts, then, a user is responded to click on the created shortcuts, the name of the shortcut clicked currently is obtained, the key value of the key value pair corresponding to the name of the shortcut clicked currently is inquired in the environment key value pair list, and finally, the inquired key value is accessed to access the server corresponding to the environment name. That is, the method of the present invention can realize the switching of a plurality of operating environments only by installing the mobile application once, and the method is simple and convenient to realize, reduces the workload of developers, and improves the working efficiency of the developers.
The various techniques described herein may be implemented in connection with hardware or software or, alternatively, with a combination of both. Thus, the methods and apparatus of the present invention, or certain aspects or portions thereof, may take the form of program code (i.e., instructions) embodied in tangible media, such as removable hard drives, U.S. disks, floppy disks, CD-ROMs, or any other machine-readable storage medium, wherein, when the program is loaded into and executed by a machine, such as a computer, the machine becomes an apparatus for practicing the invention.
In the case of program code execution on programmable computers, the mobile terminal generally includes a processor, a storage medium readable by the processor (including volatile and non-volatile memory and/or storage elements), at least one input device, and at least one output device. Wherein the memory is configured to store program code; the processor is configured to execute the processing method of the mobile application execution environment of the present invention according to instructions in the program code stored in the memory.
By way of example, and not limitation, readable media may comprise readable storage media and communication media. Readable storage media store information such as computer readable instructions, data structures, program modules or other data. Communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media. Combinations of any of the above are also included within the scope of readable media.
In the description provided herein, algorithms and displays are not inherently related to any particular computer, virtual system, or other apparatus. Various general purpose systems may also be used with examples of this invention. The required structure for constructing such a system will be apparent from the description above. Moreover, the present invention is not directed to any particular programming language. It is appreciated that a variety of programming languages may be used to implement the teachings of the present invention as described herein, and any descriptions of specific languages are provided above to disclose the best mode of the invention.
In the description provided herein, numerous specific details are set forth. It is understood, however, that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the disclosure and aiding in the understanding of one or more of the various inventive aspects. However, the disclosed method should not be interpreted as reflecting an intention that: that the invention as claimed requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of this invention.
Those skilled in the art will appreciate that the modules or units or components of the devices in the examples disclosed herein may be arranged in a device as described in this embodiment or alternatively may be located in one or more devices different from the devices in this example. The modules in the foregoing examples may be combined into one module or may be further divided into multiple sub-modules.
Those skilled in the art will appreciate that the modules in the device in an embodiment may be adaptively changed and disposed 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 furthermore they may be divided into a plurality of sub-modules or sub-units or sub-components. All of the features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or elements of any method or apparatus so disclosed, may be combined in any combination, except combinations where at least some of such features and/or processes or elements are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
Furthermore, those skilled in the art will appreciate that while some embodiments described herein include some features included in other embodiments, rather than other features, combinations of features of different embodiments are meant to be within the scope of the invention and form different embodiments. For example, in the following claims, any of the claimed embodiments may be used in any combination.
Furthermore, some of the described embodiments are described herein as a method or combination of method elements that can be performed by a processor of a computer system or by other means of performing the described functions. A processor having the necessary instructions for carrying out the method or method elements thus forms a means for carrying out the method or method elements. Further, the elements of the apparatus embodiments described herein are examples of the following apparatus: the apparatus is used to implement the functions performed by the elements for the purpose of carrying out the invention.
As used herein, unless otherwise specified the use of the ordinal adjectives "first", "second", "third", etc., to describe a common object, merely indicate that different instances of like objects are being referred to, and are not intended to imply that the objects so described must be in a given sequence, either temporally, spatially, in ranking, or in any other manner.
While the invention has been described with respect to a limited number of embodiments, those skilled in the art, having benefit of this description, will appreciate that other embodiments can be devised which do not depart from the scope of the invention as described herein. Furthermore, it should be noted that the language used in the specification has been principally selected for readability and instructional purposes, and may not have been selected to delineate or circumscribe the inventive subject matter. Accordingly, many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the appended claims. The present invention has been disclosed in an illustrative rather than a restrictive sense with respect to the scope of the invention, as defined in the appended claims.

Claims (10)

1. A method of processing a mobile application execution environment, adapted to be executed in a computing device, the computing device including a memory, the memory storing therein a list of environment key-value pairs associated with the mobile application, the list of environment key-value pairs including a plurality of environment key-value pairs, wherein a key of each environment key-value pair is an environment name of the mobile application execution environment and a key value is a server address corresponding to the environment name, the method comprising:
in the installation process of the mobile application, creating shortcuts with the same number as the environment key value pairs in the environment key value pair list, wherein each shortcut corresponds to one environment key value pair, and each shortcut is bound with the mobile application;
assigning the shortcut name of the created shortcut as the key of the corresponding environment key value pair;
responding to the shortcut clicked by the user, and acquiring the name of the current clicked shortcut;
inquiring the key value of the key value pair corresponding to the name of the shortcut clicked at present in the environment key value pair list;
and setting an interface of the mobile application access server as a queried key value so that the mobile application runs under the running environment corresponding to the currently clicked shortcut.
2. The method of claim 1, wherein the step of creating shortcuts equal to the number of environment key-value pairs in the list of environment key-value pairs comprises:
and judging whether an operating system running the mobile application meets a first condition, and if so, creating desktop shortcuts with the number equal to that of the environment key value pairs in the environment key value pair list.
3. The method of claim 2, further comprising the steps of:
if the operating system running the mobile application does not meet the first condition, continuously judging whether the number of the environment key value pairs in the environment key value pair list is larger than a first numerical value or not, if not, creating a long-press shortcut equal to the number of the environment key value pairs in the environment key value pair list, if so, sequentially reading the previous first numerical value pairs by taking the first key value pair in the environment key value pair list as an initial position, and creating the long-press shortcut with the same number as the read key value pairs.
4. The method according to claim 2 or 3, wherein the operating system is an Android operating system, the first condition is whether the operating system of the mobile application is less than 8.0 version, and the first value is 4.
5. The method of any one of claims 1 to 4, wherein the step of acquiring the name of the currently clicked shortcut in response to the user clicking the created shortcut comprises:
responding to the shortcut clicked by the user, and entering a mobile application home page associated with the clicked shortcut;
acquiring the name of a shortcut clicked currently;
the step of querying the key value of the key value pair corresponding to the name of the currently clicked shortcut in the environment key value pair list comprises the following steps:
transmitting the name of the currently clicked shortcut serving as a parameter to an Activity component of a home page of the mobile application;
and taking the parameter of the Activity component as a key of the environment key value pair, and inquiring the key value corresponding to the key in the environment key value pair list.
6. The method of any of claims 1 to 5, further comprising the step of:
adding shortcut permission before installing the mobile application, wherein the shortcut permission comprises one or more of adding shortcut permission, removing shortcut permission, reading permission set by the mobile application and writing permission set by the mobile application.
7. The method of any of claims 1-6, wherein the runtime environment comprises one or more of a development environment, a test environment, a production-ready environment, and a production environment.
8. The method of any of claims 1 to 7, further comprising, prior to installing the mobile application, the steps of:
judging whether the environment key value pair list used by the previous version of the mobile application is the same as the environment key value pair list stored in the memory, if not, creating the environment key value pair list;
saving the list of environment key-value pairs to the memory.
9. A computing device, comprising:
at least one processor; and
a memory storing program instructions, wherein the program instructions are configured to be adapted to be executed by the at least one processor, the program instructions comprising instructions for performing the method of any of claims 1-8.
10. A readable storage medium storing program instructions that, when read and executed by a mobile terminal, cause the computing device to perform the method of any of claims 1-8.
CN202110320382.6A 2021-03-25 2021-03-25 Processing method and device for mobile application running environment Active CN113138806B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110320382.6A CN113138806B (en) 2021-03-25 2021-03-25 Processing method and device for mobile application running environment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110320382.6A CN113138806B (en) 2021-03-25 2021-03-25 Processing method and device for mobile application running environment

Publications (2)

Publication Number Publication Date
CN113138806A true CN113138806A (en) 2021-07-20
CN113138806B CN113138806B (en) 2023-11-07

Family

ID=76810461

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110320382.6A Active CN113138806B (en) 2021-03-25 2021-03-25 Processing method and device for mobile application running environment

Country Status (1)

Country Link
CN (1) CN113138806B (en)

Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1622077A (en) * 2003-11-28 2005-06-01 中国科学院软件研究所 Method and system for automatically creating and managing graphical user interface session of remote terminal
CN102195987A (en) * 2011-05-31 2011-09-21 成都七巧软件有限责任公司 Distributed credibility authentication method and system thereof based on software product library
CN103699413A (en) * 2013-12-24 2014-04-02 北京奇虎科技有限公司 Method and system for optimizing game operating environment, client and server
CN104090745A (en) * 2014-04-18 2014-10-08 北京奇虎科技有限公司 Method and device for optimizing game running environment
CN104267994A (en) * 2014-09-30 2015-01-07 北京奇虎科技有限公司 Application running device and terminal device
CN104850775A (en) * 2014-02-14 2015-08-19 北京奇虎科技有限公司 Method and device for assessing safety of application program
CN106648742A (en) * 2016-10-19 2017-05-10 武汉斗鱼网络科技有限公司 One-key deployment method and system for PHP operating environment
CN106656650A (en) * 2016-10-08 2017-05-10 腾讯科技(深圳)有限公司 Business test environment generation method and system and business test method, device and system
CN106933589A (en) * 2017-03-13 2017-07-07 车智互联(北京)科技有限公司 A kind of message queue component based on configuration and its integrated method
CN107368304A (en) * 2017-06-28 2017-11-21 北京五八信息技术有限公司 Creation method, terminal and the storage medium of desktop shortcuts
CN109388453A (en) * 2018-09-07 2019-02-26 Oppo广东移动通信有限公司 Methods of exhibiting, device, storage medium and the electronic equipment of application page
CN109684201A (en) * 2018-11-26 2019-04-26 平安科技(深圳)有限公司 It is switched fast the method, apparatus, computer equipment and storage medium of running environment
CN109739756A (en) * 2018-12-27 2019-05-10 上海连尚网络科技有限公司 The method and apparatus of mobile terminal application test
CN111510554A (en) * 2020-04-03 2020-08-07 深圳传音控股股份有限公司 Dial switching method, dial switching equipment and storage medium
CN112416466A (en) * 2020-12-02 2021-02-26 车智互联(北京)科技有限公司 Application program loading method, mobile terminal and readable storage medium

Patent Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1622077A (en) * 2003-11-28 2005-06-01 中国科学院软件研究所 Method and system for automatically creating and managing graphical user interface session of remote terminal
CN102195987A (en) * 2011-05-31 2011-09-21 成都七巧软件有限责任公司 Distributed credibility authentication method and system thereof based on software product library
CN103699413A (en) * 2013-12-24 2014-04-02 北京奇虎科技有限公司 Method and system for optimizing game operating environment, client and server
CN104850775A (en) * 2014-02-14 2015-08-19 北京奇虎科技有限公司 Method and device for assessing safety of application program
CN104090745A (en) * 2014-04-18 2014-10-08 北京奇虎科技有限公司 Method and device for optimizing game running environment
CN104267994A (en) * 2014-09-30 2015-01-07 北京奇虎科技有限公司 Application running device and terminal device
CN106656650A (en) * 2016-10-08 2017-05-10 腾讯科技(深圳)有限公司 Business test environment generation method and system and business test method, device and system
CN106648742A (en) * 2016-10-19 2017-05-10 武汉斗鱼网络科技有限公司 One-key deployment method and system for PHP operating environment
CN106933589A (en) * 2017-03-13 2017-07-07 车智互联(北京)科技有限公司 A kind of message queue component based on configuration and its integrated method
CN107368304A (en) * 2017-06-28 2017-11-21 北京五八信息技术有限公司 Creation method, terminal and the storage medium of desktop shortcuts
CN109388453A (en) * 2018-09-07 2019-02-26 Oppo广东移动通信有限公司 Methods of exhibiting, device, storage medium and the electronic equipment of application page
CN109684201A (en) * 2018-11-26 2019-04-26 平安科技(深圳)有限公司 It is switched fast the method, apparatus, computer equipment and storage medium of running environment
CN109739756A (en) * 2018-12-27 2019-05-10 上海连尚网络科技有限公司 The method and apparatus of mobile terminal application test
CN111510554A (en) * 2020-04-03 2020-08-07 深圳传音控股股份有限公司 Dial switching method, dial switching equipment and storage medium
CN112416466A (en) * 2020-12-02 2021-02-26 车智互联(北京)科技有限公司 Application program loading method, mobile terminal and readable storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
江剑, 李永新, 牛国柱: "基于组态软件与VB的远程通信的实现", 微计算机信息, no. 09, pages 69 - 70 *
薛红勋;: "河南省山洪灾害监测预警系统技术路线与系统架构", 河南水利与南水北调, no. 12, pages 29 - 30 *

Also Published As

Publication number Publication date
CN113138806B (en) 2023-11-07

Similar Documents

Publication Publication Date Title
CN109325195B (en) Rendering method and system for browser, computer device and computer storage medium
US7146613B2 (en) JAVA DSP acceleration by byte-code optimization
CN108958844B (en) Application program control method and terminal
CN107967135B (en) Calculation engine implementation method, electronic device and storage medium
CN108549568B (en) Application entry processing method and device, storage medium and electronic equipment
CN113434205B (en) Operating system starting method and computing device
CN111563024A (en) Method and device for monitoring container process on host machine and computing equipment
WO2018040270A1 (en) Method and device for loading linux-system elf file in windows system
CN112905472A (en) Kernel debugging system and method
CN113885936A (en) Solution method for software package dependence in customized mirror image
CN106599257B (en) Method for realizing page shortcut and electronic equipment
RU2616164C9 (en) Methods and device for browser engine work
CN113204385A (en) Plug-in loading method and device, computing equipment and readable storage medium
CN113138806B (en) Processing method and device for mobile application running environment
CN113961086B (en) Shortcut key implementation method, computing device and storage medium
CN115840618A (en) Access method and device for virtual machine simulation equipment register in hypervisor
CN112905931B (en) Page information display method and device, electronic equipment and storage medium
CN102184112B (en) Method and device for upgrading widget
JP4472706B2 (en) A system for dynamically registering privileged mode hooks on a device
CN114168937A (en) Resource access method, computing device and readable storage medium
CN113535650A (en) File naming method and computing device
CN109274758B (en) Request message processing method and computing device
CN114461223A (en) Code generation method and device and terminal equipment
CN106775726B (en) Method for downloading application and electronic terminal
CN113835927B (en) Instruction execution method, computing device 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