Method, apparatus and terminal for running service component
A technology of service components and components, which is applied in the direction of multi-program device, program startup/switching, etc., and can solve problems such as inability to realize functions
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0062] This embodiment provides a method for running service components, such as figure 1 As shown, the methods include:
[0063] S110, acquiring target service component information in the target plug-in;
[0064] Since the target plug-in may include multiple service components, this embodiment only needs to obtain the target service component information.
[0065] Specifically, start a sub-thread, and in the sub-thread, based on the name of the target plug-in, use the getPackageArchiveInfo interface of the installation package manager PackageManager to obtain the PackageInfo object according to the absolute path of the incoming target plug-in installation package APK. The PackageInfo object is an object used to describe the four major components of the application in the Android system. The four major components include: activity component, service component, Content Provider content provider and BroadcastReceiver broadcast receiver. The code is implemented as follows:
...
Embodiment 2
[0131] This embodiment provides a device for running service components, such as image 3 As shown, the device includes: an acquisition unit 301, a creation unit 302, a call unit 303, a mapping unit 304, and a startup unit 305;
[0132] The obtaining unit 301 is used to obtain the target service component information in the target plug-in; specifically, the obtaining unit 301 starts a sub-thread, and in the sub-thread, based on the name of the target plug-in, using the getPackageArchiveInfo interface of the package manager PackageManager, according to the incoming The absolute path of the target plugin installation package APK to get the PackageInfo object. The PackageInfo object is an object used to describe the four major components of the application in the Android system. The four major components include: activity component, service component, Content Provider content provider and BroadcastReceiver broadcast receiver. The code is implemented as follows:
[0133] Package...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 


