Unlock instant, AI-driven research and patent intelligence for your innovation.

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

Inactive Publication Date: 2019-01-15
BEIJING QIHOO TECH CO LTD
View PDF4 Cites 1 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0002] In the Android system, it is often necessary to run the custom process of the service component service in a certain plug-in in some applications to achieve predetermined functions, but because the custom process of the service component is only located in the plug-in and does not It is not installed in the main program of the system, so the Android system cannot recognize the custom process of the service component, then the service component will not be run, and the predetermined function cannot be realized

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method, apparatus and terminal for running service component
  • Method, apparatus and terminal for running service component
  • Method, apparatus and terminal for running service component

Examples

Experimental program
Comparison scheme
Effect test

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...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

Embodiments of the present application provide a method, apparatus, and terminal for running a service component. The method includes: obtaining target service component information in a target plug-in; creating a service object of the target service component based on the target service component information; invoking a lifecycle of the target service component with the service object; mapping acustom process in the target service component to a pre-established pit occupying process in a host during the lifecycle; starting the pit occupying process; in this way, the user-defined process in the service component is mapped with the pre-established pit occupancy in the host. After the mapping is successful, the user-defined process of the service component can be run by the pit occupancy process, and the predetermined function of the service component is realized.

Description

technical field [0001] The invention belongs to the technical field of system development, and in particular relates to a method, device and terminal for running service components. Background technique [0002] In the Android system, it is often necessary to run the custom process of the service component service in a certain plug-in in some applications to achieve predetermined functions, but because the custom process of the service component is only located in the plug-in and does not It is not installed in the main program in the system, so the Android system cannot recognize the custom process of the service component, so the service component will not be run, and the predetermined function cannot be realized. Contents of the invention [0003] In view of the above problems, the present invention is proposed to provide a method, device and terminal for running service components that overcome the above problems or at least partially solve the above problems. [0004...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G06F9/48
CPCG06F9/48
Inventor 刘存栋卜云涛董涛
Owner BEIJING QIHOO TECH CO LTD