An implementation method and device for installing an application on an intelligent POS device

By receiving update broadcasts on smart POS devices and silently installing the new version of the mobile management application, the problem of requiring a device restart during the update process in the existing technology is solved, and application updates and device management without restarting are realized.

CN114327519BActive Publication Date: 2025-10-17FEITIAN TECHNOLOGIES CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111677503.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-31
Publication Date
2025-10-17
Estimated Expiration
2041-12-31

AI Technical Summary

Technical Problem

Existing smart POS devices require user intervention to restart the device when updating the mobile management application, resulting in an inability to manage the device and a loss of control during the update process.

Method used

By receiving the mobile management application update broadcast on the smart POS device, determining the update package path, silently installing the new version of the mobile management application, and starting the new version of the application after the Android system kills the old version of the application, the update process does not require a device restart.

Benefits of technology

It enables mobile management applications to be updated without restarting, ensures the control of smart POS devices, and improves user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114327519B_ABST
    Figure CN114327519B_ABST
Patent Text Reader

Abstract

The application discloses an implementation method and device for installing an application on an intelligent POS device, and the method comprises the following steps: when an application providing a system interface judges that the path of a mobile management application update package in a received broadcast is not empty, starting a service for installing a mobile management application, starting to silently install a new version of the mobile management application according to a saved mobile management application update package (at this time, the Android operating system will kill the old version of the mobile management application running), if the installation is successful, changing the mobile management application update package into a mobile management application update success file, and starting the new version of the mobile management application, if the installation fails, changing the mobile management application update package into a mobile management application update failure file, and starting the old version of the mobile management application. The technical scheme of the application realizes the update of the mobile management application without restarting the intelligent POS device, meanwhile, the mobile management application can guarantee the management and control of the intelligent POS device, and the user can conveniently use the intelligent POS device.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of intelligent terminal equipment, in particular to an implementation method and device for installing applications on intelligent POS equipment. BACKGROUND

[0002] The existing intelligent POS equipment does not have a pre-installed application market by default, and generally downloads applications by cooperating with a background server (referring to an intelligent terminal remote operation management system) using a mobile management application (referring to an intelligent terminal remote operation management mobile agent, which is set on the intelligent POS machine). The mobile management application can maintain the intelligent POS equipment and system applications in the equipment, and can also push other applications in the background with the help of the background server, that is, the mobile management application downloads and installs other applications, and other applications can be conveniently and quickly pushed and managed in the background through the mobile management application. Since the mobile management application also needs to be updated, the mobile management application will end the related services and processes of the mobile management application when installing the update, and after the update, the related services and processes of the mobile management application cannot be started. Generally, the user needs to restart the intelligent POS equipment, and the related services and processes of the mobile management application can take effect only after the intelligent POS equipment is restarted. The user needs to intervene to start the related services and processes of the mobile management application. During this period, we lose control of the intelligent POS equipment and cannot manage the intelligent POS equipment. SUMMARY

[0003] The present application aims to overcome the deficiencies of the prior art and provide an implementation method and device for installing applications on intelligent POS equipment.

[0004] In a first aspect, an implementation method for installing applications on intelligent POS equipment is provided, which comprises the following steps:

[0005] Step S1: When the application providing a system interface receives a broadcast for updating the mobile management application, it is judged whether the path of the mobile management application update package in the broadcast is empty. If not, step S2 is executed.

[0006] Step S2: The application providing a system interface starts the service for installing the mobile management application, starts silent installation of the new version of the mobile management application according to the saved mobile management application update package, and judges whether the new version of the mobile management application is installed successfully. If yes, step S3 is executed, otherwise step S4 is executed. When starting silent installation of the new version of the mobile management application, the Android system will kill the running old version of the mobile management application.

[0007] Step S3: The application providing a system interface changes the mobile management application update package to a mobile management application update success file, and starts the new version of the mobile management application.

[0008] Step S4: the application providing the system interface changes the mobile management application update package into a mobile management application update failure file, and starts the old mobile management application;

[0009] The starting silent installation of the new mobile management application according to the saved mobile management application update package comprises:

[0010] Step S21: the application providing the system interface calls the encapsulated silent installation interface, judges whether the mobile management application update package exists according to the path of the mobile management application update package, and if the mobile management application update package exists, executes step S22;

[0011] Step S22: the application providing the system interface parses the mobile management application update package name from the mobile management application update package, and judges whether the mobile management application update package name is empty, and if the mobile management application update package name is not empty, executes step S23;

[0012] Step S23: the application providing the system interface acquires a first object and creates a second object, sets the installation session mode of the second object, and sets the size of the second object as the size of the mobile management application update package;

[0013] Step S24: the application providing the system interface creates the installation session of the mobile management application according to the first object and the second object, and acquires the corresponding installation session identifier;

[0014] Step S25: the application providing the system interface judges the value of the installation session identifier, and if the value of the installation session identifier is not the first preset value, executes step S26;

[0015] Step S26: the application providing the system interface copies the mobile management application update package to the specified directory according to the first object, the installation session identifier, and the path of the mobile management application update package, and judges whether the copying is successful, and if the copying is successful, executes step S27;

[0016] Step S27: the application providing the system interface starts to install the mobile management application according to the first object, the installation session identifier, the path of the mobile management application update package, and the first broadcast receiver, and if the installation process is wrong, an error is reported, and the process ends, otherwise, judges whether the new mobile management application is installed successfully.

[0017] In a second aspect, the embodiment of the present application further provides an implementation device for installing an application on an intelligent POS device, comprising a module for providing a system interface, wherein the module for providing a system interface comprises:

[0018] A first judging sub-module is configured to, when receiving a broadcast for updating a mobile management application, judge whether the path of a mobile management application update package in the broadcast is empty, and if the path of the mobile management application update package is not empty, trigger a starting killing sub-module;

[0019] The starting killing submodule is configured to start a service of installing a mobile management application, and trigger the first installation judging submodule;

[0020] The first installation judging submodule is configured to start silent installation of a new version of the mobile management application according to the saved mobile management application update package, and judge whether the new version of the mobile management application is installed successfully. If yes, the first change starting submodule is triggered, otherwise the second change starting submodule is triggered. The Android system will kill the running old version of the mobile management application when starting the silent installation of the new version of the mobile management application;

[0021] The first change starting submodule is configured to change the mobile management application update package to a mobile management application update success file, and start the new version of the mobile management application;

[0022] The second change starting submodule is configured to change the mobile management application update package to a mobile management application update failure file, and start the old version of the mobile management application;

[0023] The first installation judging submodule comprises:

[0024] The first calling judging unit is configured to call the encapsulated silent installation interface, judge whether the mobile management application update package exists according to a path of the mobile management application update package, and trigger the first parsing judging unit if the mobile management application update package exists;

[0025] The first parsing judging unit is configured to parse a mobile management application update package name from the mobile management application update package, and judge whether the mobile management application update package name is empty. If not, the first obtaining setting unit is triggered;

[0026] The first obtaining setting unit is configured to obtain a first object and create a second object, set an installation session mode of the second object, and set a size of the second object as a size of the mobile management application update package;

[0027] The first creating obtaining unit is configured to create an installation session of the mobile management application according to the first object and the second object, and obtain a corresponding installation session identifier;

[0028] The first judging unit is configured to judge a value of the installation session identifier. If the value is not a first preset value, the first copying judging unit is triggered;

[0029] The first copying judging unit is configured to copy the mobile management application update package to a specified directory according to the first object, the installation session identifier and a path of the mobile management application update package, and judge whether the copying is successful. If yes, the first installation judging unit is triggered;

[0030] The first installation judging unit is configured to start installation of the mobile management application according to the first object, the installation session identifier, the path of the mobile management application update package and the first broadcast receiver, report an error if the installation process fails, end, otherwise, judge whether the new version of the mobile management application is installed successfully, trigger the first change starting sub-module if yes, and trigger the second change starting sub-module if no.

[0031] In a third aspect, an embodiment of the present application further provides a smart POS device, which comprises at least one processor, a memory, and instructions stored in the memory and executable by the at least one processor, and the at least one processor executes the instructions to implement the implementation method for installing an application on a smart POS device.

[0032] In a fourth aspect, an embodiment of the present application further provides a computer readable storage medium, which comprises a computer program, and when the computer program runs on a smart POS device, the computer program causes the smart POS device to execute the implementation method for installing an application on a smart POS device.

[0033] In a fifth aspect, an embodiment of the present application further provides a chip, which is coupled with a memory and used to execute a computer program stored in the memory to execute the implementation method for installing an application on a smart POS device.

[0034] Compared with the prior art, the present application has the following advantages:

[0035] The technical scheme of the present application can push a mobile management application update package by a background server in the case that a POS device does not install an application market, install and update the mobile management application by means of an application providing a system interface and restart the mobile management application, and thus the update of the mobile management application is realized without restarting the smart POS device, and the management and control of the smart POS device by the mobile management application are ensured, and the user is facilitated. BRIEF DESCRIPTION OF DRAWINGS

[0036] Figure 1 A flowchart of an implementation method for installing an application on a smart POS device according to an embodiment of the present application;

[0037] Figure 2 And Figure 3 A flowchart of an implementation method for installing an application on a smart POS device according to an embodiment of the present application;

[0038] Figure 4 A flowchart of a self-checking process automatically started after the update of the application on the mobile management application in the embodiment two of the present application is completed;

[0039] Figure 5A block diagram of an implementation device for installing an application on an intelligent POS device is provided for Embodiment Three of the present application. DETAILED DESCRIPTION

[0040] The present application provides an implementation method and device for installing an application on an intelligent POS device. The specific embodiments of the present application are described in detail below with reference to the accompanying drawings. The examples of the embodiments are shown in the drawings. The embodiments described below with reference to the drawings are exemplary and are used to explain the present application, but cannot be interpreted as a limitation of the present application.

[0041] Those skilled in the art can understand that, unless otherwise defined, all terms (including technical terms and scientific terms) used herein have the same meaning as commonly understood by those skilled in the art in the field of the present application. It should also be understood that terms such as those defined in a general dictionary should be understood to have meanings consistent with those in the context of the prior art, and should not be interpreted in an idealized or overly formal sense unless specifically defined as such.

[0042] In order to make the objects, technical solutions and advantages of the present application clearer, the embodiments of the present application are further described in detail below with reference to the accompanying drawings.

[0043] Embodiment One

[0044] Embodiment One of the present application provides an implementation method for installing an application on an intelligent POS device, as shown in the following steps. Figure 1

[0045] Step S1: When the application providing a system interface receives a broadcast updating a mobile management application, it is determined whether the path of the mobile management application update package in the broadcast is empty. If yes, an error is reported and the process is ended. If no, Step S2 is performed.

[0046] Optionally, before Step S1 in the present embodiment, it further includes Step A1: the application providing a system interface registers a second broadcast receiver for listening to a broadcast updating a mobile management application; the second broadcast receiver is used for listening to a broadcast updating a mobile management application sent by the mobile management application.

[0047] Specifically, determining whether the path of the mobile management application update package in the broadcast is empty includes: obtaining the path of the mobile management application update package from the received broadcast through an obtaining interface, and determining whether the obtained path of the mobile management application update package is empty.

[0048] Step S2: The application providing a system interface starts a service for installing a mobile management application, starts silent installation of a new version of the mobile management application according to the saved mobile management application update package, and determines whether the new version of the mobile management application is installed successfully. If yes, Step S3 is performed. If no, Step S4 is performed.​

[0049] The saved mobile management application update package is specifically saved in the path of the mobile management application update package obtained in S1;

[0050] Specifically, in this embodiment, when starting to silently install the new version of the mobile management application, the Android system kills the running old version of the mobile management application;

[0051] Optionally, before silently installing the new version of the mobile management application according to the saved mobile management application update package, the method further includes: declaring, in a configuration manifest file of an application providing a system interface, a permission of installing an application; configuring a first broadcast receiver in the configuration manifest file; and modifying a permission configuration file of the application providing the system interface, and adding an installation application permission to the application providing the system interface.

[0052] The first broadcast receiver is used for listening to a broadcast of an application installation state change; and the installation state is used for identifying an installation result of silently installing the mobile management application.

[0053] Further, starting to silently install the new version of the mobile management application according to the mobile management application update package includes:

[0054] S21: The application providing the system interface calls the packaged silent installation interface, judges whether the mobile management application update package exists according to the path of the mobile management application update package, and if yes, executes S22, otherwise, reports an error and ends;

[0055] S22: The application providing the system interface parses the mobile management application update package name from the mobile management application update package, and judges whether the mobile management application update package name is empty, and if yes, reports an error and ends; otherwise, executes S23;

[0056] S23: The application providing the system interface obtains a first object and creates a second object, sets an installation session mode of the second object, and sets a size of the second object as a size of the mobile management application update package;

[0057] S24: The application providing the system interface creates an installation session of the mobile management application according to the first object and the second object, and obtains a corresponding installation session identifier;

[0058] S25: The application providing the system interface judges a value of the installation session identifier, and if the value is a first preset value, reports an error and ends; otherwise, executes S26;

[0059] S26: The application providing the system interface copies the mobile management application update package to a specified directory according to the first object, the installation session identifier and the path of the mobile management application update package, and judges whether the copying is successful, and if yes, executes S27, otherwise, reports an error and ends;

[0060] Step S27: The application providing the system interface starts to install the mobile management application according to the first object, the installation session identifier, the path of the mobile management application update package and the first broadcast receiver, and reports an error if the installation process fails, ends, or judges whether the new version of the mobile management application is installed successfully.

[0061] In the embodiment, step S2 further includes: if the installation is successful, the application providing the system interface sets the installation result as installation success, and sends a broadcast of updating the mobile management application with the installation result as a parameter; if the installation fails, the application providing the system interface sets the installation result as installation failure, and sends a broadcast of updating the mobile management application with the installation result as a parameter.

[0062] The first broadcast receiver listens to the broadcast of the change of the application installation state sent by the Android system bottom layer, the application providing the system interface takes out the application installation state from the broadcast and notifies the callback interface to the mobile management application to return the corresponding installation result according to the application installation state, and the mobile management application saves the received installation result; the installation result includes installation success or installation failure.

[0063] Step S3: The application providing the system interface changes the mobile management application update package to a mobile management application update success file, and starts the new version of the mobile management application.

[0064] Step S4: The application providing the system interface changes the mobile management application update package to a mobile management application update failure file, and starts the old version of the mobile management application.

[0065] In the embodiment, starting the new version of the mobile management application and starting the old version of the mobile management application include:

[0066] Step S51: The application providing the system interface starts the main service of the mobile management application through the service of the installed mobile management application, sets the operation parameter transmitted by the started main service of the mobile management application as updating the mobile management application, and saves the installation result of updating the mobile management application; the main service of the mobile management application inherits the standard service component of Android.

[0067] Optionally, if the new version of the mobile management application is started, the installation result of updating the mobile management application is update success, and if the old version of the mobile management application is started, the installation result of updating the mobile management application is update failure.

[0068] Step S52: The mobile management application judges whether the currently running process is the main process of the mobile management application, and if yes, performs the initialization of the mobile management application; otherwise, ends.

[0069] The initialization of the mobile management application includes initializing an application push task database, initializing a component for downloading a file, and initializing a third broadcast receiver; the third broadcast receiver is used for listening to a device system network connection change broadcast and initializing a push environment when network connection is successful.

[0070] Further, the initialization of the third broadcast receiver includes listening to a system network connection change broadcast and initializing a push environment.

[0071] Further, the initialization of the push environment specifically includes: when a device network change is monitored, performing an operation of initializing the push environment, starting a background server, and connecting the background server; when the background server is successfully connected, starting a database connection service, checking a state of each push task of the mobile management application, and reporting the background server;

[0072] Step S53: The main service of the mobile management application checks whether an incoming operation parameter is an update of the mobile management application, if yes, acquires a saved installation result, and judges whether the mobile management application is successfully updated according to the installation result, if yes, executes step S54, otherwise ends;

[0073] Step S54: The mobile management application checks whether there is an installation task record of the mobile management application in the application push task database, if yes, updates a push state of the mobile management application update task in the application push task database according to the installation result, otherwise ends.

[0074] Optionally, in the embodiment, after the mobile management application is started, the method further includes that the mobile management application performs self-checking, and the self-checking process includes:

[0075] Step B1: After the mobile management application is started, the application push task database is checked to judge whether there is an unprocessed application push task, if yes, step B2 is executed, otherwise ends;

[0076] Optionally, in the embodiment, before step B1, the method further includes that the background server initiates a push task, and sends a list to be pushed to the mobile management application; the mobile management application receives the list to be pushed and saves the list to a data table of the application push task database;

[0077] Specifically, in the embodiment, the judgment of whether there is an unprocessed application push task in step B1 includes: all state words in the data table of the application push task database are traversed, if all the state words are pushed, there is no unprocessed application push task, otherwise there is an unprocessed application push task.

[0078] Step B2: The mobile management application judges whether a current installation task is in an end state, if yes, step B3 is executed, otherwise step B4 is executed.

[0079] Step B3: The mobile management application reports the background server application installation end information, deletes the mobile management application installation record, deletes the mobile management application update package, and ends;

[0080] Step B4: The mobile management application judges whether the current installation task is in the downloading state, yes, continues to download the application, and no, executes step B5;

[0081] Step B5: The mobile management application judges whether the current installation task state is in the installing or installation completion state, yes, executes step B6, and no, ends;

[0082] Step B6: The mobile management application judges whether the current installation task is the update mobile management application, yes, executes step B7, and no, waits for downloading the application;

[0083] Step B7: The mobile management application judges whether the mobile management application update success file exists, yes, reports the update success information to the background server, deletes the mobile management application update package and the mobile management application update record in the application push task database, and ends, and no, executes step B8;

[0084] Step B8: The mobile management application judges whether the mobile management application update failure file exists, yes, reports the update failure information to the background server, deletes the mobile management application update package and the mobile management application update record in the application push task database, and ends, and no, waits for downloading the application.

[0085] In the embodiment, the application needs to be downloaded before being installed, that is, step S1 further includes the following steps before step S1:

[0086] Step T1: The mobile management application receives the application installation package pushed by the background server;

[0087] Step T2: The mobile management application judges whether the downloading condition is met, yes, executes step T3, and no, reports an error and ends;

[0088] Specifically, step T2 in the embodiment includes the following steps:

[0089] Step T21: The mobile management application judges whether the name of the application installation package is empty, yes, reports an error and ends, and no, executes step T22;

[0090] Step T22: The mobile management application judges whether the application version number in the application installation package is higher than the application version number of the installed corresponding application, yes, executes step T23, and no, reports an error and ends;

[0091] Step T23: The mobile management application queries the application push task database, and judges whether the number of application installation tasks in the application push task database is within a preset range. If yes, step T26 is executed; otherwise, step T24 is executed.

[0092] Step T24: The mobile management application judges whether the number of application installation tasks in the application push task database is equal to a first preset value. If yes, an error is reported, and the process ends; otherwise, step T25 is executed.

[0093] Step T25: The mobile management application deletes all application installation packages downloaded in the application push task database, and the process ends.

[0094] Step T26: The mobile management application judges whether there is a mobile management application in the application being installed. If yes, an error is reported, and the process ends; otherwise, step T3 is executed.

[0095] Step T3: The mobile management application adds a task of downloading an application to the application push task database.

[0096] Step T4: The mobile management application starts downloading an application. If the downloading is successful, step T5 is executed.

[0097] Specifically, in this embodiment, step T4 includes:

[0098] Step T41: The mobile management application starts downloading an application installation package and saves it in a preset path. It is judged whether the downloading of the application installation package is completed. If yes, step T5 is executed; otherwise, step T42 is executed.

[0099] Step T42: The mobile management application continues downloading the application installation package, and judges whether the downloading is successful. If yes, step T5 is executed; otherwise, step T43 is executed.

[0100] Step T43: The mobile management application judges whether the downloading of the application installation package is timed out. If yes, the process returns to step T41; otherwise, step T44 is executed.

[0101] Step T44: The mobile management application judges whether an interruption occurs in the downloading process. If yes, the process returns to step T41; otherwise, step T45 is executed.

[0102] Step T45: The mobile management application judges whether a server internal error occurs in the downloading process. If yes, an error is reported, and the process ends; otherwise, the process returns to step T41.

[0103] Step T5: The mobile management application judges whether the current application to be installed, which is successfully downloaded, meets installation conditions. If yes, step T6 is executed.

[0104] Specifically, step T5 includes the mobile management application determining whether the application version number in the application installation package is higher than the application version number of the corresponding installed application, and if so, executing step T6, otherwise terminating;

[0105] Step T6: The mobile management application determines whether the application to be installed is a mobile management application. If so, the mobile management application broadcasts a notification to the application providing the system interface to update the mobile management application. Otherwise, step T7 is executed.

[0106] Step T7: The mobile management application determines whether there are other applications to be installed that have been successfully downloaded in the application push task database. If yes, execute step T8; otherwise, terminate.

[0107] Step T8: The mobile management application silently installs other applications. If the installation is successful, the installed application list is updated, the application installation success information is reported to the backend server, the successfully installed application installation package is deleted, and step T9 is executed;

[0108] Specifically, in step T8 of this embodiment, the mobile management application silently installs other applications including:

[0109] Step T81: The mobile management application calls the silent installation interface and determines whether the application installation package exists based on the installation package path parameter of the silent installation interface. If yes, execute step T82; otherwise, report an error and end;

[0110] Step T82: The mobile management application parses the application installation package to obtain the application installation package name and determines whether the application installation package name is empty. If so, an error message is issued and the process ends; otherwise, the process proceeds to step T83.

[0111] Step T83: The mobile management application obtains the first object and creates a second object, sets the installation session mode of the second object and sets the size of the second object to the size of the application installation package;

[0112] Step T84: The mobile management application uses the second object as a parameter, creates an installation session according to the first object, and obtains a corresponding installation session identifier;

[0113] Step T85: The mobile management application determines the value of the installation session identifier. If it is the first preset value, an error message is reported and the process ends; otherwise, the process proceeds to step T86.

[0114] Step T86: The mobile management application copies the application installation package to the specified directory based on the first object, the installation session identifier, and the installation package path, and determines whether the copy is successful. If so, execute step T87; otherwise, report an error and end;

[0115] Step T87: The mobile management application installs the application according to the first object, the installation session identifier, the installation package path, and the first broadcast receiver;

[0116] Step T9: The mobile management application judges whether there is an application waiting to be downloaded in the application push task database, if yes, an application waiting to be downloaded is obtained, and the step T4 is returned, otherwise, the process is ended.

[0117] The technical scheme of the present application can push the mobile management application update package by the background server without installing the application market in the intelligent POS device, install and update the mobile management application by means of the application providing the system interface, and restart the mobile management application without restarting the intelligent POS device, so that the update of the mobile management application is realized, and the management and control of the intelligent POS device by the mobile management application is ensured, and the user is facilitated.

[0118] Embodiment Two

[0119] The embodiment two of the present application provides an implementation method for installing an application on an intelligent POS device, as shown in Figure 2 and Figure 3 , comprising the following steps.

[0120] Step 101: The mobile management application receives an application installation package pushed by the background server.

[0121] In the embodiment, the application installation package is a mobile management application update package or other application installation package.

[0122] Step 102: The mobile management application judges whether the name of the application installation package is empty, if yes, an error is reported, and the process is ended, otherwise, step 103 is performed.

[0123] Optionally, in the embodiment, when the step is judged as yes, a failure information is reported, for example, the failure information is STATUS_PUSH_FAILED.

[0124] Step 103: The mobile management application judges whether the application version number in the received installation package is higher than the application version number of the installed application, if yes, step 104 is performed, otherwise, an error is reported, and the process is ended.

[0125] Specifically, in the embodiment, step 103 comprises the following steps.

[0126] Step 103-1: The mobile management application compares whether the application version number in the received application installation package is lower than the application version number of the installed application, if yes, an error is reported, and the process is ended, otherwise, step 103-2 is performed.

[0127] Optionally, in the embodiment, when the step is judged as yes, a failure information is reported, for example, the failure information is STATUS_PUSH_LOWER_VERSION_FAILED.

[0128] Step 103-2: The mobile management application compares the application version number in the received application installation package with the application version number of the installed application. If they are equal, the process ends. Otherwise, step 104 is performed.

[0129] Optionally, in this embodiment, when the result of the judgment in this step is yes, success information is reported. For example, the success information is STATUS_PUSH_SUCCESS.

[0130] Step 104: The mobile management application queries the application push task database and judges whether the number of application installation tasks in the application push task database is within a preset range. If yes, step 107 is performed. Otherwise, step 105 is performed.

[0131] Specifically, in this embodiment, the preset range is 0-2, inclusive.

[0132] Step 105: The mobile management application judges whether the number of application installation tasks in the application push task database is equal to a first preset value. If yes, an error is reported and the process ends. Otherwise, step 106 is performed.

[0133] Optionally, in this embodiment, when the result of the judgment in this step is yes, failure information is reported. For example, the failure information is STATUS_PUSH_TASK_REACHED_THE_MAXIMUM_ERROR. The first preset value is 3.

[0134] Optionally, in this embodiment, the error reporting in this step specifically means that failure information is reported. For example, the failure information is STATUS_PUSH_TASK_REACHED_THE_MAXIMUM_ERROR.

[0135] Step 106: The mobile management application deletes all application installation packages that have been downloaded in the application push task database, and the process ends.

[0136] Optionally, in this embodiment, all application installations include mobile management application installation packages and other application installation packages.

[0137] Step 107: The mobile management application judges whether there is a mobile management application in the application being installed. If yes, an error is reported and the process ends. Otherwise, step 108 is performed.

[0138] Step 108: The mobile management application adds a task of updating the mobile management application to the application push task database.

[0139] For example, in this embodiment, the application push task database is sma.db. The data table APPLICATION that stores the task of updating the mobile management application is saved to sma.db.

[0140] Step 109: The mobile management application starts downloading the application installation package and saving in a preset path, judges whether the application installation package is downloaded, if yes, step 114 is executed, if not, step 110 is executed;

[0141] Step 110: The mobile management application continues to download the application installation package, judges whether the downloading is successful, if yes, step 114 is executed, if not, step 111 is executed;

[0142] Step 111: The mobile management application judges whether the downloading of the application installation package is timed out, if yes, step 109 is returned, if not, step 112 is executed;

[0143] Step 112: The mobile management application judges whether the downloading process is interrupted, if yes, step 109 is returned, if not, step 113 is executed;

[0144] Optionally, in the embodiment, step 112 specifically comprises: judging whether the downloading state of the application in the application push task database has a task interruption, if yes, step 109 is returned, if not, step 113 is executed;

[0145] Specifically, in the embodiment, the application push task database records the application installation package, the application installation package file name, the downloading state and other information of the application push task;

[0146] Step 113: The mobile management application judges whether the downloading process has a server internal error, if yes, an error is reported and the process is ended, if not, step 109 is returned;

[0147] Specifically, in the embodiment, step 113 comprises: the mobile management application judges whether the downloading process has a 500 error, if yes, an error is reported and the process is ended, if not, step 109 is returned;

[0148] Optionally, in the embodiment, the server end has an error due to the nonexistence of the resource to be downloaded and other reasons causing the application installation package cannot be downloaded, and the error reporting in the step specifically comprises: reporting a failure information, for example, the failure information is STATUS_PUSH_DOWNLOAD_FILE_ERROR;

[0149] Step 114: The mobile management application parses the downloaded application installation package, and obtains the application version number and the application package name from the parsing result;

[0150] Step 115: The mobile management application obtains the application version number of the installed corresponding application according to the application package name, judges whether the application version number obtained from the parsing result is higher than the application version number of the installed corresponding application, if yes, step 116 is executed, if not, the process is ended;

[0151] Specifically, in the embodiment, step 115 comprises:

[0152] Step 115-0: The mobile management application acquires the detailed information of the installed application according to the application package name, and acquires the application version number of the corresponding installed application from the detailed information;

[0153] Specifically, in this embodiment, the detailed information of the application includes the version number and version name of the installed application, etc.

[0154] Step 115-1: The mobile management application judges whether the application version number acquired from the parsing result is lower than the application version number of the corresponding installed application. If yes, an error is reported, and the process ends. Otherwise, step 115-2 is performed.

[0155] Optionally, in this embodiment, when the result of the judgment in this step is yes, failure information is reported. For example, the failure information is STATUS_PUSH_LOWER_VERSION_FAILED.

[0156] Step 115-2: The mobile management application judges whether the application version number acquired from the parsing result is equal to the application version number of the corresponding installed application. If yes, the process ends. Otherwise, step 116 is performed.

[0157] Optionally, in this embodiment, when the result of the judgment in this step is yes, success information can also be reported. For example, the success information is STATUS_PUSH_SUCCESS.

[0158] Step 116: The mobile management application judges whether the current application to be installed is the mobile management application. If yes, step 122 is performed. Otherwise, step 117 is performed.

[0159] Step 117: The mobile management application judges whether there is another application to be installed that has been successfully downloaded in the application push task database. If yes, step 118 is performed. Otherwise, the process ends.

[0160] Step 118: The mobile management application silently installs the other application, and judges whether the installation is successful. If yes, step 119 is performed. Otherwise, the process ends.

[0161] Specifically, in this embodiment, step 118 includes:

[0162] Step 118-1: The mobile management application calls the silent installation interface, judges whether the application installation package exists according to the installation package path parameter of the silent installation interface. If yes, step 118-2 is performed. Otherwise, a callback interface is used to return failure information, and the process ends.

[0163] For example, the encapsulated silent installation interface in this embodiment is void install(String apkFilePath, InstallResultCallback callback, Class <installresultreceiver>receiver); wherein, apkFilePath is the path of the installation package, callback is the callback interface, and receiver is the first broadcast receiver;

[0164] The callback interface is specifically public interface InstallResultCallback{

[0165] public void getInstallResult(boolean isSuccess, String pkgName);

[0166] }

[0167] wherein, isSuccess is the result of the silent installation: success or failure, and pkgName is the application installation package name;

[0168] Step 118-2: The mobile management application parses the application installation package name from the application installation package, and judges whether the application installation package name is empty. If yes, the callback interface is used to return the failure information, and the process ends. If no, step 118-3 is performed.

[0169] Step 118-3: The mobile management application obtains the first object and creates the second object, sets the installation session mode of the second object, and sets the size of the second object to the size of the application installation package.

[0170] For example, the first object in the embodiment is PackageInstaller, and the second object is PackageInstaller.SessionParams. The installation session mode of the second object (Session once effective application installation) is set to FULL_INSTALL (in this mode: if the application is not installed, it is directly installed; if the application is already installed, the existing application is replaced), and the size of the second object is set to the size of the application installation package (sessionParams.setSize()).

[0171] Step 118-4: The mobile management application creates an installation session according to the first object by taking the second object as a parameter, and obtains the corresponding installation session identifier.

[0172] That is, the mobile management application passes the second object to the first object to create an installation session according to the first object.

[0173] Optionally, the installation session in this step is Session, and the installation session identifier is sessionId.

[0174] Step 118-5: The mobile management application judges the value of the installation session identifier. If the value is a first preset value, the mobile management application returns a creation failure message through a callback interface and ends. Otherwise, the mobile management application performs step 118-6.

[0175] Optionally, the first preset value in this step is -1.

[0176] Step 118-6: The mobile management application copies the application installation package to a specified directory according to the first object, the installation session identifier, and the installation package path. If the copying is successful, the mobile management application performs step 118-7. Otherwise, the mobile management application returns an installation failure message through a callback interface and ends.

[0177] Specifically, the mobile management application copies the application installation package to the specified directory according to the first object, the installation session identifier, and the installation package path through a copy interface. For example, the copy interface is Session.openWrite("base.apk", 0, apkFile.length()).

[0178] Step 118-7: The mobile management application installs the application according to the first object, the installation session identifier, the installation package path, and a first broadcast receiver.

[0179] Specifically, in this embodiment, the mobile management application calls a method of PackageInstaller to install the application by taking the first object, the installation session identifier, the installation package path, and the first broadcast receiver as parameters.

[0180] Further, when the method of PackageInstaller is called, the method of PackageInstaller judges the installation mode of the session mode. If the current application is not installed, the method of PackageInstaller starts direct installation. If the current application is installed, the method of PackageInstaller starts overwriting installation. If an error occurs during the installation, the method of PackageInstaller returns an installation error message through a callback interface and ends. Otherwise, the method of PackageInstaller notifies the system to send a broadcast of an installation result.

[0181] In this embodiment, the first broadcast receiver listens to the broadcast sent by the system. An application that provides a system interface obtains the application installation state from the broadcast. The application notifies the callback interface to return a corresponding installation result to the mobile management application according to the obtained application installation state. The mobile management application saves the installation result after receiving the installation result. The installation result is installation success or installation failure.

[0182] For example, the system sends an "android.content.pm.extra.STATUS" broadcast, and the InstallResultReceiver listens to the "android.content.pm.extra.STATUS" broadcast to obtain the status of the application installation and the package name of the application from the "android.content.pm.extra.STATUS" broadcast.

[0183] If the status is equal to PackageInstaller.STATUS_SUCCESS (value 0), it indicates that the installation is successful, and the callback interface returns the installation result of the successful installation; otherwise, it indicates that the installation fails, and the callback interface returns the installation result of the failed installation.

[0184] Step 119: The mobile management application updates the installed application list, reports the application installation success information to the background server, and deletes the application installation package of the successful installation.

[0185] Specifically, in this embodiment, the mobile management application updates the installed application list, including: the mobile management application adds the information of the successfully installed application to the installed application list.

[0186] Step 120: The mobile management application determines whether there is an application waiting for installation in the application pushing task database, and if yes, step 121 is performed, otherwise, the process ends.

[0187] Step 121: The mobile management application obtains an application waiting for installation from the application pushing task database, and returns to step 109.

[0188] Step 122: The mobile management application sends a broadcast for updating the mobile management application.

[0189] For example, the broadcast in this embodiment is SEND_UPDATE_SMA_ACTION.

[0190] Step 123: When the application providing the system interface receives the broadcast for updating the mobile management application, it is determined whether the path of the mobile management application update package is empty, and if yes, an error is reported and the process ends, otherwise, step 124 is performed.

[0191] In this embodiment, before step 123, the following steps are further included.

[0192] Step A1: The application providing the system interface registers a second broadcast receiver for listening to the broadcast for updating the mobile management application sent by the mobile management application.

[0193] In the embodiment, the application installation package path is acquired from the received broadcast, specifically, the application installation package path is acquired from the received broadcast through an acquisition interface; for example, the start service interface in the step is startService(), which is a standard interface of the Android system; and the acquisition interface is String getApkPackageName(String apkPath).

[0194] For example, the status bar is / frameworks / base / packages / SystemUI / src / com / android / systemui / statusbar / phone / StatusBar.java, and the action "com.feitian.storm.smaagent.update_sma" of updating the mobile management application is an Action.

[0195] The second broadcast receiver in the embodiment is used to listen to the broadcast of updating the mobile management application sent by the mobile management application.

[0196] In step 124, the application providing the system interface starts the service of installing the mobile management application, starts to silently install the new version of the mobile management application according to the mobile management application update package, and judges whether the installation is successful. If yes, step 125 is executed; otherwise, step 126 is executed.

[0197] In the embodiment, when the application providing the system interface starts to silently install the new version of the mobile management application, the Android system will kill the running old version of the mobile management application.

[0198] In the embodiment, before the application providing the system interface silently installs the new version of the mobile management application according to the mobile management application update package, some modifications need to be made to the application providing the system interface, and some parameters need to be set, including:

[0199] The permission of installing the application is declared in the configuration manifest file of the application providing the system interface; the first broadcast receiver for listening to the broadcast of the result of silently installing the application is configured in the configuration manifest file; and the permission configuration file of the application providing the system interface is modified to add the permission of installing the application to the application providing the system interface; for example, the configuration manifest file is AndroidManifest.xml, and the permission configuration file of the application providing the system interface is / frameworks / base / data / etc / com.android.systemui.xml.

[0200] Specifically, in the embodiment, step 124 includes:

[0201] Step H1: the application providing the system interface starts the installation mobile management application service by starting the service interface;

[0202] Step H2: the application providing the system interface calls the encapsulated silent installation interface, judges whether the mobile management application update package exists according to the path of the mobile management application update package, if yes, executes step H3, otherwise, uses the callback interface to return a failure information and ends;

[0203] For example, the encapsulated silent installation interface in the embodiment is void install(String apkFilePath, InstallResultCallback callback, Class <installresultreceiver>receiver) ; wherein, apkFilePath is the path of the installation package, callback is the callback interface, and receiver is the first broadcast receiver;

[0204] The callback interface is specifically public interface InstallResultCallback{

[0205] public void getInstallResult(boolean isSuccess, String pkgName) ;

[0206] }

[0207] wherein, isSuccess is the result of the silent installation: success or failure, and pkgName is the mobile management application update package name;

[0208] Step H3: The application providing the system interface parses the mobile management application update package name from the mobile management application update package, and judges whether the mobile management application update package name is empty. If yes, the callback interface is used to return the failure information, and the process ends. If no, step H4 is performed.

[0209] Step H4: The application providing the system interface obtains the first object and creates the second object, sets the installation session mode of the second object, and sets the size of the second object as the size of the mobile management application update package.

[0210] For example, the first object in the embodiment is PackageInstaller, and the second object is PackageInstaller.SessionParams. The installation session mode of the second object (Session once effective application installation) is set as FULL_INSTALL (in this mode: if the application is not installed, it is directly installed; if the application has been installed, the existing application is replaced), and the size of the second object is set as the size of the mobile management application update package (sessionParams.setSize()).

[0211] Step H5: The application providing the system interface creates the installation session of the mobile management application according to the first object and the second object, and obtains the corresponding installation session identifier.

[0212] Optionally, the application providing the system interface creates an installation session of the mobile management application according to the first object and the second object through a creation interface. For example, the creation interface in this step is Int createSession(PackageInstallerpackageInstaller, PackageInstaller.SessionParams sessionParams); the installation session is Session, and the installation session identifier is sessionId;

[0213] Step H6: The application providing the system interface determines the value of the installation session identifier. If it is the first preset value, a creation failure message is returned through the callback interface, and the process ends; otherwise, step H7 is executed.

[0214] Optionally, the first preset value in this step is -1;

[0215] Step H7: The application providing the system interface copies the mobile management application update package to the designated directory based on the first object, the installation session identifier, and the path of the mobile management application update package, and determines whether the copy is successful. If so, step H8 is executed; otherwise, an installation failure message is returned through the callback interface, and the process ends.

[0216] Specifically, in this step, the mobile management application copies the mobile management application update package to the specified directory through a copy interface according to the first object, the installation session identifier, and the installation package path. For example, the copy interface is: booleancopyInstallFile(PackageInstaller packageInstaller, int sessionId, StringapkFilePath);

[0217] Step H8: The application providing the system interface starts installing the mobile management application according to the first object, the installation session identifier, the path of the mobile management application update package, and the first broadcast receiver. If an error occurs during the installation process, an installation error message is returned through the callback interface. Otherwise, step H9 is executed.

[0218] Specifically, in this embodiment, the mobile management application takes the first object, the installation session identifier, the path of the mobile management application update package, and the first broadcast receiver as parameters, and calls the installation interface to start installing the mobile management application; for example, the installation interface is boolean execInstallCommand(PackageInstaller packageInstaller, intsessionId,Class <installresultreceiver>receiver, String pkgName);

[0219] Step H9: The application providing the system interface judges whether the installation of the mobile management application is successful. If yes, the application providing the system interface sends a broadcast of installation success, executes step 125; otherwise, the application providing the system interface sends a broadcast of installation failure, executes step 126.

[0220] In the embodiment, the first broadcast receiver is used to listen to the broadcast of the application installation state change sent by the Android system bottom layer, takes out the state from the listened broadcast, and notifies the callback interface to return the corresponding installation result according to the state; the installation result is installation success or installation failure;

[0221] For example, the system sends the "android.content.pm.extra.STATUS" broadcast, and the InstallResultReceiver listens to the "android.content.pm.extra.STATUS" broadcast, and obtains the status status and the package name packageName of the application installation from the broadcast;

[0222] If the value of the status is 0, it indicates that the installation is successful, and the callback method returns the result of installation success; otherwise, it indicates that the installation fails, and the callback method returns the result of installation failure.

[0223] In the embodiment, InstallSmaService (service for installing mobile management application) is a class of custom implementation, which is inherited from Service component of Android, has no interface, runs in the background, and is suitable for performing time-consuming operation without interface. After the Service is started, the SMA update package is silently installed according to the application installation package path (apkPath) obtained by the previous broadcast, the "InstallResultReceiver" and "InstallResultCallback" callback interfaces declared in the manifest are configured, the installation result is returned through the "InstallResultCallback" callback interface, and the file name of the SMA update package is renamed according to the installation result in the callback interface; InstallSmaService starts the core service of SMA in the form of startService(). The implementation of silent installation is encapsulated in "InstallUtils.java", and "InstallUtils" encapsulates the implementation of interfaces related to silent installation of application (interfaces mentioned in the previous silent installation application process), including: obtaining interface, encapsulating interface, callback interface, creating interface, copying interface, installing interface, renaming interface, etc.

[0224] Step 125: the application of the system interface changes the mobile management application update package to a mobile management application update success file, and starts a new version of the mobile management application;

[0225] In the embodiment, step 125 is specifically that the application of the system interface changes the file name of the mobile management application update package to the original file name + update success through the renaming interface.

[0226] For example, the renaming interface is void renameFile (String path, boolean value); the original file name of the mobile management application update package is "SMAAgent_V1.1.1.100198.211125_release-signed.apk", and if the update is successful, the file name of the mobile management application update package is changed to "SMAAgent_V1.1.1.100198.211125_release-signed.apk.true";

[0227] Step 126: the application of the system interface changes the mobile management application update package to a mobile management application update failure file, and starts an old version of the mobile management application;

[0228] In the embodiment, the step 126 is specifically that the application providing the system interface changes the file name of the mobile management application update package to the original file name+update failure through the interface of renaming.

[0229] For example, the original file name of the mobile management application update package is "SMAAgent_V1.1.1.100198.211125_release-signed.apk", and if the update fails, the file name of the mobile management application update package is changed to "SMAAgent_V1.1.1.100198.211125_release-signed.apk.false".

[0230] Specifically, the application providing the system interface starts the mobile management application (old version or new version) in the embodiment, including:

[0231] The step P1: the application providing the system interface starts the main service of the mobile management application through the started service of installing the mobile management application, and sets the operation parameter transmitted by the main service of the mobile management application to update the mobile management application, and saves the installation result of updating the mobile management application; the main service of the mobile management application inherits the standard service component of Android;

[0232] In the embodiment, the application providing the system interface calls the started service of installing the mobile management application, and the service of installing the mobile management application starts the main service of the mobile management application through the interface of startService(); the updated mobile management application is com.feitian.storm.smaagent.upgrade_sma;

[0233] Specifically, if the started is the old version of the mobile management application, the corresponding installation result is installation failure, and if the started is the new version of the mobile management application, the corresponding installation result is installation success;

[0234] The step P2: the mobile management application judges whether the currently running is the main process of the mobile management application, yes, then the initialization of the mobile management application is performed; otherwise, the process is ended.

[0235] In another step, the initialization of the mobile management application includes: initializing the system development software tool kit, initializing some tool auxiliary classes, obtaining the location service for reporting the device positioning, initializing the application push task database, initializing the component for downloading the file, and initializing the third broadcast receiver.

[0236] The initializing the third broadcast receiver comprises: listening to a system network connection change broadcast, and initializing a push environment. The initializing the push environment comprises: when detecting that a device network has changed, performing an operation of initializing the push environment, starting a background server, and connecting the background server; when successfully connecting to the background server, starting a database connection service, checking states of various push tasks of the mobile management application, and reporting the background server; for example, the listening to the system network connection change broadcast is ConnectivityManager.CONNECTIVITY_ACTION ("android.net.conn.ConnectivityChange").

[0237] Optionally, the checking the states of the various push tasks of the mobile management application and reporting the background server comprises: checking an application push task database, and corresponding to a previous mobile management application starting and checking an application push task process, if there is an update record of the mobile management application, the final update result is synchronized to the background server.

[0238] Other important services in the mobile management application are service components inherited from an Android standard, and the other services comprise: a service for updating a security chip firmware when the device is started; a service for maintaining communication with a server, and the mobile management application receives various push instructions sent by the background server by means of the push environment; a service for processing maintenance of an application push task database of the mobile management application and execution of various tasks; and a service for synchronizing device states (comprising: a device system state, a network state, and positioning information), and the service is started after the device is started if the device is in an active state.

[0239] Step P3: The main service (MainService) of the mobile management application checks whether an incoming operation parameter is an update of the mobile management application, if yes, acquires a saved installation result, judges whether the mobile management application is successfully updated according to the installation result, if yes, executes step P4, otherwise ends.

[0240] For example, the installation result in this step is an "installResult" field.

[0241] Step P4: The mobile management application checks whether there is an installation task record of the mobile management application in an application push task database, if yes, updates a push state of the mobile management application update task in the application push task database according to the installation result, otherwise ends.

[0242] Optionally, the push state of the mobile management application update task in the application push task database is updated according to the installation result, including: if the installation result is true, the push state is updated to STATUS_PUSH_SUCCESS; otherwise, the push state is updated to STATUS_PUSH_FAILED.

[0243] In this step, only the push state is updated, and no report is made to the server.

[0244] Optionally, in the embodiment, after the mobile management application is completed, the application providing the system interface starts the mobile management application, and the mobile management application is self-checked after being started, and the specific flow is as shown in Figure 4

[0245] Step B1: After the mobile management application is started, the application push task database is checked to determine whether there is an unprocessed application push task, and if yes, step B2 is performed, otherwise, the process is ended.

[0246] Optionally, before step B1, the process further includes: the background server initiates a push task, and sends a list to be pushed to the mobile management application; and the mobile management application receives the list to be pushed and saves the list to a data table in the application push task database.

[0247] Specifically, the determination of whether there is an unprocessed application push task includes: all the state words in the data table in the application push task database are traversed, and if all the state words are pushed, there is no unprocessed application push task, otherwise, there is an unprocessed application push task.

[0248] Step B2: The mobile management application determines whether the current installation task is in an ending state, and if yes, step B3 is performed, otherwise, step B4 is performed.

[0249] Step B3: The mobile management application reports the background server application installation ending information, deletes the installation record of the mobile management application, deletes the mobile management application update package, and ends.

[0250] Step B4: The mobile management application determines whether the current installation task is in a downloading state, and if yes, the application continues to be downloaded, otherwise, step B5 is performed.

[0251] Step B5: The mobile management application determines whether the current installation task state is in an installing or installation completion state, and if yes, step B6 is performed, otherwise, the process is ended.

[0252] Step B6: The mobile management application determines whether the current installation task is an update of the mobile management application, and if yes, step B7 is performed, otherwise, the application is waited to be downloaded.

[0253] ​Step B7: The mobile management application judges whether the mobile management application update success file exists, if yes, reports the update success information to the background server, deletes the mobile management application update package and the update record of the mobile management application in the application push task database, and ends, otherwise, executes step B8;

[0254] Specifically, the mobile management application judges whether the mobile management application update success file exists, specifically: the mobile management application judges whether the mobile management application update package name+update success file exists in the preset path, if yes, exists, otherwise, does not exist.

[0255] Step B8: The mobile management application judges whether the mobile management application update failure file exists, if yes, reports the update failure information to the background server, deletes the mobile management application update package and the update record of the mobile management application in the application push task database, and ends, otherwise, waits for the downloaded application.

[0256] Specifically, the mobile management application judges whether the mobile management application update failure file exists, specifically: the mobile management application judges whether the mobile management application update package name+update failure file exists in the preset path, if yes, exists, otherwise, does not exist.

[0257] The application providing the system interface is a system resident application, and can be automatically restarted quickly after being killed; has system permissions, can perform silent installation and other high-privilege operations, and has no visual impact on the user; after the mobile management application is installed, the mobile management application related service can be started smoothly. In addition to the mobile management application, the application providing the system interface can also silently install other applications.

[0258] The application provides the system interface, and the application providing the system interface is a system resident application, and can be automatically restarted quickly after being killed; has system permissions, can perform silent installation and other high-privilege operations, and has no visual impact on the user; after the mobile management application is installed, the mobile management application related service can be started smoothly. In addition to the mobile management application, the application providing the system interface can also silently install other applications.

[0259] Embodiment three

[0260] The embodiment three of the application provides an implementation device for installing an application on a smart POS device, as shown in the figure, comprising a module 51 for providing a system interface, the module 51 for providing a system interface comprises: Figure 5

[0261] The first judgment sub-module 511 is used for judging whether the path of the mobile management application update package in the broadcast is empty when the broadcast of updating the mobile management application is received, and triggering the start killing sub-module 512 if not empty.​

[0262] The starting killing submodule 512 is configured to start a service of installing the mobile management application, and trigger the first installation judgment submodule 513.

[0263] The first installation judgment submodule 513 is configured to start silent installation of the new version of the mobile management application according to the saved mobile management application update package, and judge whether the new version of the mobile management application is installed successfully. If yes, the first change starting submodule 514 is triggered, otherwise the second change starting submodule 515 is triggered. When the first installation judgment submodule 513 starts silent installation of the new version of the mobile management application, the Android system will kill the running old version of the mobile management application.

[0264] Specifically, the first installation judgment submodule 513 in the embodiment includes:

[0265] The first calling judgment unit 5131 is configured to call the encapsulated silent installation interface, judge whether the mobile management application update package exists according to the path of the mobile management application update package, and trigger the first parsing judgment unit 5132 if the mobile management application update package exists.

[0266] The first parsing judgment unit 5132 is configured to parse the mobile management application update package name from the mobile management application update package, and judge whether the mobile management application update package name is empty. If not, the first acquisition setting unit 5133 is triggered.

[0267] The first acquisition setting unit 5133 is configured to acquire the first object and create the second object, set the installation session mode of the second object, and set the size of the second object as the size of the mobile management application update package.

[0268] The first creation acquisition unit 5134 is configured to create the installation session of the mobile management application according to the first object and the second object, and acquire the corresponding installation session identifier.

[0269] The first judgment unit 5135 is configured to judge the value of the installation session identifier. If the value is not the first preset value, the first copy judgment unit 5136 is triggered.

[0270] The first copy judgment unit 5136 is configured to copy the mobile management application update package to the specified directory according to the first object, the installation session identifier and the path of the mobile management application update package, and judge whether the copying is successful. If yes, the first installation judgment unit 5137 is triggered.

[0271] The first installation judging unit 5137 is configured to start installing the mobile management application according to the first object, the installation session identifier, the path of the mobile management application update package and the first broadcast receiver, report an error if the installation process fails, end, determine whether the new version of the mobile management application is installed successfully, trigger the first change starting sub-module 514 if yes, or trigger the second change starting sub-module 515 if no.

[0272] The first change starting sub-module 514 is configured to change the mobile management application update package into a mobile management application update success file, and start the new version of the mobile management application.

[0273] The second change starting sub-module 515 is configured to change the mobile management application update package into a mobile management application update failure file, and start the old version of the mobile management application.

[0274] Optionally, the system interface providing module 51 in the embodiment further includes a first registration sub-module configured to register a second broadcast receiver for listening to the broadcast of updating the mobile management application.

[0275] Optionally, the apparatus in the embodiment further includes a first configuration modification module configured to declare, in a configuration manifest file of the system interface providing module 51, a permission of installing an application, configure, in the configuration manifest file, a first broadcast receiver for listening to a broadcast of a result of silently installing the application, and modify a permission configuration file of the application providing the system interface, and add an installation application permission to the system interface providing module 51.

[0276] In the embodiment, the first judging sub-module 511 is specifically configured to, when receiving the broadcast of updating the mobile management application, acquire, through an acquisition interface, a path of the mobile management application update package from the received broadcast, and determine whether the acquired path of the mobile management application update package is empty, and trigger the starting killing sub-module 512 if the acquired path of the mobile management application update package is not empty.

[0277] Optionally, in the embodiment, the first installation judging sub-module 513 is further configured to set the installation result as installation success if the installation is successful, and send the broadcast of updating the mobile management application with the installation result as a parameter, and set the installation result as installation failure if the installation fails, and send the broadcast of updating the mobile management application with the installation result as a parameter.

[0278] Specifically, the apparatus in the embodiment further includes a mobile management module.

[0279] The first broadcast receiver listens to a broadcast of a change of an application installation state sent by an Android system bottom layer, takes out the application installation state from the broadcast, and notifies a callback interface according to the application installation state to return a corresponding installation result to the mobile management module, and the mobile management application saves the received installation result.

[0280] The first change start sub-module 514 starts the new version mobile management application or the second change start sub-module 515 starts the old version mobile management application, and the specific process includes:

[0281] The main service of the mobile management module is started through the started service of installing the mobile management application, and the operation parameter transmitted to the main service of the mobile management module is set as the update mobile management application, and the installation result of the update mobile management application is saved; the main service of the mobile management module inherits the service component of the Android standard;

[0282] The mobile management module is used for judging whether the currently running is the main process of the mobile management application, if yes, the initialization of the mobile management application is performed; otherwise, the process is ended;

[0283] In the embodiment, the initialization of the mobile management application includes: initializing the application push task database, initializing the component for downloading files, and initializing the third broadcast receiver;

[0284] Further, the third broadcast receiver is initialized, including: listening to the system network connection change broadcast and initializing the push environment;

[0285] Further, the push environment is initialized, including: when the device network is monitored to change, the operation of initializing the push environment is performed, the background server is started, and the background server is connected; when the background server is successfully connected, the database connection service is started, the state of each push task of the mobile management application is checked, and the background server is reported;

[0286] The mobile management module is used for checking whether the transmitted operation parameter is the update mobile management application through the main service of the mobile management module, if yes, the saved installation result is acquired, and whether the mobile management application is successfully updated is judged according to the installation result; if yes, whether there is an installation task record of the mobile management application in the application push task database is checked; if yes, the push state of the mobile management application update task in the application push task database is updated according to the installation result; otherwise, the process is ended; if no, the process is ended.

[0287] After the mobile management application is started, the mobile management module is used for self-checking, and the mobile management module includes:

[0288] The checking and judging sub-module is used for checking the application push task database after the mobile management application is started, and judging whether there is an unprocessed application push task, if yes, the second judging sub-module is triggered, otherwise, the process is ended;

[0289] The second judging sub-module is used for judging whether the current installation task is in the end state, if yes, the reporting and deleting sub-module is triggered, otherwise, the third judging sub-module is triggered;

[0290] The reporting deletion submodule is configured to report the background server application installation end information, delete the installation record of the mobile management application, delete the mobile management application update package, and end;

[0291] The third judging submodule is configured to judge whether the current installation task is in a downloading state, and if yes, continue to download the application, and if not, trigger the fourth judging submodule;

[0292] The fourth judging submodule is configured to judge whether the current installation task state is in an installing or installation completion state, and if yes, trigger the fifth judging submodule, and if not, end;

[0293] The fifth judging submodule is configured to judge whether the current installation task is the update of the mobile management application, and if yes, trigger the first judging deletion submodule, and if not, wait for downloading the application;

[0294] The first judging deletion submodule is configured to judge whether the mobile management application update success file exists, and if yes, report the update success information to the background server, delete the mobile management application update package and the update record of the mobile management application in the application push task database, and end, and if not, trigger the second judging deletion submodule;

[0295] The second judging deletion submodule is configured to judge whether the mobile management application update failure file exists, and if yes, report the update failure information to the background server, delete the mobile management application update package and the update record of the mobile management application in the application push task database, and end, and if not, wait for downloading the application.

[0296] Optionally, the mobile management module in the embodiment further comprises a receiving and saving submodule configured to receive the list to be pushed sent by the background server and save the list to the data table of the application push task database after the background server initiates the push task.

[0297] In the embodiment, the checking and judging submodule judges whether there is an unprocessed application push task, including that the checking and judging submodule traverses all the state words in the data table of the application push task database, and if all the state words are pushed, there is no unprocessed application push task, and otherwise, there is an unprocessed application push task.

[0298] Optionally, the mobile management module in the embodiment further comprises:

[0299] The first receiving submodule is configured to receive the application installation package pushed by the background server;

[0300] The sixth judging submodule is configured to judge whether the downloading condition is met, and if yes, trigger the first adding submodule, and if not, report an error and end;

[0301] The first adding submodule is configured to add the task of downloading the application to the application push task database, and trigger the downloading submodule.

[0302] the downloading submodule is configured to start downloading the application, and trigger the seventh judging submodule if the downloading is successful;

[0303] the seventh judging submodule is configured to judge whether the current application to be installed, which is downloaded successfully, meets the installation condition, and trigger the first judging and notifying submodule if yes;

[0304] the first judging and notifying submodule is configured to judge whether the current application to be installed is a mobile management application, and trigger the mobile management application to broadcast and notify the system interface of the application update mobile management application if yes, otherwise, trigger the eighth judging submodule;

[0305] the eighth judging submodule is configured to judge whether there is other application to be installed, which is downloaded successfully, in the application pushing task database, and trigger the installation processing submodule if yes, otherwise, end;

[0306] the installation processing submodule is configured to silently install the other application, and update the installed application list, report the application installation success information to the background server, delete the application installation package installed successfully, and trigger the judging and obtaining submodule if the installation is successful;

[0307] the judging and obtaining submodule is configured to judge whether there is application to be downloaded in the application pushing task database, and obtain an application to be downloaded, and trigger the downloading submodule if yes, otherwise, end.

[0308] Further, the sixth judging submodule comprises:

[0309] the second judging unit is configured to judge whether the name of the application installation package is empty, and end if yes, otherwise, trigger the third judging unit;

[0310] the third judging unit is configured to judge whether the application version number in the application installation package is higher than the application version number of the corresponding installed application, and trigger the first query judging unit if yes, otherwise, end;

[0311] the first query judging unit is configured to query the application pushing task database, and judge whether the number of application installation tasks in the application pushing task database is within a preset range, and trigger the fifth judging unit if yes, otherwise, trigger the fourth judging unit;

[0312] the fourth judging unit is configured to judge whether the number of application installation tasks in the application pushing task database is equal to a first preset value, and end if yes, otherwise, trigger the first deleting unit;

[0313] the first deleting unit is configured to delete all application installation packages downloaded completely in the application pushing task database, and end;

[0314] The fifth judging unit is used for judging whether there is a mobile management application in the application being installed, and if yes, an error is reported and the process is ended, otherwise the first adding submodule is triggered.

[0315] Further, the downloading submodule in the embodiment comprises:

[0316] The downloading and saving judging unit is used for starting to download the application installation package and saving it in a preset path, judging whether the application installation package is downloaded completely, and if yes, triggering the seventh judging submodule, otherwise triggering the continuous downloading judging unit.

[0317] The continuous downloading judging unit is used for continuing to download the application installation package, and judging whether the downloading is successful, and if yes, triggering the seventh judging submodule, otherwise triggering the sixth judging unit.

[0318] The sixth judging unit is used for judging whether the downloading of the application installation package is timed out, and if yes, triggering the downloading and saving judging unit, otherwise triggering the seventh judging unit.

[0319] The seventh judging unit is used for judging whether the downloading process is interrupted, and if yes, triggering the downloading and saving judging unit, otherwise triggering the eighth judging unit.

[0320] The eighth judging unit is used for judging whether the downloading process appears a server internal error, and if yes, an error is reported and the process is ended, otherwise triggering the downloading and saving judging unit.

[0321] Further, the seventh judging submodule in the embodiment is specifically used for judging whether the application version number in the application installation package is higher than the application version number of the corresponding application already installed, and if yes, triggering the first judging and notifying submodule, otherwise ending.

[0322] Further, in the embodiment, the installation processing submodule comprises:

[0323] The second calling judging unit is used for calling a silent installation interface, judging whether the application installation package exists according to the installation package path parameter of the silent installation interface, and if yes, triggering the second parsing judging unit, otherwise an error is reported and the process is ended.

[0324] The second parsing judging unit is used for parsing the application installation package name from the application installation package, and judging whether the application installation package name is empty, and if yes, an error is reported and the process is ended, otherwise triggering the second acquisition setting unit.

[0325] The second acquisition setting unit is used for acquiring the first object and creating a second object, setting the installation session mode of the second object and setting the size of the second object as the size of the application installation package.

[0326] The second creating acquisition unit is used for taking the second object as a parameter, creating an installation session according to the first object and acquiring the corresponding installation session identification.

[0327] The ninth judging unit is used for judging whether the value of the installation session identifier is the first preset value, if yes, an error is reported and the process is ended, otherwise the second copy judging unit is triggered;

[0328] The second copy judging unit is used for copying the application installation package to a specified directory according to the first object, the installation session identifier and the installation package path, and judging whether the copying is successful, if yes, the second installation judging unit is triggered, otherwise an error is reported and the process is ended.

[0329] The second installation judging unit is used for installing the application according to the first object, the installation session identifier, the installation package path and the first broadcast receiver, if the installation is successful, the installed application list is updated, the application installation successful information is reported to the background server, the application installation package of the installation success is deleted, and the judging obtaining submodule is triggered.

[0330] The technical scheme of the present application can push the mobile management application update package by the background server in the case that the smart POS device does not install the application market, install and update the mobile management application by means of the application providing the system interface and restart the mobile management application, without restarting the smart POS device, so that the updating of the mobile management application is realized, and the management and control of the smart POS device by the mobile management application is ensured, and the user is facilitated to use.

[0331] Optionally, the embodiment of the present application further provides a smart POS device, which comprises at least one processor, a memory and instructions stored in the memory and executable by the at least one processor, and the at least one processor executes the instructions to realize the implementation method of installing the application on the smart POS device in the above embodiment. When the smart POS device is a chip system, the smart POS device can be composed of a chip or can comprise the chip and other discrete devices, and the embodiment of the present application does not make a specific limitation hereon; the chip is coupled with the memory and is used for executing the computer program stored in the memory to execute the implementation method of installing the application on the smart POS device disclosed in the above embodiment.

[0332] In the above embodiments, all or part of the embodiments can be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or part of the embodiments can be implemented in the form of a computer program product. The computer program product includes one or more computer programs. When the computer programs are loaded on and executed by the intelligent POS device, all or part of the processes or functions described in the embodiments of the present application are generated. The computer programs can be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another computer readable storage medium, for example, the computer programs can be transmitted from one base station, intelligent POS device, server or data center to another base station, intelligent POS device, server or data center through a wired (for example, coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (for example, infrared, wireless, microwave, etc.) manner. The computer readable storage medium can be any available medium accessible by the intelligent POS device or a data storage device including one or more servers, data centers, etc. integrated with the medium. The available medium can be a magnetic medium (for example, a floppy disk, a hard disk, a magnetic tape), an optical medium (for example, a DVD), or a semiconductor medium (for example, a solid state disk (SSD)), etc. In the embodiments of the present application, the intelligent POS device can include the device described above.

[0333] Although the present application is described herein in conjunction with various embodiments, it is understood that other variations of the disclosed embodiments can be understood and effected by those skilled in the art in practicing the claimed application, from an inspection of the drawings, the disclosure, and the appended claims. In the claims, the word "comprising" does not exclude other components or steps, and the indefinite articles "a" or "an" do not exclude a plurality. A single processor or other unit can fulfill the functions of several items recited in the claims. The mere fact that certain measures are recited in mutually different dependent claims does not indicate that a combination of these measures cannot be used to advantage.

[0334] Although the present application is described herein in conjunction with specific features and embodiments thereof, it is understood that modifications and combinations can occur to those skilled in the art to which the present application pertains, within its spirit and scope. Accordingly, the description and drawings are to be regarded as illustrative in nature and are not to be regarded as limiting the scope of the application as defined in the appended claims. Obviously, various modifications and changes can be made to the present application by those skilled in the art without departing from the spirit and scope of the present application. Thus, it is intended that the present application encompass all such modifications and changes and, accordingly, the scope of the application should not be limited by the above description but should be defined only in accordance with the following claims.< / installresultreceiver> < / installresultreceiver> < / installresultreceiver>

Claims

1. A method for installing an application on a smart POS device, characterized in that: include: Step S1: When the application providing the system interface receives a broadcast for updating the mobile management application, it determines whether the path of the mobile management application update package in the broadcast is empty. If not, step S2 is executed; Step S2: The application providing the system interface starts the service for installing the mobile management application, silently installs the new version of the mobile management application according to the saved mobile management application update package, and determines whether the new version of the mobile management application is successfully installed. If so, step S3 is executed; otherwise, step S4 is executed. When the silent installation of the new version of the mobile management application begins, the Android system kills the running old version of the mobile management application. Step S3: the application providing the system interface changes the mobile management application update package to a mobile management application update success file, and starts the new version of the mobile management application; Step S4: the application providing the system interface changes the mobile management application update package to a mobile management application update failure file, and starts the old version of the mobile management application; The step of silently installing the new version of the mobile management application according to the saved mobile management application update package includes: Step S21: the application providing the system interface calls the packaged silent installation interface and determines whether the mobile management application update package exists according to the path of the mobile management application update package. If so, step S22 is executed; Step S22: the application providing the system interface parses the mobile management application update package to obtain a mobile management application update package name from the mobile management application update package, and determines whether the mobile management application update package name is empty. If not, step S23 is executed. Step S23: the application providing the system interface obtains the first object and creates a second object, sets the installation session mode of the second object and sets the size of the second object to the size of the mobile management application update package; Step S24: the application providing the system interface creates an installation session of the mobile management application according to the first object and the second object, and obtains a corresponding installation session identifier; Step S25: The application providing the system interface determines the value of the installation session identifier, and if it is not the first preset value, executes step S26; Step S26: the application providing the system interface copies the mobile management application update package to a designated directory based on the first object, the installation session identifier, and the path of the mobile management application update package, and determines whether the copying is successful. If the copying is successful, step S27 is executed. Step S27: The application providing the system interface starts installing the mobile management application according to the first object, the installation session identifier, the path of the mobile management application update package, and the first broadcast receiver. If an error occurs during the installation process, an error is reported and the process ends. Otherwise, it is determined whether the new version of the mobile management application is successfully installed. Before silently installing the new version of the mobile management application according to the saved mobile management application update package, the method further includes: declaring permission to install applications in a configuration manifest file of the application providing the system interface; configuring a first broadcast receiver in the configuration manifest file for listening to broadcasts of results of the silent application installation; and modifying a permission configuration file of the application providing the system interface to add permission to install applications to the application providing the system interface. The step S2 further includes: if the installation is successful, the application providing the system interface sets the installation result to installation success, and uses the installation result as a parameter to issue a broadcast for updating the mobile management application; if the installation fails, the application providing the system interface sets the installation result to installation failure, and uses the installation result as a parameter to issue a broadcast for updating the mobile management application; The first broadcast receiver listens to the broadcast of application installation status changes issued by the bottom layer of the Android system, extracts the application installation status from the broadcast and returns the corresponding installation result to the mobile management application according to the application installation status notification callback interface, and the mobile management application saves the received installation result.

2. The method according to claim 1, wherein Before step S1, the following steps are also included: Step A1: the application providing the system interface registers a second broadcast receiver that monitors and updates the mobile management application broadcast.

3. The method according to claim 1, wherein The determining whether the path of the mobile management application update package in the broadcast is empty includes: obtaining the path of the mobile management application update package from the received broadcast through an acquisition interface, and determining whether the obtained path of the mobile management application update package is empty.

4. The method according to claim 1, wherein Starting the new version of the mobile management application and starting the old version of the mobile management application include: Step S51: The application providing the system interface starts the main service of the mobile management application through the service for installing the mobile management application that has been started, sets the operation parameters passed in by the main service for starting the mobile management application to update the mobile management application, and saves the installation result of the updated mobile management application; the main service of the mobile management application inherits the service components of the Android standard; Step S52: the mobile management application determines whether the currently running process is the main process of the mobile management application. If yes, the mobile management application is initialized; otherwise, the process ends. Step S53: The main service of the mobile management application checks whether the operation parameter passed in when starting the application is to update the mobile management application. If so, the main service obtains the saved installation result and determines whether the mobile management application is updated successfully based on the installation result. If so, the main service executes step S54; otherwise, the main service terminates. Step S54: the mobile management application checks whether there is any installation task record of the mobile management application in the application push task database. If yes, the push status of the mobile management application update task in the application push task database is updated according to the installation result; otherwise, the process ends.

5. The method according to claim 4, wherein The initialization of the mobile management application includes: initializing the application push task database, initializing a component for downloading files, and initializing a third broadcast receiver.

6. The method according to claim 5, wherein Initializing the third broadcast receiver includes: monitoring the system network connection change broadcast and initializing the push environment.

7. The method according to claim 6, wherein The initialization push environment specifically includes: when a change in the device network is detected, executing the operation of initializing the push environment, starting the background server, and connecting to the background server; when the background server is successfully connected, starting the database connection service, checking the status of each push task of the mobile management application, and reporting to the background server.

8. The method according to claim 1, wherein After the mobile management application is started, the method further includes the mobile management application performing a self-test, including: Step B1: After the mobile management application is started, the application push task database is checked to determine whether there are any unprocessed application push tasks. If yes, step B2 is executed; otherwise, the process ends. Step B2: The mobile management application determines whether the current installation task is in the end state. If yes, execute step B3; otherwise, execute step B4. Step B3: The mobile management application reports the application installation completion information to the backend server, deletes the installation record of the mobile management application, deletes the mobile management application update package, and ends; Step B4: The mobile management application determines whether the current installation task is in a downloading state. If yes, the application continues to be downloaded. Otherwise, step B5 is executed. Step B5: The mobile management application determines whether the current installation task status is in the process of installing or completed. If yes, execute step B6; otherwise, terminate. Step B6: The mobile management application determines whether the current installation task is to update the mobile management application. If so, step B7 is executed; otherwise, the application is waited for downloading. Step B7: The mobile management application determines whether a mobile management application update success file exists. If so, it reports update success information to the backend server and deletes the mobile management application update package and mobile management application update record in the application push task database. The process ends. Otherwise, it executes step B8. Step B8: The mobile management application determines whether the mobile management application update failure file exists. If so, it reports the update failure information to the background server, deletes the mobile management application update package and the mobile management application update record in the application push task database, and ends. Otherwise, it waits for downloading the application.

9. The method according to claim 8, wherein Before step B1, the method further includes: the background server initiating a push task and sending the list to be pushed to the mobile management application; the mobile management application receiving the list to be pushed and saving it to a data table of the application push task database.

10. The method according to claim 8, wherein The determination of whether there are unprocessed application push tasks in step B1 includes: traversing all status words in the data table of the application push task database, if all status words are pushed, there are no unprocessed application push tasks, otherwise there are unprocessed application push tasks.

11. The method according to claim 1, wherein Before step S1, the following steps are also included: Step T1: The mobile management application receives the application installation package pushed by the backend server; Step T2: The mobile management application determines whether the download conditions are met. If yes, step T3 is executed; otherwise, an error is reported and the process ends. Step T3: The mobile management application adds the task of downloading the application to the application push task database; Step T4: The mobile management application starts downloading the application. If the download is successful, step T5 is executed; Step T5: The mobile management application determines whether the successfully downloaded application to be installed meets the installation conditions, and if so, executes step T6; Step T6: The mobile management application determines whether the application to be installed is a mobile management application. If so, the mobile management application broadcasts a notification to the application providing the system interface to update the mobile management application. Otherwise, step T7 is executed. Step T7: The mobile management application determines whether there are other applications to be installed that have been successfully downloaded in the application push task database. If yes, execute step T8; otherwise, end; Step T8: The mobile management application silently installs other applications. If the installation is successful, the installed application list is updated, the application installation success information is reported to the backend server, the successfully installed application installation package is deleted, and step T9 is executed; Step T9: the mobile management application determines whether there is an application waiting to be downloaded in the application push task database. If yes, an application waiting to be downloaded is obtained and the process returns to step T4. Otherwise, the process ends.

12. The method according to claim 11, wherein The step T2 comprises: Step T21: The mobile management application determines whether the name of the application installation package is empty. If so, an error message is given and the process ends. Otherwise, step T22 is executed. Step T22: The mobile management application determines whether the application version number in the application installation package is higher than the application version number of the corresponding installed application. If yes, step T23 is executed; otherwise, an error is reported and the process ends. Step T23: the mobile management application queries the application push task database and determines whether the number of application installation tasks in the application push task database is within a preset range. If yes, step T26 is executed; otherwise, step T24 is executed. Step T24: the mobile management application determines whether the number of the application installation tasks in the application push task database is equal to a first preset value. If yes, an error is reported and the process ends. Otherwise, step T25 is executed. Step T25: The mobile management application deletes all downloaded application installation packages in the application push task database, and the process ends. Step T26: The mobile management application determines whether there is a mobile management application among the applications being installed. If yes, an error message is given and the process ends. Otherwise, step T3 is executed.

13. The method according to claim 11, wherein The step T4 comprises: Step T41: The mobile management application starts downloading the application installation package and saves it in a preset path, and determines whether the application installation package is downloaded. If so, execute step T5; otherwise, execute step T42; Step T42: The mobile management application continues to download the application installation package and determines whether the download is successful. If so, step T5 is executed; otherwise, step T43 is executed. Step T43: The mobile management application determines whether the download of the application installation package has timed out. If so, the process returns to step T41; otherwise, the process proceeds to step T44. Step T44: The mobile management application determines whether the download process is interrupted. If so, the process returns to step T41; otherwise, the process goes to step T45. Step T45: The mobile management application determines whether an internal server error occurs during the download process. If so, an error is reported and the process ends. Otherwise, the process returns to step T41.

14. The method according to claim 11, wherein The step T5 includes: the mobile management application determines whether the application version number in the application installation package is higher than the application version number of the installed corresponding application, and if so, executes step T6, otherwise ends.

15. The method according to claim 11, wherein The mobile management application silently installing other applications in step T8 includes: Step T81: The mobile management application calls the silent installation interface and determines whether the application installation package exists based on the installation package path parameter of the silent installation interface. If yes, execute step T82; otherwise, report an error and end; Step T82: The mobile management application parses the application installation package to obtain the application installation package name, and determines whether the application installation package name is empty. If so, an error is reported and the process ends; otherwise, step T83 is executed. Step T83: the mobile management application obtains the first object and creates a second object, sets the installation session mode of the second object and sets the size of the second object to the size of the application installation package; Step T84: the mobility management application uses the second object as a parameter, creates an installation session based on the first object, and obtains a corresponding installation session identifier; Step T85: The mobile management application determines the value of the installation session identifier. If it is the first preset value, an error message is reported and the process ends; otherwise, step T86 is executed. Step T86: The mobile management application copies the application installation package to the designated directory based on the first object, the installation session identifier, and the installation package path, and determines whether the copy is successful. If so, step T87 is executed; otherwise, an error is reported and the process ends. Step T87: The mobile management application installs the application according to the first object, the installation session identifier, the installation package path and the first broadcast receiver.

16. A device for installing an application on a smart POS device, characterized in that: The module for providing a system interface includes: A first judgment submodule is configured to, upon receiving a broadcast of updating a mobile management application, determine whether the path of the mobile management application update package in the broadcast is empty, and trigger the start-kill submodule if it is not empty; The start-kill submodule is used to start the service of installing the mobile management application and trigger the first installation judgment submodule; The first installation determination submodule is configured to start a silent installation of the new version of the mobile management application based on the saved mobile management application update package, and to determine whether the new version of the mobile management application is successfully installed. If so, the first change start submodule is triggered, and otherwise, the second change start submodule is triggered. When the silent installation of the new version of the mobile management application begins, the Android system kills the running old version of the mobile management application. The first change startup submodule is used to change the mobile management application update package to a mobile management application update success file and start the new version of the mobile management application; The second change startup submodule is used to change the mobile management application update package to the mobile management application update failure file and start the old version of the mobile management application; The first installation judgment submodule includes: a first calling and judging unit, configured to call the encapsulated silent installation interface, and judge whether the mobile management application update package exists according to the path of the mobile management application update package, and trigger the first parsing and judging unit if the mobile management application update package exists; The first parsing and judging unit is configured to parse the mobile management application update package to obtain a mobile management application update package name from the mobile management application update package, and judge whether the mobile management application update package name is empty, and if not, trigger the first obtaining and setting unit; The first acquisition and setting unit is configured to acquire the first object and create a second object, set an installation session mode for the second object, and set the size of the second object to the size of the mobile management application update package; A first creation and acquisition unit, configured to create an installation session of the mobility management application according to the first object and the second object, and acquire a corresponding installation session identifier; a first determining unit, configured to determine a value of the installation session identifier, and trigger a first copy determining unit if the value is not a first preset value; The first copy judgment unit is used to copy the mobile management application update package to a designated directory according to the first object, the installation session identifier and the path of the mobile management application update package, and judge whether the copying is successful, and trigger the first installation judgment unit if the copying is successful; The first installation judgment unit is configured to start installing the mobile management application according to the first object, the installation session identifier, the path of the mobile management application update package, and the first broadcast receiver, and report an error if an installation process fails and terminate the process; otherwise, determine whether the new version of the mobile management application is successfully installed, and if so, trigger a first change and start submodule; otherwise, trigger a second change and start submodule; The device also includes: a first configuration modification module, configured to declare the permission to install applications in the configuration list file of the module providing the system interface; configure a first broadcast receiver for monitoring the broadcast of silent application installation results in the configuration list file; modify the permission configuration file of the module providing the system interface, and add the permission to install applications to the module providing the system interface The first installation judgment submodule is further configured to set the installation result to "installation success" if the installation is successful, and use the installation result as a parameter to issue a broadcast for updating the mobile management application; and to set the installation result to "installation failure" if the installation is unsuccessful, and use the installation result as a parameter to issue a broadcast for updating the mobile management application; The first broadcast receiver listens to the broadcast of application installation status changes issued by the bottom layer of the Android system, extracts the application installation status from the broadcast and returns the corresponding installation result to the mobile management application according to the application installation status notification callback interface, and the mobile management application saves the received installation result.

17. An intelligent POS device, characterized in that: The smart POS device includes at least one processor, a memory, and instructions stored in the memory and executable by the at least one processor. The at least one processor executes the instructions to implement the method for installing an application on a smart POS device according to any one of claims 1 to 15.

18. A computer-readable storage medium, characterized in that The computer-readable storage medium includes a computer program, which, when executed on a smart POS device, enables the smart POS device to execute the method for installing an application on a smart POS device according to any one of claims 1 to 15.

19. A chip, characterized in that: The chip is coupled to the memory and is used to execute the computer program stored in the memory to execute the method for installing an application on a smart POS device according to any one of claims 1 to 15.

Citation Information

Patent Citations

  • Application program upgrading method and system

    CN110515642A