CN107643952A - Local class libraries call method and device - Google Patents

Local class libraries call method and device Download PDF

Info

Publication number
CN107643952A
CN107643952A CN201610575879.1A CN201610575879A CN107643952A CN 107643952 A CN107643952 A CN 107643952A CN 201610575879 A CN201610575879 A CN 201610575879A CN 107643952 A CN107643952 A CN 107643952A
Authority
CN
China
Prior art keywords
class libraries
local
local class
component
service
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.)
Granted
Application number
CN201610575879.1A
Other languages
Chinese (zh)
Other versions
CN107643952B (en
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.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen 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 Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN201610575879.1A priority Critical patent/CN107643952B/en
Publication of CN107643952A publication Critical patent/CN107643952A/en
Application granted granted Critical
Publication of CN107643952B publication Critical patent/CN107643952B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Stored Programmes (AREA)

Abstract

The invention discloses a kind of local class libraries call method, this method includes:Type of service and service parameter are obtained according to the control instruction of input;According to the local class library information table being pre-configured with, local class libraries component corresponding to the type of service is chosen;The interface of local class libraries component based on the selection, the service parameter is sent to the local class libraries component;The local class libraries component is controlled to perform the control instruction according to the service parameter.The invention also discloses a kind of local class libraries calling device.The present invention solves React Native component imperfection, causes application software can not perform the technical problem of function corresponding to missing component, is greatly enriched the function of React Native application software, improves Consumer's Experience.

Description

Local class libraries call method and device
Technical field
The present invention relates to network technique field, more particularly to a kind of local class libraries call method and device.
Background technology
React Native (primary reaction, abbreviation RN) are that one that Facebook is released can just be compiled simultaneously with Java language Write ios (Mobile operating system of Apple Inc.'s exploitation) application software, android (Android) application software, and the one of backstage Item technology, significantly reduces the development cost of application software, and increasing application software uses React Native.
However, because React Native technologies are still immature, lack the Common Component in many practical applications, cause When carrying out the exploitation of application function software, it is impossible to which corresponding function is provided.For example, existing React Native technologies do not carry For the functional unit such as video-see, local photograph album is checked, local camera calls, local file upload, use is also resulted in The application software that React Native write can not watch video, consult local photograph album, calling local camera or upload this Ground file, and these functions are also the more conventional function of user, have had a strong impact on the practicality of application software.
The content of the invention
It is a primary object of the present invention to provide a kind of local class libraries call method and device, it is intended to solve React The incomplete technical problem of Native application software functional units.
To achieve the above object, the present invention provides a kind of local class libraries call method, the local class libraries call method bag Include following steps:
Type of service and service parameter are obtained according to the control instruction of input;
According to the local class library information table being pre-configured with, local class libraries component corresponding to the type of service is chosen;
The interface of local class libraries component based on the selection, the service parameter is sent to the local set of class libraries Part;
The local class libraries component is controlled to perform the control instruction according to the service parameter.
In one embodiment, it is described type of service obtained according to the control instruction of input and the step of service parameter it Before, in addition to:
Each local class libraries being pre-configured with is packaged to obtain corresponding each local class libraries component, and according to described each Ground class libraries component Configuration local class library information table.
In one embodiment, it is described type of service obtained according to the control instruction of input and the step of service parameter it Before, in addition to:
For business customizing parameter corresponding to type of service configuration;
The interface of the local class libraries component based on the selection, the local class libraries is sent to by the service parameter The step of component, includes:
The interface of local class libraries component based on the selection, the service parameter and the business customizing parameter are sent To the local class libraries component;
The step of control local class libraries component performs the control instruction according to the service parameter includes:
Control the local class libraries component to perform the control according to the service parameter and the business customizing parameter to refer to Order.
In one embodiment, the control local class libraries component performs the control according to the service parameter and referred to The step of making includes:
Class or method are chosen from the local class libraries component according to the type of service, control class or the side of the selection Method performs the control instruction according to the service parameter.
In one embodiment, each local class libraries includes video class libraries, file uploads class libraries, camera function class libraries One or more of with local album function class libraries.
In addition, to achieve the above object, the present invention also provides a kind of local class libraries calling device, the local class libraries calls Device includes:
Business module, for obtaining type of service and service parameter according to the control instruction of input;
Module is chosen, for according to the local class library information table being pre-configured with, choosing local corresponding to the type of service Class libraries component;
Sending module, for the interface of the local class libraries component based on the selection, the service parameter is sent to institute State local class libraries component;
Execution module, for controlling the local class libraries component to perform the control instruction according to the service parameter.
In one embodiment, the local class libraries calling device also includes:
Package module, for each local class libraries being pre-configured with to be packaged to obtain corresponding each local class libraries component, And according to each local class libraries component Configuration local class library information table.
In one embodiment, the local class libraries calling device also includes:
Customized module, for for the type of service configuration corresponding to business customizing parameter;
The sending module, is additionally operable to,
The interface of local class libraries component based on the selection, the service parameter and the business customizing parameter are sent To the local class libraries component;
The execution module, is additionally operable to,
Control the local class libraries component to perform the control according to the service parameter and the business customizing parameter to refer to Order.
In one embodiment, the execution module is additionally operable to,
Class or method are chosen from the local class libraries component according to the type of service, control class or the side of the selection Method performs the control instruction according to the service parameter.
In one embodiment, each local class libraries includes video class libraries, file uploads class libraries, camera function class libraries One or more of with local album function class libraries.
A kind of local class libraries call method and device that the embodiment of the present invention proposes, industry is obtained according to the control instruction of input Service type and service parameter;Then, according to the local class library information table being pre-configured with, choose local corresponding to present type of service Class libraries component, to call this local class libraries component to perform current control instruction;Then, the local class libraries component based on selection Interface, service parameter is sent to local class libraries component, control local class libraries component according to service parameter perform control instruction, Hereby it is achieved that control instruction is performed by local class libraries.The present invention is called by making full use of existing local class base resource Local class libraries component substitution React Native primary component, performs the control instruction that user inputs to application software, solves React Native component imperfection, cause application software can not perform the technical problem of function corresponding to missing component, The function of React Native application software is greatly enriched, improves Consumer's Experience.
Brief description of the drawings
Fig. 1 is the schematic flow sheet of the local class libraries call method first embodiment of the present invention;
Fig. 2 is the local class libraries call method second embodiment of the present invention, the schematic flow sheet of the 5th embodiment;
Fig. 3 is the schematic flow sheet of the local class libraries call method 3rd embodiment of the present invention;
Fig. 4 is the schematic flow sheet of the local class libraries call method fourth embodiment of the present invention;
Fig. 5 is the local class libraries calling device first embodiment of the present invention, the high-level schematic functional block diagram of fourth embodiment;
Fig. 6 is the local class libraries calling device second embodiment of the present invention, the high-level schematic functional block diagram of the 5th embodiment;
Fig. 7 is the high-level schematic functional block diagram of the local class libraries calling device 3rd embodiment of the present invention.
The realization, functional characteristics and advantage of the object of the invention will be described further referring to the drawings in conjunction with the embodiments.
Embodiment
It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, it is not intended to limit the present invention.
Reference picture 1, the local class libraries call method first embodiment of the present invention provides a kind of local class libraries call method, described Local class libraries call method includes:
Step S10, type of service and service parameter are obtained according to the control instruction of input.
The present invention compensate for current React Native by calling local class libraries to perform the operational order of application software The incomplete shortcoming of (primary reaction, abbreviation RN) technology component function so that the application write based on React Native is soft Part can provide the user more abundant functional experience.The present embodiment is applied with the React Native disposed in mobile terminal Illustrate exemplified by software.
Specifically, as a kind of embodiment, first, mobile terminal receives the control instruction of user's input, obtains business Type and service parameter.
Wherein, type of service be current control instruction type, such as video loading instruction, picture uploading instructions, image Head call instruction, local photograph album check instruction etc.;Service parameter then describes the supplemental characteristic performed needed for current control instruction, Such as need to load the URL addresses of video, the file path that need to be uploaded, the local hardware that need to be called, the local file road that need to be checked Footpath etc..
Step S20, according to the local class library information table being pre-configured with, local set of class libraries corresponding to the type of service is chosen Part.
After type of service and service parameter is obtained, according to current type of service and the local class library information being pre-configured with Table, local class libraries component corresponding to present type of service is chosen, the local class libraries component of selection is to be able to carry out current business Local class libraries.
Each local class libraries that present terminal local system is available for calling has been recorded in the local class library information table being pre-configured with Component, class name can be used to carry out the mark of inhomogeneity library component.
Specifically, as a kind of embodiment, mobile terminal can obtain according to current type of service and be able to carry out working as The class of preceding business.For example, current type of service is camera call instruction, then the class for being able to carry out current business is camera Call class.
Then, mobile terminal searches the class of matching according to the class for being able to carry out current business in local class library information table Name.
If successful search is to the class name matched with being able to carry out the class of current business, by sheet corresponding to the class name found Ground class libraries component, as local class libraries component corresponding to present type of service.
As another embodiment, the service class that each local class libraries component is correspondingly able to carry out can also be pre-configured with Type, so that after the type of service of current business is obtained, can be directly according to local class library information table search to corresponding local Class libraries component.
Thus, local class libraries component corresponding to present type of service has been obtained.
Step S30, the interface of the local class libraries component based on the selection, the local is sent to by the service parameter Class libraries component.
After selection obtains local class libraries component, by the interface of this local class libraries component, service parameter is sent to this Ground class libraries component.
Step S40, the local class libraries component is controlled to perform the control instruction according to the service parameter.
Local class libraries component is after service parameter is received, the control instruction according to corresponding to performing service parameter.It is for example, local Video download link address of the video class libraries in service parameter, from video corresponding to server download, and it is loaded into display Interface, watched for user, solving current React Native does not have video component, causes the application software of exploitation can not watch The problem of video.
In the present embodiment, type of service and service parameter are obtained according to the control instruction of input;Then, according to matching somebody with somebody in advance The local class library information table put, local class libraries component corresponding to present type of service is chosen, to call this local class libraries component Perform current control instruction;Then, the interface of the local class libraries component based on selection, local class libraries is sent to by service parameter Component, local class libraries component is controlled to perform control instruction according to service parameter, hereby it is achieved that performing control by local class libraries Instruction.The present embodiment calls local class libraries component substitution React Native by making full use of existing local class base resource Primary component, perform the control instruction that is inputted to application software of user, solve React Native component imperfection, lead Cause application software can not perform the technical problem of function corresponding to missing component, be greatly enriched React Native using soft The function of part, improves Consumer's Experience.
Further, reference picture 2, the local class libraries call method second embodiment of the present invention provide a kind of local class libraries and called Method, based on the embodiment shown in above-mentioned Fig. 1, before the step S10, in addition to:
Step S50, by each local class libraries being pre-configured be packaged to obtain corresponding to each local class libraries component, and according to Each local class libraries component Configuration local class library information table.
In the present embodiment, each local class libraries is packaged in advance, obtains corresponding each local class libraries component, encapsulation obtains Each local class libraries component provide respectively its interface for call.Also, obtained local class libraries component is React Native The component of layer, it can coordinate with other React Native components, nested use.
It should be noted that local class libraries is the class libraries for the mobile terminal local system being pre-configured with, such as video class libraries, File uploads class libraries, camera function class libraries, local album function class libraries etc..Local class libraries includes one or more same fingers Class corresponding to type or method, such as camera function class libraries is made to include taken pictures corresponding to camera call instruction class, shooting Class etc..
The interface that the class or method called is available in each local class libraries can be exposed by encapsulating obtained local class libraries component Out, for calling.
For ease of searching, it the local class libraries component that its entitled encapsulation of class of local class libraries obtains can be used to name, thus, obtain To the class name of each local class libraries component.
Then, local class library information table, obtained local class library information table are configured according to the class name of each local class libraries component It is middle to have recorded each local class libraries component for being currently available for calling, it also is understood as being currently available for the local class libraries called.Subsequently, may be used The local class libraries component according to corresponding to the local class library information table search to each type of service of configuration.
Further, for the ease of searching, each local class libraries component can also be configured in local class libraries component information table The corresponding instruction type that can be performed.
Hereby it is achieved that the configuration of local class libraries component and local class library information table.
In the present embodiment, each local class libraries being pre-configured with is packaged to obtain corresponding each local class libraries component, And according to each local class libraries component Configuration local class library information table.In the present embodiment, each local class libraries component is to be based on matching somebody with somebody in advance The local class libraries put encapsulates what is obtained, takes full advantage of existing resource and provides business support for application software.The present embodiment can be with According to the component lacked in React Native, selection can realize that the local class libraries of equal function encapsulates to obtain local set of class libraries Part, inconvenience caused by so as to compensate for React Native components missing, has expanded the function of application software.
Further, reference picture 3, the local class libraries call method 3rd embodiment of the present invention provide a kind of local class libraries and called Method, based on the embodiment (the present embodiment is by taking Fig. 1 as an example) shown in above-mentioned Fig. 1 or Fig. 2, before the step S10, in addition to:
Step S60, it is business customizing parameter corresponding to type of service configuration;
The step S30 includes:
Step S31, the interface of the local class libraries component based on the selection, by the service parameter and the business customizing Parameter is sent to the local class libraries component;
The step S40 includes:
Step S41, the local class libraries component is controlled to perform institute according to the service parameter and the business customizing parameter State control instruction.
In the present embodiment, by configuration service customized parameter, it can also be matched somebody with somebody according to business demand for different types of business Put the local irrealizable expanding function of class libraries component.
Can be in advance business customizing parameter corresponding to the configuration of each type of service specifically, as a kind of embodiment, with Optimize each business.The business customizing parameter of different type of service configurations is different;It can be needed according to business for whole service class Corresponding business customizing parameter is respectively configured in type, can also only choose business customizing ginseng corresponding to the type of service configuration of needs Number, can flexibly be set as needed.
For example, video loads business, local video class libraries is only capable of realizing the loading of video, then can determined by configuration service Parameter processed, such as video preview figure download address, the color of video playback progress bar and width, realize adding for video preview figure Carry, the functions such as the display of video playback progress bar, the pause of video play.
The control instruction of user's input is being received, after obtaining type of service and service parameter, mobile terminal is according to local class Storehouse information table chooses the local class libraries component for performing current type business, meanwhile, search whether to be pre-configured with according to type of service There is corresponding business customizing parameter.
If business customizing parameter corresponding to successful search to present type of service, by service parameter and the business found Local class libraries component interface of the customized parameter based on selection, it is sent to the local class libraries component of selection.
Then, control local class libraries component to perform current control according to the service parameter and business customizing parameter received to refer to Order.
For example, during the loading instruction of user's input video, it is that video loads business to obtain present type of service, and obtaining currently needs The video download address of loading is service parameter.
Because the class that can perform video loading business is video class, therefore is chosen from local class library information table and obtain and regard The matching of frequency class, class name identical local video class libraries component.And find business customizing parameter corresponding to video loading business.
Then, the business customizing parameter that service parameter and lookup obtain is sent to local video class libraries component.
Local video class libraries component is after service parameter and business customizing parameter is received, according to download address under server Video corresponding to load, is loaded;Meanwhile according to the video preview figure download address foradownloaded video preview graph of customization, do not broadcasting Put when video, pause video playback or video playback are completed and be shown in video playback interface;, can basis in video playback The color of the video playback bar of customization, width show video playback bar.
Hereby it is achieved that carrying out business customizing on the basis of local class libraries, business function is enriched.
In the present embodiment, it is business customizing parameter corresponding to the configuration of each type of service, to expand each type of service institute energy The function and effect of realization;Then after local class libraries component is chosen, business corresponding to service parameter and present type of service is determined Parameter processed is sent to the local class libraries component of selection;Local class libraries component is controlled to be performed according to service parameter and business customizing parameter Control instruction, so as to carry out the expansion of business on the basis of the business that local class libraries can perform in itself, and can be according to need Configuration service customized parameter is wanted, realizes the customization to expanding function, improves the rich and personalized of application software function.
Further, reference picture 4, the local class libraries call method fourth embodiment of the present invention provide a kind of local class libraries and called Method, based on the embodiment (the present embodiment is by taking Fig. 1 as an example) shown in above-mentioned Fig. 1, Fig. 2 or Fig. 3, the step S40 includes:
Step S42, class or method corresponding to the type of service are chosen from the local class libraries component, controls the choosing The class or method taken performs the control instruction according to the service parameter.
In the present embodiment, due to that may include multiple classes or method in local class libraries, mobile terminal can be according to current industry Service type, which is chosen, performs class or method corresponding to current business.
Specifically, can configure a total business type as a kind of embodiment, in the present embodiment includes more height Type of service.Total business type is classified for the summary of current business, and different total business type differences is larger, such as file uploads Business and camera call business;Subservice type is more similar subservice, such as camera in same total business type Take pictures business and video record business in calling business.
Then after local class libraries component receives service parameter, it can be chosen according to type of service in local class libraries component Class or method corresponding to subservice type, then, the class or method for controlling selection perform control instruction according to service parameter.
For example, current control instruction instructs for video capture, then type of service is the video in camera call instruction Shooting instruction, the local class libraries component of selection is camera function class libraries component;Shot further according to subservice type selecting video Class, perform current control instruction.
If local class libraries component receives service parameter and business customizing parameter simultaneously, control selection class or method according to Service parameter and business customizing parameter perform this control instruction.
Hereby it is achieved that the execution of control instruction.
In the present embodiment, the class of this control instruction is correspondingly able to carry out from local class libraries component according to type of service Or method, the class or method for controlling selection perform this control instruction according to service parameter, realize corresponding to each type of service Class or method directly invoke.
Further, reference picture 2, the local embodiment of class libraries call method the 5th of the present invention provide a kind of local class libraries and called Method, based on the invention described above local class libraries call method second embodiment, each local class libraries includes video class libraries, file Upload one or more of class libraries, camera function class libraries and local album function class libraries.
In the present embodiment, the local class libraries for being available for calling includes video class libraries, file upload class libraries, camera function class libraries One or more of with local album function class libraries.
Video class libraries can be used for carrying out the loading of video, play;File uploads class libraries and is used to call local file to be uploaded to Server, such as user upload the files such as self-defined head portrait, mobile phone photo album photo;Camera function class libraries is used to call local take the photograph As head taken pictures, video record etc.;Local album function class libraries is used to access local photograph album, check local photo etc..
In the present embodiment, after encapsulating each local class libraries and obtaining corresponding local class libraries component, each local class can be based on Library component realizes the calling of local class libraries, so as to solve React Native application software can not currently carry out video loading broadcast Put, file uploads, takes pictures, records a video, accesses the problems such as local photograph album.
Reference picture 5, the local class libraries calling device first embodiment of the present invention provides a kind of local class libraries calling device, described Local class libraries calling device includes:
Business module 10, for obtaining type of service and service parameter according to the control instruction of input.
The present invention compensate for current React Native by calling local class libraries to perform the operational order of application software The incomplete shortcoming of (primary reaction, abbreviation RN) technology component function so that the application write based on React Native is soft Part can provide the user more abundant functional experience.The present embodiment is applied with the React Native disposed in mobile terminal Illustrate exemplified by software.
Specifically, as a kind of embodiment, first, business module 10 receives the control instruction of user's input, obtains industry Service type and service parameter.
Wherein, type of service be current control instruction type, such as video loading instruction, picture uploading instructions, image Head call instruction, local photograph album check instruction etc.;Service parameter then describes the supplemental characteristic performed needed for current control instruction, Such as need to load the URL addresses of video, the file path that need to be uploaded, the local hardware that need to be called, the local file road that need to be checked Footpath etc..
Module 20 is chosen, for according to the local class library information table being pre-configured with, choosing corresponding to the type of service originally Ground class libraries component.
After type of service and service parameter is obtained, module 20 is chosen according to current type of service and the sheet being pre-configured with Ground class library information table, chooses local class libraries component corresponding to present type of service, and the local class libraries component of selection is to be able to carry out The local class libraries of current business.
Each local class libraries that present terminal local system is available for calling has been recorded in the local class library information table being pre-configured with Component, class name can be used to carry out the mark of inhomogeneity library component.
Specifically, as a kind of embodiment, choosing module 20 can be able to carry out according to current type of service, acquisition The class of current business.For example, current type of service is camera call instruction, then the class for being able to carry out current business is shooting Head calls class.
Then, module 20 is chosen according to the class for being able to carry out current business, and matching is searched in local class library information table Class name.
If successful search is to the class name matched with being able to carry out the class of current business, by sheet corresponding to the class name found Ground class libraries component, as local class libraries component corresponding to present type of service.
As another embodiment, the service class that each local class libraries component is correspondingly able to carry out can also be pre-configured with Type, directly it can be arrived so as to after the type of service of current business is obtained, choose module 20 according to local class library information table search Corresponding local class libraries component.
Thus, choose module 20 and obtain local class libraries component corresponding to present type of service.
Sending module 30, for the interface of the local class libraries component based on the selection, the service parameter is sent to The local class libraries component.
After selection obtains local class libraries component, sending module 30 is joined business by the interface of this local class libraries component Number is sent to local class libraries component.
Execution module 40, for controlling the local class libraries component to perform the control instruction according to the service parameter.
For local class libraries component after service parameter is received, execution module 40 controls local class libraries component to be held according to service parameter Control instruction corresponding to row.For example, video download link address of the local video class libraries in service parameter, under server Video corresponding to load, and display interface is loaded into, watched for user, solving current React Native does not have video component, The problem of causing the application software of exploitation can not watch video.
In the present embodiment, business module, for obtaining type of service and service parameter according to the control instruction of input;So Afterwards, module 20 is chosen according to the local class library information table being pre-configured with, local class libraries component corresponding to selection present type of service, To call this local class libraries component to perform current control instruction;Then, local set of class libraries of the sending module 30 based on selection The interface of part, service parameter is sent to local class libraries component, execution module 40 controls local class libraries component according to service parameter Control instruction is performed, hereby it is achieved that performing control instruction by local class libraries.The present embodiment is by making full use of existing Ground class base resource, local class libraries component substitution React Native primary component is called, user is performed and application software is inputted Control instruction, solve React Native component imperfection, cause application software can not perform corresponding to missing component The technical problem of function, the function of React Native application software is greatly enriched, improves Consumer's Experience.
Further, reference picture 6, the local class libraries calling device second embodiment of the present invention provide a kind of local class libraries and called Device, based on the embodiment shown in above-mentioned Fig. 5, the local class libraries calling device also includes:
Package module 50, for being packaged each local class libraries being pre-configured with to obtain corresponding each local set of class libraries Part, and according to each local class libraries component Configuration local class library information table.
In the present embodiment, each local class libraries is packaged by package module 50 in advance, obtains corresponding each local set of class libraries Part, each local class libraries component for encapsulating to obtain provide its interface for calling respectively.Also, obtained local class libraries component is The component of React Native layers, it can coordinate with other React Native components, nested use.
It should be noted that local class libraries is the class libraries for the mobile terminal local system being pre-configured with, such as video class libraries, File uploads class libraries, camera function class libraries, local album function class libraries etc..Local class libraries includes one or more same fingers Class corresponding to type or method, such as camera function class libraries is made to include taken pictures corresponding to camera call instruction class, shooting Class etc..
Package module 50, which encapsulates obtained local class libraries component, can will be available for the class or method of calling in each local class libraries Interface be exposed, for call.
For ease of searching, the local class libraries component life that its entitled encapsulation of the class of local class libraries obtains can be used in package module 50 Name, thus, obtains the class name of each local class libraries component.
Then, package module 50 configures local class library information table, obtained local according to the class name of each local class libraries component Each local class libraries component for being currently available for calling has been recorded in class library information table, also has been understood as being currently available for the local class called Storehouse.Subsequently, can according to corresponding to the local class library information table search to each type of service of configuration local class libraries component.
Further, for the ease of searching, each local class libraries component can also be configured in local class libraries component information table The corresponding instruction type that can be performed.
Thus, package module 50 realizes the configuration of local class libraries component and local class library information table.
In the present embodiment, each local class libraries being pre-configured with is packaged to obtain corresponding each local by package module 50 Class libraries component, and according to each local class libraries component Configuration local class library information table.In the present embodiment, each local class libraries component is base Encapsulate what is obtained in the local class libraries being pre-configured with, take full advantage of existing resource and provide business support for application software.This reality Applying example can be according to the component lacked in React Native, and choosing can realize that the local class libraries of equal function encapsulates to obtain this Ground class libraries component, inconvenience caused by so as to compensate for React Native components missing, has expanded the function of application software.
Further, reference picture 7, the local class libraries calling device 3rd embodiment of the present invention provide a kind of local class libraries and called Device, based on the embodiment (the present embodiment is by taking Fig. 5 as an example) shown in above-mentioned Fig. 5 or Fig. 6, the local class libraries calling device also wraps Include:
Customized module 60, for for the type of service configuration corresponding to business customizing parameter;
The sending module 30, is additionally operable to,
The interface of local class libraries component based on the selection, the service parameter and the business customizing parameter are sent To the local class libraries component;
The execution module 40, is additionally operable to,
Control the local class libraries component to perform the control according to the service parameter and the business customizing parameter to refer to Order.
In the present embodiment, by configuration service customized parameter, it can also be matched somebody with somebody according to business demand for different types of business Put the local irrealizable expanding function of class libraries component.
Specifically, as a kind of embodiment, customized module 60 can be in advance business corresponding to the configuration of each type of service Customized parameter, to optimize each business.The business customizing parameter of different type of service configurations is different;It is complete that can be needed according to business Corresponding business customizing parameter is respectively configured in the type of service in portion, can also only choose industry corresponding to the type of service configuration of needs Business customized parameter, can flexibly be set as needed.
For example, video loads business, local video class libraries is only capable of realizing the loading of video, then customized module 60 can pass through Configuration service customized parameter, such as video preview figure download address, the color of video playback progress bar and width, realize video preprocessor Look at the loading of figure, the functions such as the display of video playback progress bar, the pause of video play.
The control instruction of user's input is being received, after obtaining type of service and service parameter, according to local class library information table The local class libraries component for performing current type business is chosen, meanwhile, sending module 30 searches whether to match somebody with somebody in advance according to type of service Business customizing parameter corresponding to being equipped with.
If business customizing parameter corresponding to successful search to present type of service, sending module 30 is by service parameter and looks into Local class libraries component interface of the business customizing parameter found based on selection, it is sent to the local class libraries component of selection.
Then, execution module 40 controls local class libraries component to be performed according to the service parameter and business customizing parameter received and worked as Preceding control instruction.
For example, during the loading instruction of user's input video, it is that video loads business that business module 10, which obtains present type of service, The video download address that obtaining need to currently load is service parameter.
Because the class that can perform video loading business is video class, therefore chooses module 20 and selected from local class library information table Obtain matched with video class, class name identical local video class libraries component.Sending module 30 finds video loading business Corresponding business customizing parameter.
Then, the business customizing parameter that service parameter and lookup obtain is sent to local video set of class libraries by sending module 30 Part.
For local video class libraries component after service parameter and business customizing parameter is received, execution module 40 controls local video Class libraries component video according to corresponding to download address from server download, is loaded;Meanwhile according to the video preview figure of customization Download address foradownloaded video preview graph, video is shown in when not playing video, pause video playback or video playback and completing Broadcast interface;In video playback, video playback bar can be shown according to the color of the video playback bar of customization, width.
Hereby it is achieved that carrying out business customizing on the basis of local class libraries, business function is enriched.
In the present embodiment, customized module 60 is business customizing parameter corresponding to the configuration of each type of service, to expand each industry Function and effect achieved by service type;Then after local class libraries component is chosen, sending module 30 is by service parameter and currently Business customizing parameter corresponding to type of service is sent to the local class libraries component of selection;Execution module 40 controls local class libraries component Control instruction is performed according to service parameter and business customizing parameter, so as on the basis of the business that local class libraries can perform in itself The expansion of carry out business, and can configuration service customized parameter as needed, realize the customization to expanding function, improve Application software function it is rich and personalized.
Further, reference picture 5, the local class libraries calling device fourth embodiment of the present invention provide a kind of local class libraries and called Device, based on above-mentioned Fig. 5, Fig. 6 or embodiment illustrated in fig. 7, (the present embodiment is with the local class libraries calling device of the invention shown in Fig. 5 Exemplified by first embodiment), the execution module 40 is additionally operable to,
Class or method are chosen from the local class libraries component according to the type of service, control class or the side of the selection Method performs the control instruction according to the service parameter.
In the present embodiment, due to that may include multiple classes or method in local class libraries, execution module 40 can be according to current Type of service, which is chosen, performs class or method corresponding to current business.
Specifically, can configure a total business type as a kind of embodiment, in the present embodiment includes more height Type of service.Total business type is classified for the summary of current business, and different total business type differences is larger, such as file uploads Business and camera call business;Subservice type is more similar subservice, such as camera in same total business type Take pictures business and video record business in calling business.
Then after local class libraries component receives service parameter, execution module 40 can be according to type of service in local set of class libraries In part, class or method corresponding to subservice type are chosen, then, the class or method for controlling selection perform control according to service parameter Instruction.
For example, current control instruction instructs for video capture, then type of service is the video in camera call instruction Shooting instruction, the local class libraries component of selection is camera function class libraries component;Shot further according to subservice type selecting video Class, perform current control instruction.
If local class libraries component receives service parameter and business customizing parameter, the class that the control of execution module 40 is chosen simultaneously Or method performs this control instruction according to service parameter and business customizing parameter.
Hereby it is achieved that the execution of control instruction.
In the present embodiment, execution module 40 is correspondingly able to carry out this secondary control according to type of service from local class libraries component The class or method of instruction are made, the class or method for controlling selection perform this control instruction according to service parameter, realized to each industry Class corresponding to service type or method directly invoke.
Further, reference picture 6, the local embodiment of class libraries calling device the 5th of the present invention provide a kind of local class libraries and called Device, based on the local class libraries calling device second embodiment of the invention shown in above-mentioned Fig. 6, each local class libraries includes video Class libraries, file upload one or more of class libraries, camera function class libraries and local album function class libraries.
In the present embodiment, the local class libraries for being available for calling includes video class libraries, file upload class libraries, camera function class libraries One or more of with local album function class libraries.
Video class libraries can be used for carrying out the loading of video, play;File uploads class libraries and is used to call local file to be uploaded to Server, such as user upload the files such as self-defined head portrait, mobile phone photo album photo;Camera function class libraries is used to call local take the photograph As head taken pictures, video record etc.;Local album function class libraries is used to access local photograph album, check local photo etc..
In the present embodiment, after encapsulating each local class libraries and obtaining corresponding local class libraries component, each local class can be based on Library component realizes the calling of local class libraries, so as to solve React Native application software can not currently carry out video loading broadcast Put, file uploads, takes pictures, records a video, accesses the problems such as local photograph album.
The alternative embodiment of the present invention is these are only, is not intended to limit the scope of the invention, it is every to utilize this hair The equivalent structure or equivalent flow conversion that bright specification and accompanying drawing content are made, or directly or indirectly it is used in other related skills Art field, is included within the scope of the present invention.

Claims (10)

1. a kind of local class libraries call method, it is characterised in that the local class libraries call method comprises the following steps:
Type of service and service parameter are obtained according to the control instruction of input;
According to the local class library information table being pre-configured with, local class libraries component corresponding to the type of service is chosen;
The interface of local class libraries component based on the selection, the service parameter is sent to the local class libraries component;
The local class libraries component is controlled to perform the control instruction according to the service parameter.
2. local class libraries call method as claimed in claim 1, it is characterised in that described to be obtained according to the control instruction of input Before the step of type of service and service parameter, in addition to:
Each local class libraries being pre-configured with is packaged to obtain corresponding each local class libraries component, and according to each local class Library component configures local class library information table.
3. local class libraries call method as claimed in claim 1 or 2, it is characterised in that the control instruction according to input Before the step of obtaining type of service and service parameter, in addition to:
For business customizing parameter corresponding to type of service configuration;
The interface of the local class libraries component based on the selection, the service parameter is sent to the local class libraries component The step of include:
The interface of local class libraries component based on the selection, the service parameter and the business customizing parameter are sent to institute State local class libraries component;
The step of control local class libraries component performs the control instruction according to the service parameter includes:
The local class libraries component is controlled to perform the control instruction according to the service parameter and the business customizing parameter.
4. local class libraries call method as claimed in claim 1 or 2, it is characterised in that the control local set of class libraries The step of part performs the control instruction according to the service parameter includes:
Class or method are chosen from the local class libraries component according to the type of service, control the class or method root of the selection The control instruction is performed according to the service parameter.
5. local class libraries call method as claimed in claim 2, it is characterised in that each local class libraries includes video class Storehouse, file upload one or more of class libraries, camera function class libraries and local album function class libraries.
6. a kind of local class libraries calling device, it is characterised in that the local class libraries calling device includes:
Business module, for obtaining type of service and service parameter according to the control instruction of input;
Module is chosen, for according to the local class library information table being pre-configured with, choosing local class libraries corresponding to the type of service Component;
Sending module, for the interface of the local class libraries component based on the selection, the service parameter is sent to described Ground class libraries component;
Execution module, for controlling the local class libraries component to perform the control instruction according to the service parameter.
7. local class libraries calling device as claimed in claim 6, it is characterised in that the local class libraries calling device also wraps Include:
Package module, for being packaged each local class libraries being pre-configured with to obtain corresponding each local class libraries component, and root According to each local class libraries component Configuration local class library information table.
8. local class libraries calling device as claimed in claims 6 or 7, it is characterised in that the local class libraries calling device is also Including:
Customized module, for for the type of service configuration corresponding to business customizing parameter;
The sending module, is additionally operable to,
The interface of local class libraries component based on the selection, the service parameter and the business customizing parameter are sent to institute State local class libraries component;
The execution module, is additionally operable to,
The local class libraries component is controlled to perform the control instruction according to the service parameter and the business customizing parameter.
9. local class libraries calling device as claimed in claims 6 or 7, it is characterised in that the execution module is additionally operable to,
Class or method are chosen from the local class libraries component according to the type of service, control the class or method root of the selection The control instruction is performed according to the service parameter.
10. local class libraries calling device as claimed in claim 7, it is characterised in that each local class libraries includes video class Storehouse, file upload one or more of class libraries, camera function class libraries and local album function class libraries.
CN201610575879.1A 2016-07-20 2016-07-20 Local class library calling method and device Active CN107643952B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610575879.1A CN107643952B (en) 2016-07-20 2016-07-20 Local class library calling method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610575879.1A CN107643952B (en) 2016-07-20 2016-07-20 Local class library calling method and device

Publications (2)

Publication Number Publication Date
CN107643952A true CN107643952A (en) 2018-01-30
CN107643952B CN107643952B (en) 2020-03-17

Family

ID=61109664

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610575879.1A Active CN107643952B (en) 2016-07-20 2016-07-20 Local class library calling method and device

Country Status (1)

Country Link
CN (1) CN107643952B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109582303A (en) * 2018-10-31 2019-04-05 平安科技(深圳)有限公司 General purpose module call method, device, computer equipment and storage medium
CN110475141A (en) * 2019-08-29 2019-11-19 深圳市网心科技有限公司 Video broadcasting method, system and electronic equipment and storage medium based on RN

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101599983A (en) * 2008-06-06 2009-12-09 深圳市同洲电子股份有限公司 A kind of receiving terminal operation method, device and receiving terminal
CN103488508A (en) * 2013-09-18 2014-01-01 贝壳网际(北京)安全技术有限公司 Browser working method, browser and terminal equipment
CN104049986A (en) * 2013-03-14 2014-09-17 腾讯科技(深圳)有限公司 Plugin loading method and device
CN104102537A (en) * 2013-04-07 2014-10-15 华为技术有限公司 Application calling method and user terminal
CN105373396A (en) * 2015-08-14 2016-03-02 腾讯科技(深圳)有限公司 Method and device for updating plug-in in plug-in platform

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101599983A (en) * 2008-06-06 2009-12-09 深圳市同洲电子股份有限公司 A kind of receiving terminal operation method, device and receiving terminal
CN104049986A (en) * 2013-03-14 2014-09-17 腾讯科技(深圳)有限公司 Plugin loading method and device
CN104102537A (en) * 2013-04-07 2014-10-15 华为技术有限公司 Application calling method and user terminal
CN103488508A (en) * 2013-09-18 2014-01-01 贝壳网际(北京)安全技术有限公司 Browser working method, browser and terminal equipment
CN105373396A (en) * 2015-08-14 2016-03-02 腾讯科技(深圳)有限公司 Method and device for updating plug-in in plug-in platform

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109582303A (en) * 2018-10-31 2019-04-05 平安科技(深圳)有限公司 General purpose module call method, device, computer equipment and storage medium
CN109582303B (en) * 2018-10-31 2024-05-03 平安科技(深圳)有限公司 General component calling method, device, computer equipment and storage medium
CN110475141A (en) * 2019-08-29 2019-11-19 深圳市网心科技有限公司 Video broadcasting method, system and electronic equipment and storage medium based on RN
CN110475141B (en) * 2019-08-29 2021-12-03 深圳市网心科技有限公司 Video playing method and system based on RN, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN107643952B (en) 2020-03-17

Similar Documents

Publication Publication Date Title
KR101382501B1 (en) Apparatus for photographing moving image and method thereof
US7584225B2 (en) Backup and restore mirror database memory items in the historical record backup associated with the client application in a mobile device connected to a communion network
US7343568B2 (en) Navigation pattern on a directory tree
US20050197141A1 (en) 'Back' button schema in mobile applications
US20070150816A1 (en) User interface authoring utility for changing user interface elements on wireless devices
CN104794008B (en) Application program synchronization method, device and system
US20070150617A1 (en) Resource application program interface utility for changing user interface elements on wireless devices
US20110061099A1 (en) Upload security scheme
EP1834234A1 (en) A method of automatically building a customised software application for a specific type of wireless computing device
US20050102638A1 (en) Navigate, click and drag images in mobile applications
US20090138542A1 (en) Information processing apparatus and information processing method
CN108111555A (en) For controlling the method and system of installation kit downloading process
CN106445951A (en) File transmission method and apparatus
JP2006109437A (en) Method and apparatus for storing image files of mobile communication terminal
CN105045602A (en) Method and device for constructing Hadoop application development framework and electronic device
CN107643952A (en) Local class libraries call method and device
CN109525884A (en) Video paster adding method, device, equipment and storage medium based on split screen
CN111246301A (en) Video playing method and device, electronic equipment and computer readable storage medium
CN106161531A (en) A kind of method that data are uploaded and device thereof
CN106445298A (en) Visual operation method and device for internet-of-things device
CN109886861A (en) A kind of high efficiency map file format HEIF image loading method and device
RU2316907C2 (en) System for reproduction of multimedia in portable device
CN109151495B (en) A kind of vod server and vod server multimedia file update method, storage medium
CN108196912A (en) One kind is based on hot-plug component formula data integrating method
CN107643954B (en) SDK access system and method

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
GR01 Patent grant
GR01 Patent grant