CN113138806B - Processing method and device for mobile application running environment - Google Patents

Processing method and device for mobile application running environment Download PDF

Info

Publication number
CN113138806B
CN113138806B CN202110320382.6A CN202110320382A CN113138806B CN 113138806 B CN113138806 B CN 113138806B CN 202110320382 A CN202110320382 A CN 202110320382A CN 113138806 B CN113138806 B CN 113138806B
Authority
CN
China
Prior art keywords
environment
shortcut
key value
mobile application
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.)
Active
Application number
CN202110320382.6A
Other languages
Chinese (zh)
Other versions
CN113138806A (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 Interconnection Beijing Technology Co ltd
Original Assignee
Chezhi Interconnection Beijing 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 Interconnection Beijing Technology Co ltd filed Critical Chezhi Interconnection Beijing 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

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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Stored Programmes (AREA)

Abstract

The invention discloses a processing method and a device for a mobile application running environment, wherein in the process of installing a mobile application, a shortcut which is equal to the number of environmental key values in an environmental key value pair list is created, the shortcut name of the created shortcut is assigned as the key of the corresponding environmental key value pair, the user is responded to click on the created shortcut to obtain the currently clicked shortcut name, the key of the key value pair corresponding to the currently clicked shortcut name is inquired in the environmental key value pair list, and finally the 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 currently clicked shortcut. According to the technical scheme, the switching of the running environment can be realized only by installing the mobile application once, and the working efficiency of developers is improved. The invention also discloses a computing device.

Description

Processing method and device for 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 operating environment.
Background
The mobile application running environment refers to the running environment required by different development stages in the process of developing the mobile application to online, and needs to be switched back and forth in different running environments. The running environment such as development environment, test environment and production environment generally runs on the development environment in the development stage of the product, and after the development is completed, the running environment enters the test stage and is changed into the test environment, and after the test is passed, the production environment needs to be configured for packaging and release.
Since only one mobile application with the same installation package name exists 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-mentioned problems, in the prior art, the mobile application installation package is often stored as two version installation packages of debug and release, and the two version installation packages of debug and release correspond to the test environment and the production environment respectively, and these two version installation packages are equivalent to two different mobile applications, and these two version installation packages can be installed on the same computing device at the same time. But when a third operating environment, such as a development environment, is needed, it is necessary to uninstall an already installed mobile application (e.g., production environment), and continue installing development version installation packages, and so on, to effect a switchover of three and more operating environments on one computing device. However, in the process of switching different operation environments on the same computing device, the above scheme needs to package the installation package multiple times and install and uninstall the installation package multiple times, resulting in low efficiency.
For this reason, a processing method of the 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, computing device and readable storage medium of a mobile application running environment to solve or at least alleviate the above-presented problems.
According to one 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 comprising a memory in which a list of environment key-value pairs associated with the mobile application is stored, the list of environment key-value pairs comprising 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:
creating shortcuts equal to the number of the environment key values in the environment key value pair list in the installation process of the mobile application, wherein each shortcut corresponds to one environment key value pair, and each shortcut is mutually bound with the mobile application;
assigning a shortcut name of the created shortcut to be a key of the corresponding environment key value pair;
responding to the created shortcut clicked by the user, and acquiring the name of the currently clicked shortcut;
inquiring a key value of a key value pair corresponding to the currently clicked shortcut name in the environment key value pair list;
and setting an interface of the mobile application access server as the queried key value so that the mobile application runs under the running environment corresponding to the currently clicked shortcut.
Optionally, the step of creating a shortcut equal to the number of environment key pairs in the list of environment key pairs comprises:
and judging whether an operating system running the mobile application meets a first condition, if so, creating a desktop shortcut which is equal to the environment key value pair number 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, continuing to judge whether the number of the environmental key value pairs in the environmental key value pair list is larger than a first numerical value, if not, creating a long-press shortcut equal to the number of the environmental key value pairs in the environmental key value pair list, if so, taking the first key value pair in the environmental key value pair list as a starting position, sequentially reading the first numerical key value pair, 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 8.0 version, and the first value is 4.
Optionally, the step of obtaining the name of the currently clicked shortcut in response to the user clicking on the created shortcut includes:
responding to the user clicking the created shortcut, and entering a mobile application home page correlated with the clicked shortcut;
acquiring the name of a shortcut clicked currently;
wherein, the step of querying the key value of the key value pair corresponding to the currently clicked shortcut name in the environment key value pair list includes:
transmitting the currently clicked shortcut name as a parameter to an Activity component of the 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 a key value corresponding to the key in the environment key value pair list.
Optionally, the method further comprises the step of:
before the mobile application is installed, adding shortcut rights, wherein the shortcut rights comprise one or more of adding shortcut rights, removing shortcut rights, reading rights set by the mobile application and writing rights set by the mobile application.
Optionally, the operating environment includes one or more of a development environment, a testing environment, a quasi-production environment, and a production environment.
Optionally, before installing the mobile application, the method further comprises the steps of:
judging whether an 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;
and storing the environment key value pair list to the memory.
According to one 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 adapted to be executed by the at least one processor, the program instructions comprising instructions for performing the method as described above.
According to one aspect of the present invention there is provided a readable storage medium storing program instructions which, when read and executed by a mobile terminal, cause the computing device to perform a method as described above.
According to the technical scheme of the invention, a processing method of the mobile application running environment is provided, and each shortcut associated with the mobile application corresponds to an running environment server address, so that under the condition of installing the mobile application once, the switching of a plurality of running environments is realized. Specifically, in the process of installing the mobile application, creating a shortcut equal to the number of the environmental key values in the environmental key value pair list, assigning a key of the corresponding environmental key value pair for the name of the created shortcut, then responding to the user to click on the created shortcut, acquiring the currently clicked shortcut name, inquiring the key value of the key value pair corresponding to the currently clicked shortcut name in the environmental key value pair list, and finally accessing the inquired key value to access the server corresponding to the environmental name. That is, the method of the invention can realize the switching of the running environment only by installing the mobile application once, thereby improving the working efficiency of the developer.
The foregoing description is only an overview of the present invention, and is intended to be implemented in accordance with the teachings of the present invention in order that the same may be more clearly understood and to make the same and other objects, features and advantages of the present invention more readily apparent.
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 set forth the various ways in which the principles disclosed herein may be practiced, and all aspects and equivalents thereof are intended to fall within the scope of the claimed subject matter. The above, as well as additional objects, features, and advantages of the present disclosure will become more apparent from the following detailed description when read in conjunction with the accompanying drawings. Like reference numerals generally refer to like parts or elements throughout the present disclosure.
FIG. 1 shows a schematic diagram of a computing device 100 according to one embodiment of the invention;
FIG. 2 illustrates a flow chart of a method 200 of processing a mobile application runtime environment in accordance with 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 the running environment required by different development stages in the process of developing the mobile application to online, and needs to be switched back and forth between different running environments. The operating environment in the present invention may include a development environment, a test environment, a quasi-production environment, and a production environment, and of course, the present invention is not limited to a specific operating environment, and all operating environments are within the 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 the data used after the mobile application is online, and the difference between the quasi-production environment and the production environment is that the server is used.
Generally, the development stage of the product can be operated on a development environment, the development stage is started after the development is completed, the development stage is changed into a test environment, and the test is completed and then the production environment needs to be configured for packaging and release. Since only one mobile application with the same installation package name exists in the same computing device, a plurality of mobile applications corresponding to different running environments cannot be installed in the same computing device, and great inconvenience is brought to switching of different running environments in a development stage.
In order to solve the above-mentioned problems, in the prior art, the mobile application installation package is often stored as two version installation packages of debug and release, where the two version installation packages of debug and release correspond to the test environment and the production environment respectively, and these two version installation packages are equivalent to two different mobile applications, and these two version installation packages can be installed on the same computing device at the same time, so as to implement switching between two running environments on the same computing device. However, when a third operating environment, such as a development environment, is desired, then it is necessary to uninstall an already installed mobile application (e.g., release version installation package), and continue installing development version installation packages, and so on, to enable switching between operating environments on the same computing device. However, in the process of switching different operation environments on the same computing device, the above scheme needs to package the installation package multiple times and install and uninstall the installation package multiple times, resulting in low efficiency.
To this end, the present invention proposes a mobile application running environment processing method, which corresponds each shortcut associated with a mobile application to a running environment server address, so as to implement switching of multiple running environments in the case of installing a mobile application once. Specifically, in the process of installing the mobile application, creating a shortcut equal to the number of the environmental key values in the environmental key value pair list, assigning a key of the corresponding environmental key value pair for the name of the created shortcut, then responding to the user to click on the created shortcut, acquiring the currently clicked shortcut name, inquiring the key value of the key value pair corresponding to the currently clicked shortcut name in the environmental key value pair list, and finally accessing the inquired key value to access the server corresponding to the environmental name. That is, the method of the invention can realize the switching of the running environment by only installing the mobile application once, and does not need to package and uninstall the mobile application for many times, thereby realizing simplicity, reducing the workload of the developer and improving the working efficiency of the developer.
The processing method of the mobile application running environment provided by the invention is executed in a computing device, and fig. 1 shows a structural diagram of a computing device 100 according to one embodiment of the invention. A block diagram of a computing device 100 is 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. The 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 information processor (DSP), or any combination thereof. The processor 104 may include one or more levels of caches, such as a first level cache 110 and a second level 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. The system memory 106 may include an operating system 120, one or more applications 122, and program data 124. In some implementations, the application 122 may be arranged to operate on an operating system with program data 124. The program data 124 includes instructions, and in the computing device 100 according to the present invention, the program data 124 contains instructions for executing the mobile application runtime environment processing method 200.
The computing device 100 further includes a storage device 132, where the memory storing the list of environment key pairs is the storage device 132 of the computing device 100. The storage device 132 includes removable storage 136 and non-removable storage 138, both of which are connected to the storage interface bus 134. In the present invention, the related data of each event occurring during the execution of the program 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. Wherein 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 basic configuration 102 via 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 communication with one or more other computing devices 162 via one or more communication ports 164 over a network communication link.
The 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 in a modulated data signal, such as a carrier wave or other transport mechanism. A "modulated data signal" may be a signal that has one or more of its data set or changed 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 special purpose network, and 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., as part of a small-sized 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 may include any of the above functions. Computing device 100 may also be implemented as a personal computer including desktop and notebook computer configurations. In some embodiments, the computing device 100 is configured to perform a processing method 200 of a mobile application runtime environment provided in accordance with the present invention.
FIG. 2 shows a schematic flow diagram of a method 200 of processing a mobile application runtime environment, according to one embodiment of the invention. The method 200 is suitable for execution in the computing device 100, the method 200 beginning at step S210. Before step S210 is performed, that is, before the mobile application is installed, it is necessary to determine in advance whether the list of environment key pairs used by the previous version of the mobile application is identical to the list of environment key pairs associated with the mobile application stored in the storage device 132 of the computing device 100, and if so, it indicates that the list of environment key pairs already exists, and in order to prevent the occurrence of confusion caused by repeated definition, the list of environment key pairs is not created, but the list of environment key pairs 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, and 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 pairs are predefined by the developer or tester according to the desired operating environment, and the computing device 100 generates a key pair list based on the defined key pairs, and then saves the environment key pair list to the storage device 132 of the computing device 100. The list of environment key pairs 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", "preproduction", "Product" in Table 1 are keys of key value pairs, and represent development environment, test environment, quasi-production environment and production environment, respectively, while "http:// debug.com.cn", "http:// test.com.cn", "http:// product.com.cn" are values of key value pairs, respectively, 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 pairs may also include key pairs of other operating environments, which are not particularly 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 the environmental key values in the environmental key value pair list are created, wherein each shortcut corresponds to one environmental key value pair, and a plurality of shortcuts are mutually bound with the mobile application. Since the mobile application and the shortcut are mutually bound, 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 so, a desktop shortcut with the same number of environment key values as that in the environment key value pair list is 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, if not, creating a long-press shortcut which is equal to the number of the environment key value pairs in the environment key value pair list, if so, sequentially reading the first numerical key value pairs by taking the position of the first environment key value pair in the environment key value pair list as the starting position, and creating the long-press shortcut which is the same as the number of the read key value pairs. The operating system is an android operating system, which is a Linux-based free and open source operating system and is mainly used for mobile devices such as smart phones and tablet computers.
In one embodiment, taking the first condition as an example, whether the Android operating system running the mobile application is smaller than 8.0 version. When the Android operating system is smaller than 8.0 versions, the number of shortcut entries associated with the mobile application is not limited, and only the desktop shortcut entries associated with the mobile application are supported to be created. And when the Android operating system is in a version above 8.0, at most 4 shortcut entries are associated with each mobile application, so that the first value is set to 4, but two shortcut entries associated with the mobile application are supported to be 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 entering the mobile application home page as a shortcut, and the mobile application icon is a mobile application entry for entering the mobile application home page
In one embodiment, since the shorthand manager class is provided to manage the creation of shortcuts starting from the Android8.0 version, and two shortcuts are provided-a long press shortcut and a desktop shortcut, but the desktop shortcut requires a more strict permission check and requires a user to actively click to add the shortcut, the invention considers the compatibility and ease of use of the shortcut, so the long press shortcut is used when the Android operating system is above the 8.0 version.
Fig. 3 is a schematic diagram of desktop shortcuts, and as can be seen from fig. 3, the names of two desktop shortcut icons 310 corresponding to a mobile application are respectively Debug and Test, and the desktop shortcut icons 310 and the mobile application icons mutually bound with the desktop shortcuts have the same size, wherein each desktop shortcut icon corresponds to one desktop shortcut. FIG. 4 is a schematic diagram of long press shortcuts, similar to desktop shortcuts, one for each long press shortcut icon. The long press mobile application will display the shortcut list 420 of the mobile application, assuming that the Android operating system of the mobile application is version 8.1, so that at most only 4 long press shortcut icons can be displayed in the shortcut list. As shown in fig. 4, the shortcut list 420 includes four long-press shortcut icons 410, each including Debug, test, preProduct, product, the 4 long-press shortcuts corresponding to the 4 long-press shortcut icons are associated with the mobile application, and the long-press shortcut icons 410 are smaller than the mobile application icons in comparison with the mobile application icon size. ,
it should be noted that, before creating a shortcut, rights need to be added to the shortcut. In one embodiment, rights to support adding shortcuts, removing shortcuts are added to a manifest list, such as AndroidManifest. Xml. Meanwhile, since in some computing devices 100, the addition authority of the desktop shortcut is closed by default, the read authority and the write authority set for the mobile application also need to be added. Examples of codes for registering the shortcut rights are as follows:
< -! -adding shortcuts ]
<uses-permission android:name="com.android.launcher.permission.INSTALL_SHORTCUT"/>
< -! Removing shortcuts
<uses-permission android:name="com.android.launcher.permission.UNINSTALL_SHORTCUT"/>
< -! -mobile application setting read rights- >
<uses-permission android:name="com.android.launcher.permission.READ_SETTINGS"/>
< -! -mobile application setting write rights-
<uses-permission android:name="com.android.launcher.permission.WRITE_SETTINGS"/>
In one embodiment, taking the first condition as an example, whether the Android operating system running the mobile application is smaller than 8.0 version. Judging whether an Android operating system running the mobile application is smaller than 8.0 versions, if yes, creating a desktop shortcut with the same number of environment key values in the environment key value pair list, wherein the code examples are as follows:
if the android system running the mobile application is greater than or equal to the 8.0 version, continuously judging whether the number of the environmental key value pairs in the environmental key value pair list is greater than 4, if not, creating a long-press shortcut equal to the number of the environmental key value pairs in the environmental key value pair list, if so, sequentially reading four key value pair key value pairs by taking the position of the first key value pair in the environmental key value pair list as the starting position, and creating the long-press shortcut with the same number as the selected key value pairs. If five running environments are needed, the created shortcuts need to be deleted, and because the permission of removing and adding the shortcuts is registered, one created shortcut (for example, developing the environmental shortcuts) can be deleted, the remaining one environmental key value pair in the environmental 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 the read key-value pairs is as follows: the computing device 100 first obtains an instance shorthand manager 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 shorthand info list, and then calls a method setdynamicshorthand () and transmits the shorthand info list into the generated shorthand info list by using the instance shorthand manager, so that a corresponding number of long-press shorthand ways can be generated according to the environment key value pair list. After the shortcut is generated, the shortcut menu is popped up by long-pressing the mobile application icon, and the shortcut list popped up by long-pressing the payment facilitator icon is popped up as shown in fig. 4. Of course, the present invention is not limited to the above manner, and thus, it is within the scope of the present invention to implement a method for creating the same number of long press shortcuts as the selected key value pair. The code example for creating the same number of long press shortcuts as the selected key value pairs is as follows:
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, if the keys of the environment key value pair in table 1 are "Debug", "Test", "Product", respectively, then the shortcut names of the created shortcuts are Debug, test, preProduct, product, respectively.
Subsequently, in step S230, in response to the user clicking on the created shortcut, the currently clicked shortcut name is acquired, and in step S240, the key value of the key value pair corresponding to the currently clicked shortcut name is queried in the environment key value pair list. In one embodiment, in response to a user clicking on a created shortcut icon (e.g., a development environment shortcut icon), entering a mobile application home page that is mutually bound to a shortcut, at which time the computing device 100 may transfer a shortcut name (Debug, i.e., development environment) as a parameter to an Activity component of the mobile application home page, query a list of environment key value pairs for a value corresponding to the key (at which time value is "http:// debug.com.cn") with the parameter of the Activity component as a key of an environment key pair (at which time key is "Debug"), and use the queried value as a parameter to a unified environment exit function. Of course, the present invention does not specifically limit the above manner, so that the method of obtaining the shortcut name and the method of querying the key value of the key value pair corresponding to the currently clicked shortcut name in the environment key value pair list are both within the protection scope of the present invention.
The Activity component is a mobile application component, and a user can interact with a screen provided by the mobile application component, so that the content which can be seen in the mobile application is provided by the Activity component in the vast majority. Meanwhile, the activities can jump among different activities, different pages are connected in series to jointly complete a specific operation flow, and each application consists of one or more activities, which are indispensable parts in the Android mobile application.
Finally, in step S250, the interface of the mobile application access 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. 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 running the mobile application in the server, so that the mobile application runs under 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, creating a shortcut equal to the number of the environmental key values in the environmental key value pair list, assigning a key of the corresponding environmental key value pair for the name of the created shortcut, then responding to the user to click on the created shortcut, acquiring the currently clicked shortcut name, inquiring the key value of the key value pair corresponding to the currently clicked shortcut name in the environmental key value pair list, and finally accessing the inquired key value to access the server corresponding to the environmental name. That is, the method of the invention can realize the switching of a plurality of operating environments only by installing the mobile application once, is simple and convenient to realize, reduces the workload of the developer and improves the working efficiency of the developer.
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 of the methods and apparatus of the present invention, may take the form of program code (i.e., instructions) embodied in tangible media, such as removable hard drives, U-drives, floppy diskettes, 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 will generally include 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 in accordance with instructions in said program code stored in the memory.
By way of example, and not limitation, readable media comprise readable storage media and communication media. The readable storage medium stores 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 the invention. The required structure for a construction of such a system is apparent from the description above. In addition, the present invention is not directed to any particular programming language. It will be appreciated that the teachings of the present invention described herein may be implemented in a variety of programming languages, and the above description of specific languages is provided for disclosure of enablement and best mode of the present invention.
In the description provided herein, numerous specific details are set forth. However, it is understood 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 construed as reflecting the intention that: i.e., the claimed invention 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 a plurality of sub-modules.
Those skilled in the art will appreciate that the modules in the apparatus of the embodiments may be adaptively changed and disposed in one or more apparatuses different from the embodiments. 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. Any combination of all features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or units of any method or apparatus so disclosed, may be used in combination, except insofar as at least some of such features and/or processes or units 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 but not others included in other embodiments, 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 can be used in any combination.
Furthermore, some of the embodiments are described herein as methods or combinations of method elements that may be implemented by a processor of a computer system or by other means of performing the functions. Thus, a processor with the necessary instructions for implementing the described method or method element forms a means for implementing the method or method element. Furthermore, the elements of the apparatus embodiments described herein are examples of the following apparatus: the apparatus is for carrying out the functions performed by the elements for carrying out the objects of the invention.
As used herein, unless otherwise specified the use of the ordinal terms "first," "second," "third," etc., to describe a general object merely denote different instances of like objects, and are not intended to imply that the objects so described must have a given order, 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 the above description, will appreciate that other embodiments are contemplated within 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 disclosure of the present invention is intended to be illustrative, but not limiting, of the scope of the invention, which is defined by 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 comprising a memory in which is stored a list of environment key-value pairs associated with the mobile application, the list of environment key-value pairs comprising 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:
creating shortcuts equal to the number of the environment key values in the environment key value pair list in the installation process of the mobile application, wherein each shortcut corresponds to one environment key value pair, and each shortcut is mutually bound with the mobile application;
assigning a shortcut name of the created shortcut to be a key of the corresponding environment key value pair;
responding to the created shortcut clicked by the user, and acquiring the name of the currently clicked shortcut;
inquiring a key value of a key value pair corresponding to the currently clicked shortcut name in the environment key value pair list;
and setting an interface of the mobile application access server as the 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 creating a shortcut that is equal to a pair number of environment key values in the list of environment key value pairs comprises:
and judging whether an operating system running the mobile application meets a first condition, if so, creating a desktop shortcut which is equal to the environment key value pair number in the environment key value pair list.
3. The method of claim 2, further comprising the step of:
if the operating system running the mobile application does not meet the first condition, continuing to judge whether the number of the environmental key value pairs in the environmental key value pair list is larger than a first numerical value, if not, creating a long-press shortcut equal to the number of the environmental key value pairs in the environmental key value pair list, if so, taking the first key value pair in the environmental key value pair list as a starting position, sequentially reading the first numerical key value pair, and creating the long-press shortcut with the same number as the read key value pairs.
4. The method of claim 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 version 8.0, and the first value is 4.
5. The method of any one of claims 1 to 4, wherein the step of obtaining the currently clicked shortcut name in response to the user clicking on the created shortcut comprises:
responding to the user clicking the created shortcut, and entering a mobile application home page correlated with the clicked shortcut;
acquiring the name of a shortcut clicked currently;
wherein, the step of querying the key value of the key value pair corresponding to the currently clicked shortcut name in the environment key value pair list includes:
transmitting the currently clicked shortcut name as a parameter to an Activity component of the 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 a key value corresponding to the key in the environment key value pair list.
6. The method of any one of claims 1 to 4, further comprising the step of:
before the mobile application is installed, adding shortcut rights, wherein the shortcut rights comprise one or more of adding shortcut rights, removing shortcut rights, reading rights set by the mobile application and writing rights set by the mobile application.
7. The method of any one of claims 1 to 4, wherein the operating environment comprises one or more of a development environment, a testing environment, a quasi-production environment, and a production environment.
8. The method of any of claims 1 to 4, further comprising the step of, prior to installing the mobile application:
judging whether an 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;
and storing the environment key value pair list 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 which, 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 CN113138806A (en) 2021-07-20
CN113138806B true 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的远程通信的实现;江剑, 李永新, 牛国柱;微计算机信息(第09期);第69-70页 *
河南省山洪灾害监测预警系统技术路线与系统架构;薛红勋;;河南水利与南水北调(第12期);第29-30页 *

Also Published As

Publication number Publication date
CN113138806A (en) 2021-07-20

Similar Documents

Publication Publication Date Title
US9602347B2 (en) Method, system and program for browser to switch IE kernel
CN103677922B (en) The method and apparatus started to application software
KR101517659B1 (en) Search extensibility to third party applications
CN108549568B (en) Application entry processing method and device, storage medium and electronic equipment
US9038185B2 (en) Execution of multiple execution paths
CN113434205B (en) Operating system starting method and computing device
WO2018040270A1 (en) Method and device for loading linux-system elf file in windows system
CN113204385B (en) Plug-in loading method and device, computing equipment and readable storage medium
CN106201602B (en) Label providing method, label obtaining method, server and electronic equipment
JP2006048645A (en) Method and system for embedding context information in document
CN113535650B (en) File naming method and computing device
CN113485712B (en) Kernel clipping method and computing device
CN114461223A (en) Code generation method and device and terminal equipment
CN113434063A (en) Information display method, device and equipment
CN113138806B (en) Processing method and device for mobile application running environment
CN116339697A (en) Test control software design method and device
CN112905931B (en) Page information display method and device, electronic equipment and storage medium
JP4472706B2 (en) A system for dynamically registering privileged mode hooks on a device
CN106775726B (en) Method for downloading application and electronic terminal
CN113835927B (en) Instruction execution method, computing device and storage medium
CN113656347B (en) File directory export method, file directory import method and computing device
CN110928470B (en) Signature box display method and device, electronic equipment and storage medium
CN116627524A (en) Processing method and device and electronic equipment
US20040254986A1 (en) Information processing apparatus and program
CN114020701A (en) Shortcut creating 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