CN107844335A - A kind of component call method and terminal device - Google Patents

A kind of component call method and terminal device Download PDF

Info

Publication number
CN107844335A
CN107844335A CN201710968728.7A CN201710968728A CN107844335A CN 107844335 A CN107844335 A CN 107844335A CN 201710968728 A CN201710968728 A CN 201710968728A CN 107844335 A CN107844335 A CN 107844335A
Authority
CN
China
Prior art keywords
information
system component
target class
external request
component
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.)
Withdrawn
Application number
CN201710968728.7A
Other languages
Chinese (zh)
Inventor
陈利顺
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Jinli Communication Equipment Co Ltd
Original Assignee
Shenzhen Jinli Communication Equipment Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Shenzhen Jinli Communication Equipment Co Ltd filed Critical Shenzhen Jinli Communication Equipment Co Ltd
Priority to CN201710968728.7A priority Critical patent/CN107844335A/en
Publication of CN107844335A publication Critical patent/CN107844335A/en
Withdrawn legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
    • G06F9/44526Plug-ins; Add-ons

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Telephone Function (AREA)

Abstract

The embodiment of the invention discloses a kind of component call method and terminal device, wherein method includes:External request is received by outside entrance, the external request carries the first information and the second information, the first information is used to characterize the system component for handling and calling needed for the external request, and second information is used to characterize the target class for handling and using needed for business pending in the external request;According to the first information and second information, the system component is called, the pending business is performed into the target class.Using the embodiment of the present invention, same outside entry call application program can be utilized to perform business, the convenient unified management to entrance outside program.

Description

A kind of component call method and terminal device
Technical field
The present invention relates to field of terminal technology, more particularly to a kind of component call method and terminal device.
Background technology
In terminal operating system, by taking Android Andriod systems as an example, the operation of any application program all relies on Any one component that Andriod is developed in four big components.It is respectively movable activity, service that Andriod, which develops four big components, Service, radio receiver BroadcastReceiver and content supplier Content Provider.
Intent is a kind of run-time binding (run-time binding) mechanism, and it can be connected in program operation process Two different components.By Intent, your program can express certain request or wish, Android meetings to Android Complete to ask according to the appropriate component of the content selection of wish.
In practice, it has been found that application program can be by showing intent and implicit Intent side in Android system Formula starts.Display intent mode refers to directly call application program by wrapping name and class name, but is directed to the 3rd Do not support to change bag name and class name for Fang Yingyong, difficulty is increased to later stage program maintenance, if modification bag name and class name will Application call is caused to fail.Implicit intent mode refers to that, when needs provide invocation component for outside, phase can be increased Should ground functional entrance intent-filter.Each function of commonly used program needs configuration correspondingly intent-filter, More functional entrance intent-filter so occurs, it has not been convenient to the management of entrance, and in the various situation of functional entrance Under, it is also possible to there is the problems such as chaotic entrance, forgetting discrete function entrance.
The content of the invention
The embodiment of the present invention provides a kind of component call method, it is possible to provide unified outside entry call mode is to start System component, performs pending business.
In a first aspect, the embodiments of the invention provide a kind of component call method, this method includes:
External request is received by outside entrance, the external request carries the first information and the second information, and described the One information is used to characterize the system component for handling and calling needed for the external request;Second information is used for described in sign processing The target class used in external request needed for pending business;
According to the first information and second information, the system component is called, institute is performed into the target class State pending business.
It is described according to the first information and second information in some possible embodiments, call the system Component, performing the pending business into the target class includes:
Judge whether the first information and second information meet component call condition;
If it has, then calling the system component, the pending business is performed into the target class;Wherein, institute Component call condition is stated to comprise at least:The first information and second information are not sky.
It is described to call the system component in some possible embodiments, into the target class perform described in wait to hold Capable business includes:
The system component is called to enter the target class, there is provided function services corresponding to the target class, the function Service and be used to perform what the pending business provided by the target class;
Authenticate to the function services it is legal after, utilize the function services to perform the pending business.
In some possible embodiments, before the reception external request by outside entrance, in addition to:
Declare the outside entrance of the system component;Wherein, the outside entrance is used to be supplied to other application to access, with Call the system component.
In some possible embodiments, the system component includes at least one in the following:Movable component Activity, serviced component service, broadcast reception device assembly broadcastreceiver.
Second aspect, the embodiments of the invention provide a kind of terminal device, the terminal device includes being used to perform above-mentioned the The functional unit of the method for one side.
The third aspect, the embodiments of the invention provide another terminal device, the terminal device includes:Memory, processing Device and the computer program that can be run in the memory and on the processor is stored in, described in the computing device The method that as above any one of first aspect is realized during computer program.
Fourth aspect, the invention provides a kind of computer-readable recording medium, the computer-readable recording medium is deposited The program code performed by computing device is stored up.Described program code includes being used for the side for performing as above any one of first aspect The instruction of method.
5th aspect, the invention provides a kind of computer program product including instructing, when it runs on computers When so that the method that computer performs any one of above-mentioned first aspect.
Terminal device (being specially the third party application run on the terminal device) is by outer in the embodiment of the present invention Portion's entrance receives external request, and the external request carries the first information and the second information, and the first information is used to characterize Handle the system component called needed for the external request;Second information is used to characterize to handle to be waited to hold in the external request The target class used needed for capable business;According to the first information and second information, the system component is called, is entered The target class performs the pending business;So third party application can provide unified outside entrance to start phase Answer ground system component to perform business pending in external request, avoid calling by wrapping name and class name mode in the prior art Third-party application increases later maintenance difficulty, the problem of malloc failure malloc, business can not be handled occurs after changing bag name or class name, The problems such as also avoiding providing the management of the more inconvenient entrance of entrance in the prior art simultaneously.
Brief description of the drawings
Technical scheme in order to illustrate the embodiments of the present invention more clearly, it is required in being described below to embodiment to use Accompanying drawing is briefly described, it should be apparent that, drawings in the following description are some embodiments of the present invention, general for this area For logical technical staff, on the premise of not paying creative work, other accompanying drawings can also be obtained according to these accompanying drawings.
Fig. 1 is a kind of schematic flow diagram of component call method provided in an embodiment of the present invention;
Fig. 2 is whether a kind of action parameters provided in an embodiment of the present invention are empty judgement code schematic diagram;
Fig. 3 is whether a kind of target_action parameters provided in an embodiment of the present invention are empty judgement code schematic diagram;
Fig. 4 is the judgement code schematic diagram that a kind of target_action parameters provided in an embodiment of the present invention whether there is;
Fig. 5 is a kind of code signal for whether needing to return to response message based on external request provided in an embodiment of the present invention Figure;
Fig. 6 is a kind of code for whether needing to return to response message based on external request that another embodiment of the present invention provides Schematic diagram;
Fig. 7 is the statement code schematic diagram of three kinds of android components provided in an embodiment of the present invention;
Fig. 8 is a kind of schematic flow diagram for component call method that another embodiment of the present invention provides;
Fig. 9 is a kind of schematic block diagram of terminal device provided in an embodiment of the present invention;
Figure 10 is a kind of schematic block diagram for terminal device that another embodiment of the present invention provides.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete Site preparation describes, it is clear that described embodiment is part of the embodiment of the present invention, rather than whole embodiments.Based on this hair Embodiment in bright, the every other implementation that those of ordinary skill in the art are obtained under the premise of creative work is not made Example, belongs to the scope of protection of the invention.
It should be appreciated that ought be in this specification and in the appended claims in use, term " comprising " and "comprising" instruction Described feature, entirety, step, operation, the presence of element and/or component, but it is not precluded from one or more of the other feature, whole Body, step, operation, element, component and/or its presence or addition for gathering.
It is also understood that the term used in this description of the invention is merely for the sake of the mesh for describing specific embodiment And be not intended to limit the present invention.As used in description of the invention and appended claims, unless on Other situations are hereafter clearly indicated, otherwise " one " of singulative, "one" and "the" are intended to include plural form.
It will be further appreciated that the term "and/or" used in description of the invention and appended claims is Refer to any combinations of one or more of the associated item listed and be possible to combine, and including these combinations.
As used in this specification and in the appended claims, term " if " can be according to context quilt Be construed to " when ... " or " once " or " in response to determining " or " in response to detecting ".Similarly, phrase " if it is determined that " or " if detecting [described condition or event] " can be interpreted to mean according to context " once it is determined that " or " in response to true It is fixed " or " once detecting [described condition or event] " or " in response to detecting [described condition or event] ".
In the specific implementation, the terminal described in the embodiment of the present invention is including but not limited to such as with touch sensitive surface The mobile phone, laptop computer or tablet PC of (for example, touch-screen display and/or touch pad) etc it is other just Portable device.It is to be further understood that in certain embodiments, the equipment is not portable communication device, but with tactile Touch the desktop computer of sensing surface (for example, touch-screen display and/or touch pad).
In discussion below, the terminal including display and touch sensitive surface is described.It is, however, to be understood that It is that terminal can include one or more of the other physical user-interface device of such as physical keyboard, mouse and/or control-rod.
Terminal supports various application programs, such as one or more of following:Drawing application program, demonstration application journey Sequence, word-processing application, website create application program, disk imprinting application program, spreadsheet applications, game application Program, telephony application, videoconference application, email application, instant messaging applications, exercise Support application program, photo management application program, digital camera application program, digital camera application program, web-browsing application Program, digital music player application and/or video frequency player application program.
The various application programs that can be performed in terminal can use at least one public of such as touch sensitive surface Physical user-interface device.It can adjust and/or change among applications and/or in corresponding application programs and touch sensitive table The corresponding information shown in the one or more functions and terminal in face.So, the public physical structure of terminal is (for example, touch Sensing surface) the various application programs with user interface directly perceived and transparent for a user can be supported.
It is that the embodiment of the present invention provides a kind of schematic flow diagram of component call method referring to Fig. 1, applied to being stored with the On the terminal device of tripartite's application program.Method as shown in Figure 1 may include step is implemented as follows:
Step S102, external request is received by outside entrance, the external request carries the first information and the second letter Breath, the first information are used to characterize the system component for handling and calling needed for the external request;Second information is used for table Sign handles the target class used needed for business pending in the external request.
In the application, third party application can provide unified outside entrance, for other applications or other-end Equipment calls.Normally, third party application is mounted and is stored in terminal device, and the terminal device includes but is not limited to Server, user equipment (User Equipment, UE), smart mobile phone (such as Android phone, IOS mobile phones), personal electricity Brain, tablet personal computer, palm PC, mobile internet device (MID, Mobile Internet Devices) or wearable intelligent The internet devices such as equipment, the embodiment of the present invention are not construed as limiting.
In practical application, the outside entrance that user can be provided in other-end equipment by third party application accesses And call the third party application.It is that other-end equipment can be by network to the end for being provided with third party application End equipment sends external request (concretely service request, such as the homepage of opening/login third-party application).Correspondingly, install It is described outer and what is sent by accessing the outside entrance that the terminal device for having the third party application receives other equipment Ask in portion.Pending business is carried in the external request, also carries the first information and the second information.
Wherein, the first information is used to characterize the system component called needed for the processing processing external request, namely It is that the first information is the outside suction parameter (action parameters) carried in the external request, the action parameters are used for Instruction needs to start which assembly function (alternatively referred to as main classes, such as MainActivity) to handle/perform the external request, The assembly function can be the function for the one or more assemblies that device systems provide.By taking Android system as an example, the component The function for any one or more components that function includes but is not limited in four big components of android offers.
Second information is to handle the target class used needed for business pending in the external request for characterizing, The target action parameters (target_action parameters) concretely carried in the external request, the target action Parameter is used to indicate the target class for handling business pending in the external request.
In an alternative embodiment, the action parameters and the target_action parameters can be understood as calling Where and call what function to handle business pending in the external request, be the action parameters and described Target_action parameters are interpreted as two addresses to a certain extent, but each correspondence mappings have required tune for the two addresses With the component or class name of device systems (such as android).
In an alternative embodiment, the device systems or system include but is not limited to andriod systems, IOS systems, Windows systems etc..
Step S104, according to the first information and second information, the system component is called, into the target Class performs the pending business.
The terminal device (being specially third party application) can be looked into by the first information and second information Find out the main classes (i.e. system component) and target class corresponding to the processing external request;Then call described in the main classes entrance Target class, to perform business pending in the external request.
Understand for help, the main classes can be regarded as the principal function in application code, and the target class is composition institute State the subfunction in principal function.
In one embodiment, the terminal device can determine whether the first information and second information meet Component call condition (i.e. function/class Call Condition);If it is satisfied, then calling the system component to enter the target class, hold Pending business in the row external request.The component call condition can be that user side or the terminal equipment side are independently set Put, the component call condition includes but is not limited to:The first information and second information (i.e. action parameters and Target_action parameters) it is not sky, may also include second information (i.e. target_action parameters) is legal parameters.
Here legal parameters specifically judge to include but is not limited to:By judging target_action parameters whether pre- Setting parameter storehouse, if it is, being defined as legal parameters;Otherwise, it is illegal parameter.Alternatively, can also be according to target_action The form of parameter judges whether identification target_action parameters are preset characters string etc., and the present invention does not limit.
It should be noted that the terminal device can judge whether the first information and second information meet simultaneously The component call condition, can also judge whether the first information and second information each correspond to and meet correspondingly respectively The component call condition.Preferentially, the terminal device can first judge whether the first information is empty;If it is not, then Judge whether second information is empty again;If it is not, alternatively also can determine whether second information is parameter preset Parameter information in storehouse;If it is, continuing executing with follow-up process, correspondingly system component is called, institute is performed into target class State pending business.Correspondingly, flow can be terminated in any one of following or multinomial situation, exit third party application, That is third party application malloc failure malloc.Following any one or multinomial situation are:The first information is empty, described second Information is that empty, described second information is parameter information (i.e. described second information is legal information) to prestore in parameter library etc..
For example, it is described when terminal device receives external request by taking android activity components as an example External request carries action parameters and target_action parameters.Program code is referenced below and is specifically described terminal device The related embodiment of action parameters and target_action parameters is judged respectively.
As Fig. 2-Fig. 4 respectively it is exemplary provide terminal device (be specially third party application) judge action parameters with Whether target_action parameters meet the code schematic diagram of the component call condition.Wherein, Fig. 2 and Fig. 3 be shown respectively as What judges whether action parameters and target_action parameters are empty code schematic diagram, and Fig. 4 illustrates how to judge Target_action parameters whether the code schematic diagram in the parameter library that prestores.
Specifically, such as Fig. 2, terminal device can call code shown in Fig. 2 to judge whether action parameters are sky parameter, if For sky, then simultaneously bolt down procedure (i.e. third party application) is exited;Parameter if not empty, then continue to judge target_action Whether parameter is sky parameter.
Correspondingly as Fig. 3, terminal device can call code shown in Fig. 3 to judge whether target_action parameters are empty Parameter, if it is empty, then exit simultaneously bolt down procedure (i.e. third party application);Parameter if not empty, then follow-up process is performed, such as Judge that target_action parameters whether there is (judging target_action parameters whether in the parameter library that prestores).
Specifically, such as Fig. 4, terminal device can call code shown in Fig. 4 to judge that target_action parameters whether there is (i.e. whether in parameter preset storehouse), if it is not, then exiting simultaneously bolt down procedure.If it is, follow-up process is continued executing with, if The target_action parameters are put, and call each self-corresponding system component of the action and arget_action parameters And target class handles business pending in the external request.The system component includes but is not limited to Android system In any one of four big components or multinomial component.
In still another embodiment, the system component is called described in step S104, institute is performed into the target class Stating pending business includes:The system component is called to enter the target class, there is provided function corresponding to the target class takes Business, the function services are used to perform what the pending business provided by the target class;Authenticating to the function Service it is legal after, utilize the function services to perform the pending business.
Specifically, terminal device is reseted and enters the target class, there is provided the target class correspondingly function services;Enter one Step ground, the terminal device can determine whether the function services are legal, if legal just allow described in the target class execution Pending business in external request.The function services correspond with the system component, if system component is Activity components, then the function services are target pages;If system component is BroadcastReceiver components, The function services are target broadcast;If system component is service components, the function services are destination service.
By taking activity components as an example, example described in above-mentioned Fig. 2 to Fig. 4 is quoted, if terminal device (is specially third party Application program) exist and be not space-time determining target_action parameters, the resettable target_ of terminal device Action parameters, and jump to correspondingly target pages.Meanwhile terminal device also can detect whether to need to ask based on the outside Seek response message, such as return value corresponding to return.If it is not required, then the terminal device can tune to the page object Face, the target pages can be closed after having redirected, or the pending business is performed on the target pages.If need Will, then correspondingly return value (i.e. response message) is returned to caller, notify successfully to redirect the target pages, then closing The target pages.Specifically as Fig. 5 shows whether need the code schematic diagram for returning to response message.
The caller is not third-party application, such as is enabled in application A using B, then caller is the using A the 3rd Fang Yingyong is using B.
Correspondingly, the target pages can receive the external request, the terminal device is detectable jump to it is described Whether the parameter (being service parameter here) needed for target pages is legal, such as whether identification parameter lacks, is empty, parameter class Type mistake etc., if there is the above situation, then identification parameter is illegal, closes and exits the third party application.Such as Fruit is legal, then normally handles the pending business using the target pages, correspondingly also can determine whether that needs are based on Response message, such as return value corresponding to the external request return.If it is not required, then terminate flow.If it is required, then to tune User returns to correspondingly return value (i.e. response message), notice business processing success.Specifically as Fig. 6 shows another whether need Return to the code schematic diagram of response message.
It should be noted that usually require to return to response message (such as return value) for activity components, for other System component, as BroadcastReceiver components or service components need not return to response message.
In an alternative embodiment, before step S102, also need first to declare the outside entrance of system component.Specifically, terminal Equipment (being specially third party application) can declare each component (such as activity groups in AndroidManifest.xml Part, BroadcastReceiver components or service components) each self-corresponding outside entrance class, that is, it is available to other application The sole inlet of access.Specifically as Fig. 7 shows the statement in each comfortable AndroidManifest.xml of three kinds of android components Code schematic diagram.
By implementing the embodiment of the present invention, the outside entrance that can be provided application program is managed collectively and distributed, Avoid entrance excessive the problems such as being inconvenient to manage in the prior art.
Fig. 8 is referred to, is another component call method provided in an embodiment of the present invention.Method as shown in Figure 8 is included such as Lower implementation steps:
Step S202, the outside entrance of system component is declared.
Step S204, external request is received by outside entrance, the external request carries the first information and the second letter Breath, the first information are used to characterize the system component for handling and calling needed for the external request;Second information is used for table Sign handles the target class used needed for business pending in the external request;
Step S206, judge whether the first information and second information meet component call condition;Wherein, it is described Component call condition comprises at least:The first information and second information are not sky.
In the case that terminal device determines the first information and second information meets component call condition, then Continue executing with step S208;Otherwise, flow is terminated.
Step S208, the system component is called to enter the target class, there is provided function services corresponding to the target class, The function services are used to perform what the pending business provided by the target class;
Step S210, authenticate to the function services it is legal after, using the function services perform it is described pending Business.
Terminal device (specially running third party application on the terminal device) is by outer in the embodiment of the present invention Portion's entrance receives external request, and the external request carries the first information and the second information, and the first information is used to characterize Handle the system component called needed for the external request;Second information is used to characterize to handle to be waited to hold in the external request The target class used needed for capable business;According to the first information and second information, the system component is called, is entered The target class performs the pending business;So third party application can provide unified outside entrance to start phase Answer ground system component to perform business pending in external request, avoid calling by wrapping name and class name mode in the prior art Third-party application increases later maintenance difficulty, the problem of malloc failure malloc, business can not be handled occurs after changing bag name or class name, The problems such as also avoiding providing the management of the more inconvenient entrance of entrance in the prior art simultaneously.
It is a kind of schematic block diagram of terminal device provided in an embodiment of the present invention referring to Fig. 9.Terminal as described in Figure 9 is set Standby 100 include receiving unit 102 and processing unit 104;Wherein,
The receiving unit 102, for receiving external request by outside entrance, the external request carries the first letter Breath and the second information, the first information are used to characterize the system component for handling and calling needed for the external request;Described second Information is used to characterize the target class for handling and using needed for business pending in the external request;
The processing unit 104, for according to the first information and second information, calling the system component, The pending business is performed into the target class.
In some possible embodiments,
The processing unit 104, for judging whether the first information and second information meet component call bar Part;If it has, then calling the system component, the pending business is performed into the target class;Wherein, the component Call Condition comprises at least:The first information and second information are not sky.
In some possible embodiments,
The processing unit 104, for calling the system component to enter the target class, there is provided the class pair should Function services, the function services by the target class be used for perform what the pending business provided;
The processing unit 104, be additionally operable to authenticate to the function services it is legal after, utilize the function services perform The pending business.
In some possible embodiments,
The processing unit 104, it is additionally operable to declare the outside entrance of the system component;Wherein, the outside entrance is used In being supplied to other application to access, to call the system component.
In some possible embodiments, the system component includes at least one in the following:Movable component Activity, serviced component service, broadcast reception device assembly broadcastreceiver.
Terminal device (being specially the third party application run on the terminal device) is by outer in the embodiment of the present invention Portion's entrance receives external request, and the external request carries the first information and the second information, and the first information is used to characterize Handle the system component called needed for the external request;Second information is used to characterize to handle to be waited to hold in the external request The target class used needed for capable business;According to the first information and second information, the system component is called, is entered The target class performs the pending business;So third party application can provide unified outside entrance to start phase Answer ground system component to perform business pending in external request, avoid calling by wrapping name and class name mode in the prior art Third-party application increases later maintenance difficulty, the problem of malloc failure malloc, business can not be handled occurs after changing bag name or class name, The problems such as also avoiding providing the management of the more inconvenient entrance of entrance in the prior art simultaneously.
It is a kind of schematic block diagram for terminal device that another embodiment of the present invention provides referring to Figure 10.As shown in Figure 10 Terminal device 100 in the present embodiment can include:One or more processors 801;One or more input equipments 802, one Individual or multiple output equipments 803 and memory 804.Above-mentioned processor 801, input equipment 802, output equipment 803 and memory 804 are connected by bus 805.Memory 802 is used for store instruction, and processor 801 is used for the finger for performing the storage of memory 802 Order.Wherein, processor 801 is used for:
External request is received by outside entrance, the external request carries the first information and the second information, and described the One information is used to characterize the system component for handling and calling needed for the external request;Second information is used for described in sign processing The target class used in external request needed for pending business;
According to the first information and second information, the system component is called, institute is performed into the target class State pending business.
It is described according to the first information and second information in some possible embodiments, call the system Component, performing the pending business into the target class includes:
Judge whether the first information and second information meet component call condition;
If it has, then calling the system component, the pending business is performed into the target class;Wherein, institute Component call condition is stated to comprise at least:The first information and second information are not sky.
It is described to call the system component in some possible embodiments, into the target class perform described in wait to hold Capable business includes:
The system component is called to enter the target class, there is provided function services corresponding to the target class, the function Service and be used to perform what the pending business provided by the target class;
Authenticate to the function services it is legal after, utilize the function services to perform the pending business.
In some possible embodiments, before the reception external request by outside entrance, the processor 801 is also For:
Declare the outside entrance of the system component;Wherein, the outside entrance is used to be supplied to other application to access, with Call the system component.
In some possible embodiments, the system component includes at least one in the following:Movable component Activity, serviced component service, broadcast reception device assembly broadcastreceiver.
It should be appreciated that in embodiments of the present invention, alleged processor 801 can be CPU (Central Processing Unit, CPU), the processor can also be other general processors, digital signal processor (Digital Signal Processor, DSP), application specific integrated circuit (Application Specific Integrated Circuit, ASIC), ready-made programmable gate array (Field-Programmable Gate Array, FPGA) or other FPGAs Device, discrete gate or transistor logic, discrete hardware components etc..General processor can be microprocessor or this at It can also be any conventional processor etc. to manage device.
Input equipment 802 can include Trackpad, fingerprint adopt sensor (finger print information that is used to gathering user and fingerprint Directional information), microphone etc., output equipment 803 can include display (LCD etc.), loudspeaker etc..
The memory 804 can include read-only storage and random access memory, and to processor 801 provide instruction and Data.The a part of of memory 804 can also include nonvolatile RAM.For example, memory 804 can also be deposited Store up the information of device type.
In the specific implementation, processor 801, input equipment 802, the output equipment 803 described in the embodiment of the present invention can The implementation described in methods described embodiment provided in an embodiment of the present invention is performed, also can perform institute of the embodiment of the present invention The implementation of the terminal of description, will not be repeated here.
A kind of computer-readable recording medium, the computer-readable storage medium are provided in another embodiment of the invention Matter is stored with computer program, and the computer program is realized when being executed by processor described in embodiment of the method as described above Implementation.
The computer-readable recording medium can be the internal storage unit of the terminal described in foregoing any embodiment, example Such as the hard disk or internal memory of terminal.The computer-readable recording medium can also be the External memory equipment of the terminal, such as The plug-in type hard disk being equipped with the terminal, intelligent memory card (Smart Media Card, SMC), secure digital (Secure Digital, SD) card, flash card (Flash Card) etc..Further, the computer-readable recording medium can also be wrapped both Including the internal storage unit of the terminal also includes External memory equipment.The computer-readable recording medium is described for storing Other programs and data needed for computer program and the terminal.The computer-readable recording medium can be also used for temporarily When store the data that has exported or will export.
Those of ordinary skill in the art are it is to be appreciated that the list of each example described with reference to the embodiments described herein Member and algorithm steps, it can be realized with electronic hardware, computer software or the combination of the two, in order to clearly demonstrate hardware With the interchangeability of software, the composition and step of each example are generally described according to function in the above description.This A little functions are performed with hardware or software mode actually, application-specific and design constraint depending on technical scheme.Specially Industry technical staff can realize described function using distinct methods to each specific application, but this realization is not It is considered as beyond the scope of this invention.
It is apparent to those skilled in the art that for convenience of description and succinctly, the end of foregoing description End and the specific work process of unit, may be referred to the corresponding process in preceding method embodiment, will not be repeated here.
In several embodiments provided herein, it should be understood that disclosed terminal and method, it can be passed through Its mode is realized.For example, device embodiment described above is only schematical, for example, the division of the unit, only Only a kind of division of logic function, there can be other dividing mode when actually realizing, such as multiple units or component can be tied Another system is closed or is desirably integrated into, or some features can be ignored, or do not perform.In addition, shown or discussed phase Coupling or direct-coupling or communication connection between mutually can be INDIRECT COUPLING or the communication by some interfaces, device or unit Connection or electricity, the connection of mechanical or other forms.
The unit illustrated as separating component can be or may not be physically separate, show as unit The part shown can be or may not be physical location, you can with positioned at a place, or can also be distributed to multiple On NE.Some or all of unit therein can be selected to realize scheme of the embodiment of the present invention according to the actual needs Purpose.
In addition, each functional unit in each embodiment of the present invention can be integrated in a processing unit, can also It is that unit is individually physically present or two or more units are integrated in a unit.It is above-mentioned integrated Unit can both be realized in the form of hardware, can also be realized in the form of SFU software functional unit.
If the integrated unit is realized in the form of SFU software functional unit and is used as independent production marketing or use When, it can be stored in a computer read/write memory medium.Based on such understanding, technical scheme is substantially The part to be contributed in other words to prior art, or all or part of the technical scheme can be in the form of software product Embody, the computer software product is stored in a storage medium, including some instructions are causing a computer Equipment (can be personal computer, server, or network equipment etc.) performs the complete of each embodiment methods described of the present invention Portion or part steps.And foregoing storage medium includes:USB flash disk, mobile hard disk, read-only storage (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disc or CD etc. are various can store journey The medium of sequence code.
The foregoing is only a specific embodiment of the invention, but protection scope of the present invention is not limited thereto, any Those familiar with the art the invention discloses technical scope in, various equivalent modifications can be readily occurred in or replaced Change, these modifications or substitutions should be all included within the scope of the present invention.Therefore, protection scope of the present invention should be with right It is required that protection domain be defined.

Claims (10)

  1. A kind of 1. component call method, it is characterised in that methods described includes:
    External request is received by outside entrance, the external request carries the first information and the second information, first letter Cease and handle the system component called needed for the external request for characterizing;Second information, which is used to characterize, handles the outside The target class used in request needed for pending business;
    According to the first information and second information, call the system component, into the target class perform described in treat The business of execution.
  2. 2. according to the method for claim 1, it is characterised in that it is described according to the first information and second information, The system component is called, performing the pending business into the target class includes:
    Judge whether the first information and second information meet component call condition;
    If it has, then calling the system component, the pending business is performed into the target class;Wherein, described group Part Call Condition comprises at least:The first information and second information are not sky.
  3. 3. according to the method for claim 1, it is characterised in that it is described to call the system component, into the target class Performing the pending business includes:
    The system component is called to enter the target class, there is provided function services corresponding to the target class, the function services It is used to perform what the pending business provided by the target class;
    Authenticate to the function services it is legal after, utilize the function services to perform the pending business.
  4. 4. according to the method for claim 1, it is characterised in that before the reception external request by outside entrance, also Including:
    Declare the outside entrance of the system component;Wherein, the outside entrance is used to be supplied to other application to access, to call The system component.
  5. 5. according to the method described in claim any one of 1-4, it is characterised in that the system component include it is following at least One:Movable component activity, serviced component service, broadcast reception device assembly broadcastreceiver.
  6. A kind of 6. terminal device, it is characterised in that including:
    Receiving unit, for receiving external request by outside entrance, the external request carries the first information and the second letter Breath, the first information are used to characterize the system component for handling and calling needed for the external request;Second information is used for table Sign handles the target class used needed for business pending in the external request;
    Processing unit, for according to the first information and second information, the system component being called, into the target Class performs the pending business.
  7. 7. terminal device according to claim 6, it is characterised in that
    The processing unit, for judging whether the first information and second information meet component call condition;If It is then to call the system component, the pending business is performed into the target class;Wherein, the component call bar Part comprises at least:The first information and second information are not sky.
  8. 8. terminal device according to claim 6, it is characterised in that
    The processing unit, for calling the system component to enter the target class, there is provided function corresponding to the target class Service, the function services are used to perform what the pending business provided by the target class;
    The processing unit, be additionally operable to authenticate to the function services it is legal after, using the function services perform described in treat The business of execution.
  9. 9. a kind of terminal device, it is characterised in that including memory, processor and be stored in the memory and can be in institute The computer program run on processor is stated, realizes such as claim 1 to 5 times described in the computing device during computer program One methods described.
  10. 10. a kind of computer-readable recording medium, the computer-readable recording medium storage has computer program, and its feature exists In realization such as any one of claim 1 to 5 methods described when the computer program is executed by processor.
CN201710968728.7A 2017-10-17 2017-10-17 A kind of component call method and terminal device Withdrawn CN107844335A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710968728.7A CN107844335A (en) 2017-10-17 2017-10-17 A kind of component call method and terminal device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710968728.7A CN107844335A (en) 2017-10-17 2017-10-17 A kind of component call method and terminal device

Publications (1)

Publication Number Publication Date
CN107844335A true CN107844335A (en) 2018-03-27

Family

ID=61662507

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710968728.7A Withdrawn CN107844335A (en) 2017-10-17 2017-10-17 A kind of component call method and terminal device

Country Status (1)

Country Link
CN (1) CN107844335A (en)

Similar Documents

Publication Publication Date Title
CN107704765A (en) A kind of interface access method, server and computer-readable recording medium
CN107301051A (en) The caching of terminal dynamic data and exchange method, terminal, system and computer-readable recording medium
CN106201468B (en) A kind of processing method of screenshotss, device and electronic equipment
CN107844189A (en) A kind of method, system, terminal and computer-readable recording medium for reducing blank screen power consumption
CN107992517A (en) A kind of data processing method, server and computer-readable medium
CN106685997A (en) Method and terminal for transmitting data
CN107390969B (en) A kind of method and terminal controlling suspended window
CN107733891A (en) A kind of user registering method, server and computer-readable recording medium
CN108255402A (en) Check the method, terminal and computer readable storage medium of footmark content of announcement
CN108804175A (en) Multilingual adaptation method, mobile terminal and computer readable storage medium
CN106648316A (en) Unlocking method and terminal
CN106487887A (en) A kind of method realizing quick registration and terminal
CN108520186A (en) Record screen method, mobile terminal and computer readable storage medium
CN108920704A (en) File access pattern method, file restoring device and mobile terminal
CN107515666A (en) A kind of data managing method and terminal
CN108366298A (en) Video broadcasting method, mobile terminal and computer readable storage medium
CN108509228A (en) Method, terminal device and the computer readable storage medium of loading page
CN106131805A (en) The method of a kind of information transmission and terminal
CN107368735A (en) One kind applies installation method, mobile terminal and computer-readable recording medium
CN106775835A (en) Obtain method, server and the terminal of upgrade file
CN107301236A (en) Application searches method, mobile terminal, server and computer-readable recording medium
CN107844335A (en) A kind of component call method and terminal device
CN108171063A (en) Method, terminal and the computer readable storage medium of access safety element
CN107302563A (en) A kind of method and terminal for opening web page interlinkage
CN106572470A (en) Network access method, mobile terminal and gateway device

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
WW01 Invention patent application withdrawn after publication
WW01 Invention patent application withdrawn after publication

Application publication date: 20180327