CN113312097A - Method and device for modifying starting program based on Android system - Google Patents
Method and device for modifying starting program based on Android system Download PDFInfo
- Publication number
- CN113312097A CN113312097A CN202110597073.3A CN202110597073A CN113312097A CN 113312097 A CN113312097 A CN 113312097A CN 202110597073 A CN202110597073 A CN 202110597073A CN 113312097 A CN113312097 A CN 113312097A
- Authority
- CN
- China
- Prior art keywords
- program
- launcher
- programs
- android
- native desktop
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 25
- 238000012986 modification Methods 0.000 claims description 3
- 230000004048 modification Effects 0.000 claims description 3
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/4401—Bootstrapping
- G06F9/4406—Loading of operating system
Abstract
The invention discloses a method and a device for modifying a starting program based on an Android system, wherein the method comprises the following steps: saving the package name or null value of the client's app in the default startup package name in the database of the system; checking whether the stored package name is a null value, if so, failing to modify the starting program, and taking the native desktop as the starting program; under the condition that the stored packet name is not empty, all launcher programs of the system are checked, if the launcher programs can be found in the launcher programs, the launcher programs are set as default launchers, the launcher programs are used as boot startup programs, and the boot startup programs are modified successfully; if the Android native desktop cannot be found in the launcher program, the Android native desktop is searched in the installed program according to the package name, and if the Android native desktop cannot be found, the Android native desktop is started.
Description
Technical Field
The invention belongs to the technical field of Android system application, and particularly relates to a method and a device for modifying a starting program based on an Android system.
Background
With the increasing number of devices carrying the Android system, the requirement on the openness of the Android system is higher, and a certain difficulty is brought to developers because a part of the default native programs of the Android system cannot be modified.
In the existing Android system, the first program started after starting is an Android native desktop, after starting, the Android system searches for a launcher program in the system, an application developer does not have an interface to store a required APP package name, and then the system directly starts the Android native desktop by default after starting, and cannot modify the starting program.
Disclosure of Invention
In view of the technical problems, the invention is to provide a method and a device for modifying a boot startup program based on an Android system, which can enable an industry application to modify the boot startup program by the method provided by the invention, and can enable the industry application to recover an Android native desktop as the boot startup program when the industry application wants to recover the Android native desktop.
In order to solve the technical problems, the invention adopts the following technical scheme:
one aspect of the embodiment of the invention provides a method for modifying a boot startup program based on an Android system, which comprises the following steps:
saving the package name or null value of the client app in the default startup program package name in a database of the system, wherein the null value is set for recovering the native desktop of the Android as a startup program;
checking whether the stored package name is a null value, if so, failing to modify the starting program, and taking the native desktop as the starting program;
under the condition that the stored packet name is not empty, all launcher programs of the system are checked, if the launcher programs can be found in the launcher programs, the launcher programs are set as default launchers, the launcher programs are used as boot startup programs, and the boot startup programs are modified successfully; if the Android native desktop cannot be found in the launcher program, the Android native desktop is searched in the installed program according to the package name, and if the Android native desktop cannot be found, the Android native desktop is started.
Preferably, for the launcher program, after starting up as the boot startup program, the home key is pressed to return to the program.
Preferably, for the non-launcher program, after the program is started as a boot startup program, the home key is pressed to return to the Android native desktop.
Another aspect of the embodiments of the present invention provides a device for modifying a boot startup program based on an Android system, including:
the storage unit is used for storing the package name or the null value of the client app into the default starting program package name in the database of the system;
the checking and judging unit is used for checking whether the stored packet name is a null value, if so, the modification of the starting program fails, and the native desktop is used as the starting program;
under the condition that the stored packet name is not empty, all launcher programs of the system are checked, if the launcher programs can be found in the launcher programs, the launcher programs are set as default launchers, the launcher programs are used as boot startup programs, and the boot startup programs are modified successfully; if the Android native desktop cannot be found in the launcher program, the Android native desktop is searched in the installed program according to the package name, and if the Android native desktop cannot be found, the Android native desktop is started.
Preferably, for the launcher program, after starting up as the boot startup program, the home key is pressed to return to the program.
Preferably, for the non-launcher program, after the program is started as a boot startup program, the home key is pressed to return to the Android native desktop.
The invention has the following beneficial effects:
(1) the Android native boot startup program can be modified, and the designated program is set as the boot startup program.
(2) The Android native boot startup program may be resumed.
Drawings
Fig. 1 is a schematic structural diagram of a device for modifying a boot startup program based on an Android system according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Method embodiment
A method for modifying a boot startup program based on an Android system is characterized by comprising the following steps:
the package name or null value of the customer's app is saved in the default startup package name in the database of the system. Specifically, the package name or null value of the client app is stored in the default startup package name in the database of the system through the putString method of the Global class in the Settings classes in the Android system.
And checking whether the stored package name is a null value, if so, failing to modify the boot program, and taking the native desktop as the boot program. And acquiring the package name of the default starting program by a getString method of a Global class in the setings classes in the Android system, and comparing the package name with null to check whether the stored package name is null or not.
Under the condition that the stored packet name is not empty, all launcher programs of the system are checked, if the launcher programs can be found in the launcher programs, the launcher programs are set as default launchers, the launcher programs are used as boot startup programs, and the boot startup programs are modified successfully; if the Android native desktop cannot be found in the launcher program, the Android native desktop is searched in the installed program according to the package name, and if the Android native desktop cannot be found, the Android native desktop is started. Specifically, the ComponentName types of all installed launcher programs are obtained through a getHomeActivities method, the package names are obtained through a getPackageName method of the ComponentName types, and then all installed launcher programs of the checking system are compared through the package name string. Find by the getLaunchIntentForPackage method among the already installed programs according to the package name.
Device embodiment
Corresponding to the embodiment of the method, referring to fig. 1, the embodiment of the invention discloses a device for modifying a boot startup program based on an Android system, which includes: the storage unit is used for storing the package name or the null value of the client app into the default starting program package name in the database of the system; the checking and judging unit is used for checking whether the stored packet name is a null value, if so, the modification of the starting program fails, and the native desktop is used as the starting program; under the condition that the stored packet name is not empty, all launcher programs of the system are checked, if the launcher programs can be found in the launcher programs, the launcher programs are set as default launchers, the launcher programs are used as boot startup programs, and the boot startup programs are modified successfully; if the Android native desktop cannot be found in the launcher program, the Android native desktop is searched in the installed program according to the package name, and if the Android native desktop cannot be found, the Android native desktop is started.
Specifically, in the saving unit, the package name or the null value of the app of the client is saved in the default startup package name in the database of the system by the putString method of the Global class in the Settings classes in the Android system.
Specifically, in the detection and judgment unit, the package name of the default startup program is obtained by a getString method of a Global class in setings classes in an Android system, and whether the stored package name is null or not is checked by comparing the package name with null. The method comprises the steps of obtaining the ComponentName types of all installed launcher programs through a getHomeActivities method, obtaining package names through a getPackageName method of the ComponentName types, and then comparing all installed launcher programs of the checking system through package name strings. Find by the getLaunchIntentForPackage method among the already installed programs according to the package name.
In a specific application example, after a launcher program is started as a boot startup program, a home key is pressed to return to the launcher program. And for the non-launcher program, after the non-launcher program is started as a starting program, the non-launcher program returns to the Android native desktop by pressing a home key.
It is to be understood that the exemplary embodiments described herein are illustrative and not restrictive. Although one or more embodiments of the present invention have been described with reference to the accompanying drawings, it will be understood by those of ordinary skill in the art that various changes in form and details may be made therein without departing from the spirit and scope of the present invention as defined by the following claims.
Claims (6)
1. A method for modifying a boot startup program based on an Android system is characterized by comprising the following steps:
saving the package name or null value of the client's app in the default startup package name in the database of the system;
checking whether the stored package name is a null value, if so, failing to modify the starting program, and taking the native desktop as the starting program;
under the condition that the stored packet name is not empty, all launcher programs of the system are checked, if the launcher programs can be found in the launcher programs, the launcher programs are set as default launchers, the launcher programs are used as boot startup programs, and the boot startup programs are modified successfully; if the Android native desktop cannot be found in the launcher program, the Android native desktop is searched in the installed program according to the package name, and if the Android native desktop cannot be found, the Android native desktop is started.
2. The Android-system-based boot loader method of claim 1, wherein, for a launcher program, after starting up as a boot loader, a home key is pressed to return to the program.
3. The method for modifying the boot loader based on the Android system of claim 1, wherein for the non-launcher program, after starting as the boot loader, the home key is pressed to return to the Android native desktop.
4. A device for modifying a boot startup program based on an Android system is characterized by comprising:
the storage unit is used for storing the package name or the null value of the client app into the default starting program package name in the database of the system;
the checking and judging unit is used for checking whether the stored packet name is a null value, if so, the modification of the starting program fails, and the native desktop is used as the starting program;
under the condition that the stored packet name is not empty, all launcher programs of the system are checked, if the launcher programs can be found in the launcher programs, the launcher programs are set as default launchers, the launcher programs are used as boot startup programs, and the boot startup programs are modified successfully; if the Android native desktop cannot be found in the launcher program, the Android native desktop is searched in the installed program according to the package name, and if the Android native desktop cannot be found, the Android native desktop is started.
5. The Android-system-based device for modifying a boot loader of claim 4, wherein for a launcher program, after starting as a boot loader, a home key is pressed to return to the program.
6. The apparatus for modifying a boot loader based on Android system of claim 4, wherein for non-launcher programs, after starting as a boot loader, the home key is pressed to return to the Android native desktop.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110597073.3A CN113312097A (en) | 2021-05-28 | 2021-05-28 | Method and device for modifying starting program based on Android system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110597073.3A CN113312097A (en) | 2021-05-28 | 2021-05-28 | Method and device for modifying starting program based on Android system |
Publications (1)
Publication Number | Publication Date |
---|---|
CN113312097A true CN113312097A (en) | 2021-08-27 |
Family
ID=77376480
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110597073.3A Pending CN113312097A (en) | 2021-05-28 | 2021-05-28 | Method and device for modifying starting program based on Android system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113312097A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114237761A (en) * | 2021-12-22 | 2022-03-25 | 广东悦伍纪网络技术有限公司 | Delayed starting method and device for desktop starter, storage medium and box equipment |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103677587A (en) * | 2013-12-11 | 2014-03-26 | Tcl集团股份有限公司 | Method and system for rapidly switching main interfaces in Android system |
CN104375845A (en) * | 2013-08-14 | 2015-02-25 | 中兴通讯股份有限公司 | Application startup method and device and terminal |
CN106648869A (en) * | 2016-12-26 | 2017-05-10 | 竞技世界(北京)网络技术有限公司 | Intelligent terminal application switch method |
CN106708566A (en) * | 2016-11-30 | 2017-05-24 | 武汉斗鱼网络科技有限公司 | Method for judgment of installation of application programs and judgment system |
CN108920211A (en) * | 2018-06-28 | 2018-11-30 | 广州视源电子科技股份有限公司 | The starting method and device of Launcher application program, electronic equipment, storage medium |
-
2021
- 2021-05-28 CN CN202110597073.3A patent/CN113312097A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104375845A (en) * | 2013-08-14 | 2015-02-25 | 中兴通讯股份有限公司 | Application startup method and device and terminal |
CN103677587A (en) * | 2013-12-11 | 2014-03-26 | Tcl集团股份有限公司 | Method and system for rapidly switching main interfaces in Android system |
CN106708566A (en) * | 2016-11-30 | 2017-05-24 | 武汉斗鱼网络科技有限公司 | Method for judgment of installation of application programs and judgment system |
CN106648869A (en) * | 2016-12-26 | 2017-05-10 | 竞技世界(北京)网络技术有限公司 | Intelligent terminal application switch method |
CN108920211A (en) * | 2018-06-28 | 2018-11-30 | 广州视源电子科技股份有限公司 | The starting method and device of Launcher application program, electronic equipment, storage medium |
Non-Patent Citations (3)
Title |
---|
TOUOWANG: "Android 设置默认开机应用(launcher)", 《HTTPS://BLOG.CSDN.NET/QQ_42933442/ARTICLE/DETAILS/103780742》 * |
刘忆初: "Android系统开机到Launcher启动流程分析", 《HTTPS://BLOG.CSDN.NET/QQ_34512207/ARTICLE/DETAILS/113725772》 * |
嘟嘟的肉丸子: "android手把手教你开发launcher(一)(AndroidStudio版)", 《HTTPS://BLOG.CSDN.NET/ZIYEXIUXIU/ARTICLE/DETAILS/79651541》 * |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114237761A (en) * | 2021-12-22 | 2022-03-25 | 广东悦伍纪网络技术有限公司 | Delayed starting method and device for desktop starter, storage medium and box equipment |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US6662310B2 (en) | Methods for automatically locating url-containing or other data-containing windows in frozen browser or other application program, saving contents, and relaunching application program with link to saved data | |
US6701454B1 (en) | Method and system for recovering information during a program failure | |
CN108121559B (en) | Configuration file pushing method, server and storage medium | |
CN107171825B (en) | Repeated log filtering method for terminal | |
WO2019169761A1 (en) | Automated testing method and apparatus, and storage medium | |
CN108920365B (en) | WebUI automatic testing method based on docker | |
CN104881283A (en) | Method and system for obtaining root privilege of terminal device based on android | |
CN105786538A (en) | Software upgrading method and device based on Android system | |
US20170115982A1 (en) | Multi-system terminal system updating method, updating device and terminal | |
CN103186400B (en) | Web application upgrade method and system | |
CN112099880B (en) | Method and system for reducing application program driven by scene | |
CN111027054A (en) | Method and system for judging running of application program in multi-open environment based on android system | |
CN113312097A (en) | Method and device for modifying starting program based on Android system | |
CN108446224B (en) | Performance analysis method of application program on mobile terminal and storage medium | |
CN111352631B (en) | Interface compatibility detection method and device | |
CN115080114B (en) | Application program transplanting processing method, device and medium | |
CN103645913A (en) | Language loading method and device in J2EE system | |
CN103686370A (en) | Method and system for starting up intelligent television | |
CN103294573B (en) | A kind of intelligent terminal and data back up method thereof | |
CN107943543A (en) | A kind of method and computer equipment of WEB application heat deployment | |
Yang et al. | A Fast Boot, Fast Shutdown Technique for Android OS Devices | |
CN111061699A (en) | Method and device for updating database version of electric energy meter | |
CN103713920B (en) | Portable device system starting protection method and apparatus | |
CN110413321A (en) | A kind of android system quick start method and device | |
CN108984359A (en) | A kind of system UUID synchronization detecting method, device, equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20210827 |
|
RJ01 | Rejection of invention patent application after publication |