An application self-starting method based on an Android device

By adding custom service classes and service proxy classes to the Launcher folder of the Android system, the application status is monitored in real time and launched using Intent, which solves the problem of the application failing to start automatically after Android devices boot up and are upgraded, and achieves a stable auto-start effect.

CN115686679BActive Publication Date: 2026-05-08GUILIN HIVISION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
GUILIN HIVISION TECH CO LTD
Filing Date
2022-11-14
Publication Date
2026-05-08

AI Technical Summary

Technical Problem

The issue of apps failing to start automatically after booting up or upgrading Android devices, especially the instability caused by limitations in app installation location and system broadcast listening.

Method used

By adding custom service classes and service proxy classes to the Launcher folder in the Android system source code, the installation and running status of applications can be monitored in real time. Applications can be launched using Intents to ensure automatic startup after boot and upgrade.

Benefits of technology

It enables automatic startup of Android devices upon boot, after upgrades, and in other non-running states, thus resolving the issue of unstable application startup.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115686679B_ABST
    Figure CN115686679B_ABST
Patent Text Reader

Abstract

The application discloses an application self-starting method based on an Android device, which adds a self-defined service class in Launcher of system source code by modifying the Android system code, modifies the source code of the Launcher starting part, starts the added self-defined service after the Launcher starts, and is used for monitoring the running state and the installation state of the self-defined application, so that the problem that the application cannot self-start after booting and upgrading is overcome, the running state and the installation state of the application are monitored in real time by modifying the source code of the Launcher in the Android system, and the self-starting effect after booting, after upgrading and in other non-running states is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of Android smart device technology, specifically a method for application auto-starting on Android devices. Background Technology

[0002] Currently, existing Android devices send a BOOT_COMPLETE broadcast upon boot. Applications can only start after receiving this broadcast. However, because applications are not system applications and cannot be installed under ` / system / app`, but rather on the SD card, their loading speed is unstable and they may not be fully loaded before the system sends the BOOT_COMPLETE broadcast, leading to the problem of not being able to start automatically after boot. Furthermore, existing Android applications listen for the ACTION_PACKAGE_REPLACED broadcast after performing an overwrite installation upgrade. In higher versions of Android, this broadcast can no longer be listened to through static registration; it can only be listened to dynamically during application runtime. However, an application performing an overwrite installation stops running during the upgrade process, and the dynamically registered listener also stops, failing to hear the application's own upgrade broadcast, thus preventing automatic startup after the upgrade. Summary of the Invention

[0003] The purpose of this invention is to overcome the shortcomings in the above-mentioned background technology and to provide a method for application auto-starting based on Android devices.

[0004] The technical solution to achieve the objective of this invention is:

[0005] A method for application auto-start on Android devices includes the following steps:

[0006] 1) Add a custom service class and a service proxy class to the Launcher folder in the Android system source code. After the smart device is powered on, use the service proxy class in the Launcher startup code to determine whether the custom service is enabled. If it is not enabled, enable the custom service in the Launcher.

[0007] 2) In the custom service, the custom application is monitored. All application information is obtained by retrieving the application package name management class. The application is then traversed and compared to check if the custom application is installed.

[0008] 3) If the custom application is not installed, skip this monitoring, set a delay time, and return to step 2) to continue monitoring the running status of the custom Android application;

[0009] 4) If the custom application is already installed, obtain the activity management class, traverse the stack information to determine if the custom application has been started; if not, start the custom application via Intent.

[0010] 5) If the custom application has already started, obtain the top page of the stack through the process management class, determine whether the current foreground page is running in the foreground, and if it is running in the foreground, set a delay time and return to step 2) to continue monitoring the running status of the custom Android application.

[0011] 6) If not running in the foreground, use an Intent to bring the custom application to the foreground;

[0012] 7) If the custom application has been installed, is running and is displayed in the foreground after steps 2) to 6), skip this monitoring and re-monitor the installation and running status of the custom application after the set delay time.

[0013] This invention provides a method for application auto-starting based on Android devices, which overcomes the problem that applications cannot auto-start after booting up and upgrading. The method of this invention modifies the source code of the Launcher in the Android system to monitor the running status and installation status of applications in real time, achieving the effect of auto-starting upon booting up, auto-starting after upgrading, and auto-starting in other non-running states. Attached Figure Description

[0014] Figure 1 This is a flowchart of a method for automatically starting an application on an Android device. Detailed Implementation

[0015] The present invention will be further described below with reference to the accompanying drawings and embodiments, but this is not intended to limit the scope of the invention.

[0016] like Figure 1 As shown, an application auto-start method based on Android devices is proposed. This method modifies the Android system code by adding a custom service class to the Launcher in the system source code and modifying the source code of the Launcher startup part. After the Launcher starts, the newly added custom service is started to monitor the running and installation status of the custom application. The specific steps include the following:

[0017] 1) Add a custom service class and a service proxy class to the Launcher folder in the Android system source code. After the smart device is powered on, use the service proxy class in the Launcher startup code to determine whether the custom service is enabled. If it is not enabled, enable the custom service in the Launcher.

[0018] 2) In the custom service, monitor the custom application, obtain the application package name management class to obtain all application information, and check whether the custom application is installed by traversing and comparing the registration.

[0019] 3) If the custom application is not installed, skip this monitoring, set a delay time, and return to step 2) to continue monitoring the running status of the custom Android application;

[0020] 4) If the custom application is already installed, obtain the activity management class, and then check the stack information by traversing it to determine whether the custom application has been started; if it has not been started, start the custom application via Intent.

[0021] 5) If the custom application has already started, obtain the top page of the stack through the process management class, determine whether the current foreground page is running in the foreground, and if it is running in the foreground, set a delay time and return to step 2) to continue monitoring the running status of the custom Android application.

[0022] 6) If not running in the foreground, use an Intent to bring the custom application to the foreground;

[0023] 7) If the custom application has been installed, is running and is displayed in the foreground after steps 2) to 6), skip this monitoring and re-monitor the installation and running status of the custom application after the set delay time.

[0024] The above embodiments can be used for subway screen devices based on the Android system. The station information application needs to be automatically launched when the device is powered on, and the application also needs to be automatically launched again after each upgrade. Through the above method, the effect of automatic startup of the subway screen can be achieved, including automatic startup upon power-on, automatic startup after upgrade, and automatic startup of the subway screen in other non-running states.

Claims

1. A method for application auto-start on an Android device, characterized in that, Includes the following steps: 1) Add a custom service class and a service proxy class to the Launcher folder in the Android system source code. After the smart device is powered on, use the service proxy class in the Launcher startup code to determine whether the custom service is enabled. If it is not enabled, enable the custom service in the Launcher. 2) In the custom service, monitor the custom application, obtain all application information through the application package management class, and query whether the custom application is installed by traversing and comparing package names; 3) If the custom application is not installed, skip this monitoring, set a delay time, and return to step 2) to continue monitoring the running status of the custom Android application; 4) If the custom application is already installed, then obtain the activity management class, and then iterate through the stack information to determine whether the custom application has been started; If not started, launch the custom application via Intent; 5) If the custom application has already started, obtain the top page of the stack by obtaining the process management class, determine whether the current foreground page is running in the foreground, and if it is running in the foreground, set a delay time and return to step 2) to continue monitoring the running status of the custom Android application. 6) If not running in the foreground, use an Intent to bring the custom application to the foreground; 7) If the custom application has been installed, is running and is displayed in the foreground after steps 2) to 6), skip this monitoring and re-monitor the installation and running status of the custom application after the set delay time.

Citation Information

Patent Citations

  • Method and device for starting applications on Launcher and terminal

    CN104267979A

  • Content display method and display equipment

    CN112135180A