Method and device for uninstalling application program, storage medium and electronic equipment
By obtaining and analyzing the application's public file usage information, judging and deleting unnecessary public files, the problem of public files being unable to be deleted after uninstalling the application is solved, and the device's storage space utilization and performance is improved.
Patent Information
- Application Number
- CN202311452105.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-02
- Publication Date
- 2025-05-06
AI Technical Summary
When uninstalling the application, public files cannot be deleted in time, resulting in high storage space occupancy and affecting device performance.
By receiving uninstall commands, you can obtain the application's public file usage information, including the application's identity information and usage time information, determine whether the public file needs to be deleted, and delete it when uninstalling the application.
It effectively avoids unnecessary public files accumulation, frees up storage space, improves device performance, and simplifies user operation processes.
Smart Images

Figure CN119938067A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the technical field of electronic devices, and in particular, relates to a method, device, storage medium and electronic device for uninstalling an application. Background Art
[0002] With the development of technology, users can install a variety of applications on electronic devices, which can meet the different needs of users. However, when users uninstall unnecessary applications, the public files of the applications cannot be deleted along with the uninstallation of the applications, which can easily cause the accumulation of some unnecessary public files and occupy the storage space of the electronic device. Summary of the invention
[0003] The embodiments of the present application provide a method, device, storage medium and electronic device for uninstalling an application. When uninstalling an application, some unnecessary public files of the application can be deleted to prevent unnecessary public files from occupying the storage space of the electronic device.
[0004] In a first aspect, an embodiment of the present application provides a method for uninstalling an application, the method comprising:
[0005] receiving an uninstall instruction for the first application;
[0006] In response to the uninstall instruction, obtaining usage information of a public file of the first application, where the public file is a file created by the first application and shared with other applications, the usage information including at least one of identity information of other applications using the public file and time information of other applications using the public file;
[0007] determining, based on the usage information, whether the public file needs to be deleted when uninstalling the first application;
[0008] If the public file needs to be deleted, the public file is deleted when the first application is uninstalled.
[0009] In a second aspect, an embodiment of the present application provides a device for uninstalling an application, the device comprising:
[0010] A receiving module, configured to receive an uninstall instruction for the first application;
[0011] an acquisition module, configured to acquire, in response to the uninstall instruction, usage information of a public file of the first application, wherein the public file is a file created by the first application and shared with other applications for use, the usage information including at least one of identity information of other applications using the public file and time information of other applications using the public file;
[0012] A determination module, configured to determine, based on the usage information, whether the public file needs to be deleted when the first application is uninstalled;
[0013] The deleting module is used to delete the public file when uninstalling the first application program if the public file needs to be deleted.
[0014] In a third aspect, an embodiment of the present application provides a storage medium on which a computer program is stored. When the computer program is executed on a computer, the computer executes the method provided by the embodiment of the present application.
[0015] In a fourth aspect, an embodiment of the present application further provides an electronic device, comprising a memory and a processor, wherein the processor is used to execute the method provided in the embodiment of the present application by calling a computer program stored in the memory.
[0016] In an embodiment of the present application, when receiving an uninstallation instruction for a first application, the usage information of the public file of the first application is obtained, the public file is a file created by the first application and shared with other applications, wherein the usage information includes at least one of the identity information of other applications using the public file and the time information of other applications using the public file. It can be understood that based on the usage information of the public file, the usage scope, usage time, usage frequency and other information of the public file can be obtained, so that it can be judged whether the public file needs to be deleted based on this information. For example, for public files with a wide range of use, high frequency of use, and / or recently used, the user has a high probability of needing to keep them, so when uninstalling the first application, this part of the public files can be retained; while for public files with a small range of use, low frequency of use, and / or not recently used, the user has a high probability of needing to delete them, so when uninstalling the first application, this part of the public files can be deleted. Therefore, when uninstalling the first application, the embodiment of the present application will not retain all the public files of the first application in the external storage area. At least some of the unnecessary public files can be deleted to avoid the accumulation of many public files that are not needed by users, freeing up the storage space of the electronic device, improving the utilization rate of the storage space of the electronic device, and improving the performance of the electronic device. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The technical solution and beneficial effects of the present application will be made apparent by describing in detail the specific implementation methods of the present application in conjunction with the accompanying drawings.
[0018] Figure 1 This is a first flow chart of the method for uninstalling an application provided in an embodiment of the present application.
[0019] Figure 2 This is a second flow chart of the method for uninstalling an application provided in an embodiment of the present application.
[0020] Figure 3 It is a scenario diagram of the method for uninstalling an application provided in an embodiment of the present application.
[0021] Figure 4 This is a first structural diagram of the device for uninstalling an application provided in an embodiment of the present application.
[0022] Figure 5 This is a second structural diagram of the device for uninstalling an application provided in an embodiment of the present application.
[0023] Figure 6 This is a schematic diagram of the first structure of an electronic device provided in an embodiment of the present application.
[0024] Figure 7 This is a second structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0025] Please refer to the drawings, where the same component symbols represent the same components. The principle of the present application is illustrated by implementing it in an appropriate computing environment. The following description is based on the illustrated specific embodiments of the present application, which should not be considered as limiting other specific embodiments of the present application that are not described in detail herein.
[0026] See also Figure 1 , Figure 1 1 is a schematic diagram of a first flow chart of a method for uninstalling an application provided in an embodiment of the present application. The method for uninstalling an application can be applied to an electronic device, such as a smart phone, a tablet computer, a PDA, a laptop computer, or a desktop computer. The flow of the method for uninstalling an application may include:
[0027] In 101, receiving an uninstall instruction for a first application;
[0028] In step 102, in response to the uninstall instruction, obtaining usage information of a public file of the first application, where the public file is a file created by the first application and shared with other applications, and the usage information includes at least one of identity information of other applications using the public file and time information of other applications using the public file;
[0029] In 103, judging whether it is necessary to delete the public file when uninstalling the first application according to the usage information;
[0030] In 104 , if the public file needs to be deleted, the public file is deleted when the first application is uninstalled.
[0031] With the development of technology, users can install various applications on electronic devices, and these applications can meet the different needs of users. The operating system of the electronic device can be an Android system. The storage area of files in the Android system can be divided into an internal storage area and an external storage area. The first application installed in the electronic device can be any application of the electronic device. The first application is provided with a private directory in both the internal storage area and the external storage area for storing private files. The first application is also provided with a public directory in the external storage area for storing public files. The public file is created by the first application, but can be accessed and used by other applications. For example, the public file can be opened or modified by other applications. Among them, the public file can be, for example, a document, video, audio, picture, and other types of files. In the related art, when the first application is uninstalled, all public files in the public directory of the external storage area will not be deleted. It is understandable that when the user uninstalls the first application, it means that the first application is an application that the user does not currently need to use. Therefore, many of the public files created by the first application may also be public files that the user no longer needs. If these public files are not deleted when the first application is uninstalled, then after a long time, with the installation and uninstallation of multiple applications, many public files that the user does not need will accumulate, occupying the storage space of the electronic device, and the utilization rate of the storage space is low, affecting the performance of the electronic device. If the user needs to delete the public files of the first application in a targeted manner, it is necessary to manually find the corresponding public files in the public directory of the external storage area for deletion, which is difficult for the user to identify and the operation is very inconvenient.
[0032] Therefore, in an embodiment of the present application, when an uninstall instruction for a first application is received, usage information corresponding to the public files of the first application is obtained in response to the uninstall instruction, wherein the usage information includes at least one of identity information of other applications that use the public files and time information of other applications using the public files.
[0033] According to the usage information of the public file, it can be determined whether the public file needs to be deleted when uninstalling the first application. According to the usage information of the public file, it can be clear which applications use the public file and the time information of the public file being used, that is, based on the usage information of the public file, the usage scope, usage time, usage frequency and other information of the public file can be obtained, so that the importance of the public file to other applications can be determined based on this information. For example, the importance of the public file with a wider usage scope, and / or a higher usage frequency, and / or recently used public files is higher, and the importance of the public file with a smaller usage scope, and / or a lower usage frequency, and / or recently not used is lower. For example, if the public file is used by multiple other applications, then the public file may be an important file that the user considers, and the importance of the public file is higher; for another example, if the public file is used by other applications more frequently, then the public file is used by the user accustomed to, and the importance of the public file is higher; for another example, if the public file is used by other applications recently, then the public file may be currently needed by the user, and the importance of the public file is higher. For another example, if few or no other applications use the public file, then the public file may be meaningless to the user and the importance of the public file is relatively low; for another example, if the public file is used less frequently, then the public file is rarely used by the user and the importance of the public file is relatively low; for another example, if the public file has not been used by other applications in the recent period of time, then the public file may be useless to the user at present and the importance of the public file may also be relatively low.
[0034] The embodiment of the present application can determine whether it is necessary to delete the public file when uninstalling the first application based on the usage information. For example, it can be determined whether the public file is relatively important to the user based on the usage information. It is understandable that the probability that the user needs a public file with a relatively high importance is high, and the probability that the user does not need a public file with a relatively low importance is high. Therefore, when uninstalling the first application, the public file with a relatively low importance can be deleted, while the public file with a relatively high importance is retained. Therefore, when uninstalling the first application, the embodiment of the present application will not retain all the public files of the first application in the external storage area, and will delete at least some of the unnecessary public files, avoiding the accumulation of many public files that the user does not need, freeing up the storage space of the electronic device, improving the utilization rate of the storage space of the electronic device, and improving the performance of the electronic device. Moreover, the embodiment of the present application can delete the public files that the user does not need when the first application is uninstalled, and the user does not need to manually search for these unnecessary public files in the public directory of the external storage area after the first application is uninstalled before deleting them, which improves the convenience of user operation.
[0035] See also Figure 2 , Figure 2 A second flow chart of the method for uninstalling an application provided in an embodiment of the present application may include:
[0036] In 201, receiving an uninstall instruction for a first application;
[0037] In 202, in response to the uninstall instruction, identity information of the first application is obtained;
[0038] In 203, a public file of the application corresponding to the identity information of the application is obtained from the database of the MediaStore of the Android system.
[0039] The first application can be any application of the electronic device. In the Android system, the first application has private directories in both the internal storage area and the external storage area for storing private files. The first application also has a public directory in the external storage area for storing public files. The public files are created by the first application but can be accessed and used by other applications. Exemplarily, when other applications need to use the public files, they can apply for permission to use them. When permission to use is obtained, the public files can be opened, modified, and other operations. Public files can be, for example, documents, videos, audios, pictures, and other types of files. For example, if the first application is a Word program, the Word program can create multiple public files, such as Document 1, Document 2, Document 3, and so on. These documents can be opened or modified by other applications.
[0040] When the user does not need the first application, the user can uninstall the first application, and the electronic device can receive the uninstall instruction of the first application. In response to the uninstall instruction for the first application, the identity information of the first application can be obtained. The package name of each application is globally unique, so the identity information of the first application can be, for example, the package name of the first application. Exemplarily, the file system can obtain the package name of the first application, such as: APP_pkg.
[0041] In the Android system, such as Android Q version, the public files of applications can be stored in the MediaStore database. For example, multiple directories can be created in the MediaStore database to store different types of public files, such as directories for storing pictures, directories for storing audio, directories for storing videos, directories for storing documents, etc. Moreover, the MediaStore database records and maintains the application to which each public file belongs.
[0042] Therefore, the public files of the first application corresponding to the identity information can be obtained from the MediaStore database of the Android system. That is, the file system can query all public files whose file owner is APP_pkg in the MediaStore database according to the package name of the first application APP_pkg, thereby querying all public files owned by the first application. It should be noted that in other Android versions, the public files of each application can also be found from the corresponding directory based on the mechanism of the corresponding Android version.
[0043] In 204, usage information of the public file is obtained, where the usage information includes at least one of identity information of other applications using the public file and time information of other applications using the public file;
[0044] In 205 , the usage information of the public file is displayed to inquire the user whether the public file needs to be deleted.
[0045] In one implementation, when other applications use the public file of the first application, the identity information of the other applications and the time information of the other applications using the public file are recorded to generate the usage information of the public file. That is, in the embodiment of the present application, the file system can record the usage information of each time other applications use the public file in the history or preset time period, collect and integrate the usage information recorded each time, and thus generate the overall usage information of the public file.
[0046] Therefore, after the embodiment of the present application obtains the public file of the first application, the usage information of the public file can be obtained from the file system. It can be understood that there can be multiple public files of the first application, and the embodiment of the present application can obtain the usage information of each public file. The usage information of the public file can include at least one of the identity information of other applications that use the public file and the time information of other applications using the public file.
[0047] When receiving the instruction information for uninstalling the first application, the embodiment of the present application can display the usage information of the public files to ask the user whether to delete the public files. Specifically, the file system can provide a display interface, which can be used to display the usage information of each public file of the first application for the user to view the relevant information of the public files, and provide options to guide the user to select the public files to be deleted. The user can choose to delete or retain the public file based on the usage information of each public file.
[0048] In one implementation, the embodiment of the present application can further obtain attribute information of the public file, and the attribute information includes the name, size, storage location of the public file, and at least one of other applications that can use the public file. When the instruction information for uninstalling the first application is received, the usage information and attribute information of the public file can be displayed, that is, the display interface can not only display the usage information of the public file to the user, but also display the attribute information of the public file to the user, so that the user can combine the usage information and attribute information of the public file to more accurately determine whether the public file needs to be deleted.
[0049] In one embodiment, when receiving an uninstallation instruction for a first application, the electronic device may issue a prompt message, the prompt message is used to ask the user whether it is necessary to view the public files that cannot be automatically deleted when the first application is uninstalled. If the user confirms that the public files need to be viewed, the public files of the first application are obtained, and the usage information and attribute information of the public files are further obtained, and the usage information and attribute information of the public files are displayed to the user for the user to view and select the public files to be deleted; if the user confirms that the public files do not need to be viewed, the public files of the first application do not need to be obtained, and the usage information and attribute information of the public files do not need to be further obtained. According to the uninstallation mechanism of the existing Android system, the private files of the private directories of the first application in the internal storage area and the external storage area are deleted, while the public files of the public directory of the first application in the external storage area are retained. That is, in the embodiment of the present application, based on the uninstallation mechanism of the existing Android system, a step of asking the user is added, so that the user can flexibly choose whether to further process the public files that cannot be automatically deleted when uninstalling the first application.
[0050] In 206, receiving feedback information from the user, the feedback information is used to confirm that the public file needs to be deleted or saved;
[0051] In 207 , when uninstalling the first application, based on the feedback information, the public files that the user confirms need to be deleted are deleted.
[0052] The user can make a choice whether the public file needs to be deleted based on the usage information of the public file displayed on the display interface, or in combination with the attribute information displayed on the display interface, thereby forming user feedback information. After receiving the user's feedback information, when uninstalling the first application, not only can the private files of the first application in the internal storage area and the external storage area be automatically deleted, but also the public files of the first application in the external storage area that the user confirms are no longer needed can be deleted, while the public files that the user believes are still needed are retained, so that the electronic device will not cause the accumulation of many unnecessary public files as various applications are installed and uninstalled, freeing up the storage space of the electronic device, improving the utilization rate of the storage space of the electronic device, and improving the performance of the electronic device.
[0053] The method for uninstalling an application in the embodiment of the present application is compatible with the operating mechanism of the existing Android system, does not directly delete all public files of the first application, avoids deleting public files useful to the user, and facilitates smooth upgrading of the software of the electronic device. The method for uninstalling an application in the embodiment of the present application is run to optimize the existing method for uninstalling an application in the Android system; the embodiment of the present application is based on the operating mechanism of the Android system, flexibly adds a process of asking the user, provides a display interface for public files, guides the user to sort out the public files, and selects to delete at least part of the public files as needed, which can not only save the storage space of the electronic device, but also does not affect the normal use of useful public files by the user, and is convenient for the user to manage the application public files, thereby improving the user experience;
[0054] Moreover, the public files of the first application may be, for example, documents, videos, audios, photos, etc., and therefore the public files may contain sensitive data. In the embodiment of the present application, when the user uninstalls the application, at least some of the public files may be deleted, which can reduce the possibility of unexpected and long-term retention of public files containing sensitive data to a certain extent, reduce the risk of data leakage, and improve the security of file management of electronic devices.
[0055] In one embodiment, after obtaining the usage information of the public file, the time information of the last time other applications used the public file is obtained from the usage information; if the time difference between the time information and the current time exceeds the preset time, it is determined that the public file needs to be deleted. The preset time can be set as needed, for example, it can be: three months, six months, one year, two years, etc. The usage information of the public file records the time information of the historical use of the public file. If the public file has not been used within the preset time, for example, the preset time is six months, and the time information of the last use of the public file is one year ago, that is, the user has not used the public file again within these six months, then it can be considered that the public file is not needed by the user at present, so it can be determined that the public file needs to be deleted. For another example, the time information of the last use of the public file is one month, that is, it can be considered that the user has used the public file recently, so it can be considered that the user may still need to use the public file at present, so the public file can be retained instead of being deleted.
[0056] In one embodiment, in addition to displaying the usage information of the public file to the user and allowing the user to choose whether to delete the public file, the embodiment of the present application can also obtain the usage frequency of the public file by other applications from the usage information of the public file after obtaining the usage information of the public file, such as the usage frequency of the public file in a recent period of time. It can be understood that if the public file is rarely used by other applications in a recent period of time, it can be considered that the probability of the public file being used again is low and the importance is relatively low, so the public file can be deleted; if the public file is used by other applications many times in a recent period of time, it can be considered that the probability of the public file being used again is high and the importance is relatively high, so the public file can be retained.
[0057] In one embodiment, after obtaining the usage information of the public file, the identity information of other applications that use the public file can also be obtained based on the usage information; the target application that uses the public file is determined based on the identity information; the operating frequency of the target application is obtained; if the operating frequency is lower than a preset operating rate, it is determined that the public file needs to be deleted.
[0058] According to the user's usage needs, different applications have different operating frequencies. When the operating frequency is greater than the preset operating frequency, the target application is an application that the user frequently uses. When the operating frequency is less than the preset operating frequency, the target application is an application that the user does not frequently use. It can be understood that if no application that the user frequently uses uses the public file, and only applications that the user does not frequently use use the public file, since the user rarely uses the target application, it can be considered that the user only temporarily uses the public file when running the target application, that is, the public file only meets the user's temporary needs, and the probability that the user will use the public file again later is relatively low, so the importance of the public file is low, and it can be confirmed that the public file needs to be deleted. If the target application that uses the public file is an application that the user frequently uses, since the user frequently uses the target application, the probability that the user will use the public file again later is relatively high, so the importance of the public file is high, and the public file can be retained.
[0059] Exemplarily, the user can set up a whitelist of applications based on usage habits. If a public file of a first application has been used by an application in the whitelist, when uninstalling the first application, it cannot be directly determined based on the usage information whether the public file needs to be deleted, but it needs to be displayed to the user to confirm whether it can be deleted. If the public file of the first application has not been used by an application in the whitelist, it can be directly determined based on the usage information whether the public file needs to be deleted. If it needs to be deleted, the public file is automatically deleted when the first application is uninstalled. For example, a mapping program creates multiple drawings, and these drawings are public files of the mapping program. The user is accustomed to using these drawings through application 1 at work. The user can set application 1 as a whitelist application. Even if the user uninstalls the mapping software that created these drawings, these drawings cannot be automatically deleted.
[0060] In addition, the embodiments of the present application can also combine the above multiple conditions to determine whether a public file needs to be deleted. For example, if the frequency of use of the public file by other applications is low, and the target application using the public file is not an application in the whitelist, then the public file can be confirmed to be deleted; for another example, if other applications have not used the public file recently, and no application commonly used by the user has used the public file, then the public file can be confirmed to be deleted. The embodiments of the present application do not limit the combination of various conditions, and can be limited as needed to ensure that public files can be accurately deleted.
[0061] See also Figure 3 , Figure 3 It is a scenario diagram of the method for uninstalling an application provided in an embodiment of the present application.
[0062] When the user no longer needs the first application, the user can uninstall the first application on the electronic device, and then the electronic device can receive the uninstall instruction of the first application. The first application includes private files stored in both the internal storage area and the external storage area, and the first application stores public files in the external storage area. For example, after the AndriodQ version, the public files of the application can be saved in the MediaStore database. In the related technology, when the first application is uninstalled, the private files stored in the internal storage area and the external storage area will be deleted, but all public files in the public directory of the external storage area will not be deleted. As time accumulates, the installation and uninstallation of multiple applications will lead to the accumulation of many public files that users do not need, occupying the storage space of the electronic device.
[0063] It should be noted that, since the embodiment of the present application can record the usage information of each time other applications use public files in history or within a preset time period, the usage information recorded each time can be collected and integrated to generate the overall usage information of the public files. Therefore, when receiving an uninstall instruction for the first application, after obtaining the public files of the first application from the MediaStore database of the Android system, accurate usage information of each public file can be obtained.
[0064] After obtaining accurate usage information of each public file, the usage information of each public file can be displayed through a display interface for users to view and select public files to be deleted. Users can choose to delete or retain the public files based on the usage information of each public file. Therefore, when uninstalling the first application, not only can the private files of the first application in the internal storage area and the external storage area be automatically deleted, but also the public files of the first application in the external storage area that the user confirms no longer needs can be deleted, while retaining the public files that the user believes are still needed. After uninstalling the first application, the user does not need to manually search for these unnecessary public files in the public directory of the external storage area before deleting them, thereby improving the convenience of user operation, and the electronic device will not cause the accumulation of many unnecessary public files as various applications are installed and uninstalled, thereby freeing up the storage space of the electronic device and improving the utilization rate of the storage space of the electronic device.
[0065] See 4 and Figure 5 , Figure 4 A schematic diagram of the first structure of the device for uninstalling an application provided in an embodiment of the present application, Figure 5A second structural diagram of the apparatus for uninstalling an application provided in an embodiment of the present application. The apparatus for uninstalling an application can be applied to an electronic device. The apparatus 300 for uninstalling an application may include: a receiving module 301, an acquiring module 302, a judging module 303 and a deleting module 304.
[0066] The receiving module 301 is used to: receive an uninstall instruction for the first application;
[0067] The acquisition module 302 is used to: in response to the uninstallation instruction, acquire usage information of a public file of the first application, where the public file is a file created by the first application and shared with other applications for use, and the usage information includes at least one of identity information of other applications that use the public file and time information of other applications using the public file;
[0068] The determination module 303 is used to determine whether the public file needs to be deleted when uninstalling the first application according to the usage information;
[0069] The deleting module 304 is used to delete the public file when uninstalling the first application program if the public file needs to be deleted.
[0070] In one implementation, the apparatus 300 for uninstalling an application further includes a generating module 305, which can be used to:
[0071] When other applications use the public file of the first application, the identity information of the other applications and the time information when the other applications use the public file are recorded to generate usage information of the public file.
[0072] In one implementation, the judgment module 303 may be used to: display usage information of the public file to inquire whether the user needs to delete the public file; receive feedback information from the user, the feedback information is used to confirm that the user needs to delete the public file or save the public file;
[0073] The deleting module 304 may be used to: if it is necessary to delete public files, then when uninstalling the first application, based on the feedback information, delete the public files that the user confirms need to be deleted.
[0074] In one embodiment, the acquisition module 302 can be used to: obtain attribute information of a public file, the attribute information including the name, size, storage location, and at least one of other applications that can use the public file; the judgment module 303 can be used to display usage information and attribute information of the public file.
[0075] In one implementation, the determination module 303 may be used to: obtain time information of the last time other applications used the public file from the usage information;
[0076] If the time difference between the time information and the current time exceeds the preset time, it is determined that the public file needs to be deleted.
[0077] In one implementation, the determination module 303 may be used to:
[0078] Based on the usage information, obtain identity information of other applications that use the public file;
[0079] Determine the target application using the public file based on the identity information;
[0080] Get the running frequency of the target application;
[0081] If the operating frequency is lower than the preset operating rate, it is determined that the public file needs to be deleted.
[0082] The application embodiment provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed on a computer, the computer executes the process in the application management method provided in this embodiment.
[0083] An embodiment of the present application also provides an electronic device, including a memory and a processor, wherein the processor is used to execute the process in the application management method provided in this embodiment by calling a computer program stored in the memory.
[0084] For example, the electronic device may be a mobile terminal such as a tablet computer or a smart phone. Figure 6 , Figure 6 A first structural schematic diagram of an electronic device provided in an embodiment of the present application.
[0085] The electronic device 400 may include components such as a memory 401 and a processor 402. Those skilled in the art will appreciate that Figure 6 The electronic device structure shown in the figure does not constitute a limitation of the electronic device, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.
[0086] The memory 401 may be used to store applications and data. The applications stored in the memory 401 include executable codes. The applications may be composed of various functional modules. The processor 402 executes various functional applications and data processing by running the applications stored in the memory 401.
[0087] The processor 402 is the control center of the electronic device. It uses various interfaces and lines to connect various parts of the entire electronic device. It executes various functions of the electronic device and processes data by running or executing applications stored in the memory 401 and calling data stored in the memory 401, thereby monitoring the electronic device as a whole.
[0088] In this embodiment, the processor 402 in the electronic device will load the executable code corresponding to the process of one or more application programs into the memory 401 according to the following instructions, and the processor 402 will run the application program stored in the memory 401 to execute:
[0089] receiving an uninstall instruction for the first application;
[0090] In response to the uninstall instruction, obtaining usage information of a public file of the first application, where the public file is a file created by the first application and shared with other applications, and the usage information includes at least one of identity information of other applications using the public file and time information of other applications using the public file;
[0091] determining, based on the usage information, whether it is necessary to delete the public file when uninstalling the first application;
[0092] If the public file needs to be deleted, the public file is deleted when the first application is uninstalled.
[0093] See also Figure 7 , Figure 7 A second structural diagram of an electronic device provided in an embodiment of the present application. The electronic device 400 includes components such as a memory 401, a processor 402, a display screen 403, a radio frequency circuit 404, a control circuit 405, an input unit 406, an audio circuit 407, a sensor 408, and a power supply 409. The processor 403 is electrically connected to the display screen 403, the radio frequency circuit 404, the control circuit 405, the input unit 406, the audio circuit 407, the sensor 408, and the power supply 409, respectively.
[0094] The display screen 403 may be used to display information input by a user or information provided to a user and various graphical user interfaces of the electronic device. These graphical user interfaces may be composed of images, texts, icons, videos and any combination thereof.
[0095] The radio frequency circuit 404 is used to send and receive radio frequency signals to communicate with network devices or other electronic devices through wireless communication.
[0096] The control circuit 405 is electrically connected to the display screen 404 and is used to control the display screen 404 to display information.
[0097] The input unit 406 can be used to receive input numbers, character information or user feature information (such as fingerprints), and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control. The input unit 406 can include a fingerprint recognition module.
[0098] The audio circuit 407 can provide an audio interface between the user and the electronic device through a speaker and a microphone. The audio circuit 407 includes a microphone. The microphone is electrically connected to the processor 401. The microphone is used to receive voice information input by the user.
[0099] The sensor 408 is used to collect external environment information. The sensor 408 may include one or more sensors such as an environment brightness sensor, an acceleration sensor, and a gyroscope.
[0100] The power supply 409 is used to supply power to various components of the electronic device 400. In some embodiments, the power supply 409 may be logically connected to the processor 401 through a power management system, so that the power management system can manage charging, discharging, power consumption, and other functions.
[0101] Although not shown in the figure, the electronic device 400 may also include a camera, a Bluetooth module, etc., which will not be described in detail here.
[0102] In this embodiment, the processor 402 in the electronic device will load the executable code corresponding to the process of one or more application programs into the memory 401 according to the following instructions, and the processor 402 will run the application program stored in the memory 401 to execute:
[0103] receiving an uninstall instruction for the first application;
[0104] In response to the uninstall instruction, obtaining usage information of a public file of the first application, where the public file is a file created by the first application and shared with other applications, and the usage information includes at least one of identity information of other applications using the public file and time information of other applications using the public file;
[0105] determining, based on the usage information, whether it is necessary to delete the public file when uninstalling the first application;
[0106] If the public file needs to be deleted, the public file is deleted when the first application is uninstalled.
[0107] In one implementation, in obtaining usage information of a public file of a first application, the processor 402 executes: obtaining identity information of the first application;
[0108] Obtaining a public file of the first application corresponding to the identity information from a database of the MediaStore of the Android system;
[0109] Get usage information for a public file.
[0110] In one implementation, before obtaining the usage information of the public file, the processor 402 executes: when other applications use the public file of the first application, record the identity information of other applications and the time information when other applications use the public file, and generate the usage information of the public file.
[0111] In one embodiment, when determining whether it is necessary to delete public files when uninstalling the first application based on usage information, the processor 402 executes: displaying usage information of public files to ask the user whether it is necessary to delete the public files; receiving feedback information from the user, the feedback information is used to confirm that the user needs to delete the public files or save the public files; if the public files need to be deleted, then when uninstalling the first application, the processor 402 executes: if the public files need to be deleted, then when uninstalling the first application, based on the feedback information, deleting the public files that the user confirms need to be deleted.
[0112] In one embodiment, the processor 402 executes: obtaining attribute information of a public file, the attribute information including the name, size, storage location, and at least one of other applications that can use the public file; in displaying usage information of the public file, the processor 402 executes: displaying usage information and attribute information of the public file.
[0113] In one embodiment, when determining whether it is necessary to delete public files when uninstalling the first application based on usage information, the processor 402 executes: obtaining time information of the last time other applications used public files from the usage information; if the time difference between the time information and the current time exceeds a preset time, it is determined that the public files need to be deleted.
[0114] In one embodiment, when determining whether it is necessary to delete the public file when uninstalling the first application based on usage information, the processor 402 executes: obtaining identity information of other applications that use the public file based on the usage information; determining a target application that uses the public file based on the identity information; obtaining an operating frequency of the target application; and determining that the public file needs to be deleted if the operating frequency is lower than a preset operating rate.
[0115] In the above embodiments, the description of each embodiment has its own focus. For the part that is not described in detail in a certain embodiment, please refer to the detailed description of the management method for application programs above, which will not be repeated here.
[0116] The device for uninstalling an application provided in the embodiment of the present application belongs to the same concept as the method for managing an application in the above embodiment. Any method provided in the embodiment of the method for managing an application can be run on the device for uninstalling an application. The specific implementation process is detailed in the embodiment of the method for managing an application, which will not be repeated here.
[0117] It should be noted that, for the application management method of the embodiment of the present application, ordinary technicians in the field can understand that all or part of the process of implementing the application management method of the embodiment of the present application can be completed by controlling the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium, such as stored in a memory, and executed by at least one processor, and the execution process may include the process of the embodiment of the application management method. Among them, the storage medium can be a disk, an optical disk, a read-only memory (ROM), a random access memory (RAM), etc.
[0118] For the device for uninstalling an application in the embodiment of the present application, each functional module can be integrated into a processing chip, or each module can exist physically separately, or two or more modules can be integrated into one module. The above-mentioned integrated module can be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium, such as a read-only memory, a disk or an optical disk.
[0119] The above is a detailed introduction to the application management method, device, storage medium and electronic device provided in the embodiments of the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for technical personnel in this field, according to the idea of the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A method for uninstalling an application, characterized in that: The method comprises: receiving an uninstall instruction for the first application; In response to the uninstall instruction, obtaining usage information of a public file of the first application, where the public file is a file created by the first application and shared with other applications, the usage information including at least one of identity information of other applications using the public file and time information of other applications using the public file; determining, based on the usage information, whether the public file needs to be deleted when uninstalling the first application; If the public file needs to be deleted, the public file is deleted when the first application is uninstalled.
2. The method for uninstalling an application according to claim 1, characterized in that: The obtaining usage information of the public file of the first application comprises: Obtaining identity information of the first application; Obtaining, from a database of the MediaStore of the Android system, a public file of the first application corresponding to the identity information; Obtain usage information of the public file.
3. The method for uninstalling an application according to claim 1, characterized in that: Before obtaining the usage information of the public file, the method includes: When other applications use the public file of the first application, the identity information of the other applications and the time information when the other applications use the public file are recorded to generate usage information of the public file.
4. The method for uninstalling an application according to claim 1, characterized in that: The determining, according to the usage information, whether the public file needs to be deleted when the first application is uninstalled includes: Displaying usage information of the public file to inquire the user whether to delete the public file; receiving feedback information from the user, wherein the feedback information is used to confirm that the user needs to delete the public file or save the public file; If the public file needs to be deleted, when uninstalling the first application, deleting the public file includes: If the public files need to be deleted, then when the first application is uninstalled, the public files that the user confirms need to be deleted are deleted based on the feedback information.
5. The method for uninstalling an application according to claim 1, characterized in that: The method further comprises: Acquire attribute information of the public file, the attribute information including the name, size, storage location of the public file, and at least one of other applications capable of using the public file; The display of the usage information of the public file includes: Display usage information and attribute information of the public file.
6. The method for uninstalling an application according to claim 3, characterized in that: The determining, according to the usage information, whether the public file needs to be deleted when the first application is uninstalled includes: Acquire time information of the last time other applications used the public file from the usage information; If the time difference between the time information and the current time exceeds a preset time, it is determined that the public file needs to be deleted.
7. The method for uninstalling an application according to claim 3, characterized in that: The determining, according to the usage information, whether the public file needs to be deleted when the first application is uninstalled includes: According to the usage information, obtaining identity information of other applications using the public file; determining a target application program that uses the public file according to the identity information; Get the running frequency of the target application; If the operating frequency is lower than a preset operating rate, it is determined that the public file needs to be deleted.
8. A device for uninstalling an application, characterized in that: The device comprises: A receiving module, configured to receive an uninstall instruction for the first application; an acquisition module, configured to acquire, in response to the uninstall instruction, usage information of a public file of the first application, wherein the public file is a file created by the first application and shared with other applications for use, the usage information including at least one of identity information of other applications using the public file and time information of other applications using the public file; A determination module, configured to determine, based on the usage information, whether the public file needs to be deleted when the first application is uninstalled; The deleting module is used to delete the public file when uninstalling the first application program if the public file needs to be deleted.
9. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed on a computer, the computer is caused to execute the method according to any one of claims 1 to 7.
10. An electronic device, comprising a memory and a processor, characterized in that: The processor is configured to execute the method according to any one of claims 1 to 7 by calling the computer program stored in the memory.