CN103914284B - Browsing device net page implementation method and device are embedded in mobile embedded platform - Google Patents

Browsing device net page implementation method and device are embedded in mobile embedded platform Download PDF

Info

Publication number
CN103914284B
CN103914284B CN201210592745.2A CN201210592745A CN103914284B CN 103914284 B CN103914284 B CN 103914284B CN 201210592745 A CN201210592745 A CN 201210592745A CN 103914284 B CN103914284 B CN 103914284B
Authority
CN
China
Prior art keywords
embedded
class object
title
method body
class
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.)
Active
Application number
CN201210592745.2A
Other languages
Chinese (zh)
Other versions
CN103914284A (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.)
Beijing Shenzhou Taiyue Software Co Ltd
Original Assignee
Beijing Shenzhou Taiyue Software 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 Beijing Shenzhou Taiyue Software Co Ltd filed Critical Beijing Shenzhou Taiyue Software Co Ltd
Priority to CN201210592745.2A priority Critical patent/CN103914284B/en
Publication of CN103914284A publication Critical patent/CN103914284A/en
Application granted granted Critical
Publication of CN103914284B publication Critical patent/CN103914284B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Information Transfer Between Computers (AREA)
  • Stored Programmes (AREA)

Abstract

The invention discloses browsing device net page implementation method and device are embedded in a kind of mobile embedded platform.Browsing device net page implementation method is embedded in a kind of mobile embedded platform provided in an embodiment of the present invention to be included:The Java interface classes of mobile embedded platform side are created, and at least one method body is set in the Java interfaces class;Realize the class object of Java interface classes and embed the operation that browsing device net page performs as needed and realize method body in the class object;Class object is arranged in embedded browser;When webpage is loaded into the embedded browser of mobile embedded platform, the method body in the class object is called using the Javascript script files being introduced into embedded browsing device net page, so that embedded browsing device net page performs corresponding operation using party's body of laws.

Description

Browsing device net page implementation method and device are embedded in mobile embedded platform
Technical field
The present invention relates to embedded platform technical field, browser net is embedded in more particularly to a kind of mobile embedded platform Page implementation method and device.
Background technology
With the continuous development of mobile embedded platform, mobile embedded platform(Such as Android Android, Iphone, blackberry, blueberry Blackberry, Saipan Symbian)Local application it is more and more, and in order to more efficiently locally applied in client In show data content, embedded browser show server end webpage mode also used it is more and more.
However, displaying and user data that browsing device net page is only limitted to web data are embedded in mobile embedded platform at present Reception etc., cause that the implementation of embedded browsing device net page is excessively single, and function is very weak, limits embedded browser net The development and application of page.
The content of the invention
The invention provides browsing device net page implementation method and device is embedded in a kind of mobile embedded platform, to solve now Have the problem of excessively single embedded browsing device net page implementation, hypofunction etc., reach make embedded browsing device net page have with Locally applied equal System Privileges ability.
To reach above-mentioned purpose, the embodiment of the present invention employs following technical scheme:
The embodiments of the invention provide embedded browsing device net page implementation method in a kind of mobile embedded platform, including:
The Java interface classes of mobile embedded platform side are created, and at least one method is set in the Java interfaces class Body;
Realize the class object of the Java interfaces class and embed as needed described in the operation realization that browsing device net page performs Method body in class object;
The class object is arranged in embedded browser;
When webpage is loaded into the embedded browser of mobile embedded platform, using being introduced in embedded browsing device net page Javascript script files call method body in the class object so that embedded browsing device net page is held using party's body of laws The corresponding operation of row;
Wherein, the quantity for the method body that the Javascript script files include and title and the Java interfaces class The quantity of the method body included is identical with title.
The embodiment of the present invention additionally provides and browsing device net page realization device is embedded in a kind of mobile embedded platform, including:
Class object realizes unit, for creating the Java interface classes of mobile embedded platform side, and in the Java interfaces At least one method body is set in class;Realize the class object of the Java interfaces class and embed browsing device net page as needed and perform Operation realize method body in the class object;
Class object setting unit, for the class object to be arranged in embedded browser;
Method body call unit, for when webpage is loaded into the embedded browser of mobile embedded platform, utilizing The Javascript script files being introduced into embedded browsing device net page call the method body in the class object, so that embedded browse Device webpage performs corresponding operation using party's body of laws;
Wherein, the quantity for the method body that the Javascript script files include and title and the Java interfaces class The quantity of the method body included is identical with title.
From the above mentioned, the embodiment of the present invention is able to carry out the class object of corresponding operating by being set in embedded browser, And the technological means etc. of the class object is called by embedding browsing device net page, it is able to carry out embedded browsing device net page set Operation, embedded browsing device net page is performed the operation with System Privileges, then reach make embedded browsing device net page have with Locally applied equal System Privileges ability.
So as to improve the flexibility of embedded browsing device net page implementation, the function of embedded browsing device net page is enhanced, Contribute to the development and application of embedded browsing device net page.
Brief description of the drawings
Fig. 1 is that browsing device net page implementation method is embedded in a kind of mobile embedded platform that one embodiment of the invention provides Flow chart;
Fig. 2 is to embed browsing device net page in a kind of mobile embedded platform that another embodiment of the invention provides to realize dress Put structural representation.
Embodiment
To make the object, technical solutions and advantages of the present invention clearer, below in conjunction with accompanying drawing to embodiment party of the present invention Formula is described in further detail.
One embodiment of the invention, which provides, embeds browsing device net page implementation method in a kind of mobile embedded platform, referring to Fig. 1, methods described comprise the following steps:
S100:Create the Java interface classes of mobile embedded platform side, and set as needed in Java interface classes to A few method body.The method body set in java class is empty, without the specific content of filling in method body.
S101:Realize the class object of Java interface classes and embed the corresponding operating that browsing device net page performs as needed and realize Method body in the class object.
Java interface classes are instantiated to obtain class object, and it is interior in the operating setting method body that webpage performs as needed Hold.The application interface that this step can be provided by mobile embedded platform(API)The application program developed performs.
The above-mentioned corresponding operating for needing embedded browsing device net page to perform can be the system power with mobile embedded platform The operation of limit, traditional embedded browsing device net page do not have the authority of mobile embedded Platform native operating system, can not performed Such as inquire about some application programs and whether operation in systems etc be installed, and the present embodiment by by webpage to class object Calling make the ability that embedded browser is provided with System Privileges.The operation being able to carry out using System Privileges is included but not limited to In:Inquiring about some applications, in systems whether local application mounted, in activation system, acquisition system are current Network connection state etc..
The method body then realized in java class object includes but is not limited to:It is for inquiring about in mobile embedded platform The no method body for being provided with predetermined application, and/or, the method for starting predetermined application in mobile embedded platform Body, and/or, for obtaining the method body of the current network connection state of mobile embedded platform.
S102:Class object is arranged in embedded browser.
The mark title of instruction class object position in platform is set for class object, and the mark title and class object have pair Should be related to, can in platform unique identification's class object.By the view object that mark title is arranged on to embedded browser In, the class object is arranged in embedded browser.The class object constructed can be with embedded browser view Initialization, it is directly solderable in embedded browser, a window subobject as Javascript script files in webpage And it is called.
For example, when mobile embedded platform is Android(Android)During platform, by by webpage view(webview)Control The parameter of the correlation method of part is arranged to the mark title of class object, and class object is arranged in embedded browser.
WebVIew controls provide method:webView.addJavascriptInterface (javascriptInterface, INTERFACE_NAME),
Then by by the interface name of the above method(INTERFACE_NAME)Parameter is arranged to the mark title of class object, Class object can be arranged in embedded browser.
Javascript script files in webpage by the window subobjects of solidification can calling system authority energy Power, it is desirable to which which type of authority ability embedded browsing device net page has, as long as in the class object of locally applied offer(Solidification Window subobjects)Middle addition respective party body of laws, such as:The current network state of acquisition system, obtain the current network class of system Type is wifi or 3G states etc., and these operations can be realized by the locally applied API by mobile embedded platform, realization side Formula is simple, convenient.
S103:When webpage is loaded into the embedded browser of mobile embedded platform, embedded browsing device net page is utilized The middle Javascript script files being introduced into call the method body in the class object, so that embedded browsing device net page utilizes the party Body of laws performs corresponding operation.
It can be performed in server side by the operation of above-mentioned Javascript script files introducing webpage, server storage bag Web data containing the Javascript script files, then it is embedded to browse after web data is loaded onto in embedded browser The Javascript script files are provided with device webpage.
Method body in Javascript script files has respective party body of laws in the class object for calling Java interface classes Ability.The method body that the quantity and title for the method body that Javascript script files include include with Java interface classes Quantity is identical with title, to realize the calling to method body in class object using Javascript script files.
When performing specific call, using the method body of predetermined title in Javascript script files, the class is called Title and the predetermined title identical method body in the method body of object.
Such as the method body of predetermined title in Javascript script files, according to the predetermined title and the identification name of class object Claim, find the method body in class object using the mode of the window. mark predetermined titles of name and call party's body of laws.
Further embodiment of this invention additionally provides and browsing device net page realization device is embedded in a kind of mobile embedded platform, ginseng See Fig. 2, the device 200 is arranged in mobile embedded platform, and the device 200 includes:
Class object realizes unit 211, for creating the Java interface classes of mobile embedded platform side, and exists as needed At least one method body is set in Java interface classes;Realize the class object of the Java interfaces class and embed browser as needed The method body in the class object is realized in the operation that webpage performs;
Class object setting unit 212, for the class object to be arranged in embedded browser;
Method body call unit 213, for when webpage is loaded into the embedded browser of mobile embedded platform, profit The method body in the class object is called with the Javascript script files being introduced into embedded browsing device net page, so that embedded clear Device webpage of looking at performs corresponding operation using party's body of laws.Scene as illustrated in the drawing, by HTML(Hypertext Markup Language, HTML)After page download is into mobile embedded platform, the embedded of mobile embedded platform browses Device shows that method body call unit 213 controls the Javascript script files in html web page to call to html web page Class object realizes the method body that corresponding authority ability is realized in unit 211.
Party's body of laws includes but is not limited to:For inquiring about in mobile embedded platform whether be provided with predetermined application Method body, and/or, for starting the method body of predetermined application in mobile embedded platform, and/or, for obtain move The method body of the current network connection state of dynamic embedded platform.
Further, class object setting unit 212, indicate the class object in platform for being set for the class object The mark title of position;By the way that the mark title is arranged in the view object of embedded browser, by the class object It is arranged in embedded browser.
What the quantity and title for the method body that Javascript script files include included with the Java interfaces class The quantity of method body is identical with title.Method body call unit 213, for utilizing predetermined title in Javascript script files Method body, call title and the predetermined title identical method body in the method body of the class object.For example, method body calls Unit 213, specifically for the method body using predetermined title in Javascript script files, according to the predetermined title and class pair The mark title of elephant, find the method body in class object using the mode of the window. mark predetermined titles of name and call and be somebody's turn to do Method body.
From the above mentioned, the embodiment of the present invention is able to carry out the class object of corresponding operating by being set in embedded browser, And the technological means etc. of the class object is called by embedding browsing device net page, it is able to carry out embedded browsing device net page set Operation, embedded browsing device net page is such as set to perform the operation with System Privileges, reaching makes embedded browsing device net page have and local Using equal System Privileges ability, so as to improve the flexibility of embedded browsing device net page implementation, enhance embedded clear Look at the function of device webpage, contribute to the development and application of embedded browsing device net page.
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the scope of the present invention.It is all Any modification, equivalent substitution and improvements made within the spirit and principles in the present invention etc., are all contained in protection scope of the present invention It is interior.

Claims (8)

1. browsing device net page implementation method is embedded in a kind of mobile embedded platform, it is characterised in that methods described includes:
The Java interface classes of mobile embedded platform side are created, and at least one method body is set in the Java interfaces class, Methods described body is empty, does not fill specific content;
Realize the class object of the Java interfaces class and embed as needed described in the corresponding operating realization that browsing device net page performs Method body in class object;
The class object is arranged in embedded browser;
When webpage is loaded into the embedded browser of mobile embedded platform, utilize what is introduced in embedded browsing device net page Javascript script files call the method body in the class object, so that embedded browsing device net page is performed using party's body of laws Corresponding operation;
Wherein, the quantity for the method body that the Javascript script files include and title in the Java interfaces class with wrapping The quantity of the method body included is identical with title;
It is described the class object is arranged on embedded browser to include:
The mark title for indicating class object position in platform is set for the class object;
By the way that the mark title is arranged in the view object of embedded browser, the class object is arranged on embedded clear Look in device.
2. according to the method for claim 1, it is characterised in that when the mobile embedded platform is Android platform, pass through The parameter of the correlation method of webpage view webview controls is arranged to the mark title of the class object, by the class pair As being arranged in embedded browser.
3. according to the method for claim 1, it is characterised in that described to utilize what is introduced in embedded browsing device net page Javascript script files call the method body in the class object to include:
Using the method body of predetermined title in Javascript script files, call title in the method body of the class object and be somebody's turn to do Predetermined title identical method body.
4. according to the method for claim 3, it is characterised in that described to utilize predetermined title in Javascript script files Method body, call title in the method body of the class object to include with the predetermined title identical method body:
The method body of predetermined title in Javascript script files, according to the predetermined title and the mark title of class object, profit The method body in class object is found with the mode of the window. mark predetermined titles of name and calls party's body of laws.
5. according to the method for claim 1, it is characterised in that the corresponding operating for needing embedded browsing device net page to perform For the operation of the System Privileges with mobile embedded platform, the operation that the browsing device net page embedded as needed performs is realized Class object in method body include following method body:
Whether the method body of predetermined application is installed for inquiring about in mobile embedded platform, and/or,
For starting the method body of predetermined application in mobile embedded platform, and/or,
For obtaining the method body of the current network connection state of mobile embedded platform.
6. browsing device net page realization device is embedded in a kind of mobile embedded platform, it is characterised in that described device includes:
Class object realizes unit, for creating the Java interface classes of mobile embedded platform side, and in the Java interfaces class At least one method body is set, and methods described body is empty, does not fill specific content;Realize the class of the Java interfaces class The method body in the class object is realized in object and the operation that embedded browsing device net page performs as needed;
Class object setting unit, for the class object to be arranged in embedded browser;
Method body call unit, for when webpage is loaded into the embedded browser of mobile embedded platform, using embedded The Javascript script files being introduced into browsing device net page call the method body in the class object, so that embedded browser net Page performs corresponding operation using party's body of laws;
Wherein, the quantity for the method body that the Javascript script files include and title in the Java interfaces class with wrapping The quantity of the method body included is identical with title;
The class object setting unit, the identification name of class object position in platform is indicated for being set for the class object Claim;By the way that the mark title is arranged in the view object of embedded browser, the class object is arranged on embedded clear Look in device.
7. device according to claim 6, it is characterised in that methods described body call unit, for utilizing The method body of predetermined title in Javascript script files, call title and the predetermined title in the method body of the class object Identical method body.
8. device according to claim 6, it is characterised in that methods described body call unit, specifically for utilizing The method body of predetermined title in Javascript script files, according to the predetermined title and the mark title of class object, utilize Window. the mode for identifying the predetermined title of name finds the method body in class object and calls party's body of laws.
CN201210592745.2A 2012-12-31 2012-12-31 Browsing device net page implementation method and device are embedded in mobile embedded platform Active CN103914284B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210592745.2A CN103914284B (en) 2012-12-31 2012-12-31 Browsing device net page implementation method and device are embedded in mobile embedded platform

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210592745.2A CN103914284B (en) 2012-12-31 2012-12-31 Browsing device net page implementation method and device are embedded in mobile embedded platform

Publications (2)

Publication Number Publication Date
CN103914284A CN103914284A (en) 2014-07-09
CN103914284B true CN103914284B (en) 2017-12-12

Family

ID=51039991

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210592745.2A Active CN103914284B (en) 2012-12-31 2012-12-31 Browsing device net page implementation method and device are embedded in mobile embedded platform

Country Status (1)

Country Link
CN (1) CN103914284B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107329997A (en) * 2017-06-08 2017-11-07 腾讯科技(深圳)有限公司 Page display method and device, client, storage medium
CN108897605B (en) * 2018-07-24 2022-03-08 北京万相融通科技股份有限公司 Method and device for embedding desktop application program into webpage

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102819532A (en) * 2011-06-07 2012-12-12 解玉麟 Obtaining and transferring method of web form data
CN102819451A (en) * 2011-06-09 2012-12-12 深圳市财付通科技有限公司 Method and system for calling browser plug-in
CN102843393A (en) * 2011-06-22 2012-12-26 腾讯科技(深圳)有限公司 Running device and method of network application

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8606766B2 (en) * 2009-10-06 2013-12-10 International Business Machines Corporation Method and system to handle java class versioning

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102819532A (en) * 2011-06-07 2012-12-12 解玉麟 Obtaining and transferring method of web form data
CN102819451A (en) * 2011-06-09 2012-12-12 深圳市财付通科技有限公司 Method and system for calling browser plug-in
CN102843393A (en) * 2011-06-22 2012-12-26 腾讯科技(深圳)有限公司 Running device and method of network application

Also Published As

Publication number Publication date
CN103914284A (en) 2014-07-09

Similar Documents

Publication Publication Date Title
CN104239063B (en) A kind of web browser and the method by web browser calling local application
CN105389222B (en) A kind of methods, devices and systems of dynamic call native interface
CN107870821B (en) Cross-platform calling method and system for application program
CN106250434B (en) Load the method and device of webpage
EP2806357A1 (en) Method and communication device for updating a web application
CN105354488B (en) It is a kind of to apply installation method, relevant apparatus and using installation system
CN102118504B (en) Methods and devices for calling local applications by means of mobile terminal browser
CN105094786B (en) Method and system based on JavaScript customized web page
CN107562425A (en) Single-page application creation method and device based on Hybrid applications
CN108132814A (en) Page loading method, device, computer equipment and the storage medium of application program
CN103942225A (en) Method and system for invoking resources of Hybrid App client and client
WO2012163123A1 (en) Application management method and application platform
CN105512190A (en) Interface jumping method and device
CN102893271B (en) Use the data uploading method of shortcut
CN103902534B (en) A kind of method and apparatus of web page program triggering local operation
CN104636122B (en) The sharing method and equipment of a kind of capability component
CN103914284B (en) Browsing device net page implementation method and device are embedded in mobile embedded platform
CN103838851B (en) The rendering intent and device of three-dimensional scene models file
CN102890687B (en) A kind of mthods, systems and devices browsing webpage picture group
CN104378428A (en) Method and device for downloading files
CN105786476B (en) Data processing method and system between mobile client and server
CN108319474B (en) Page information generation method, device and equipment
CN113609417A (en) Method, device, equipment and medium for processing mobile terminal page
CN103294463A (en) Editing system and method
CN106406920A (en) Terminal equipment and execution method of application program of terminal equipment

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP02 Change in the address of a patent holder
CP02 Change in the address of a patent holder

Address after: Room 818, 8 / F, 34 Haidian Street, Haidian District, Beijing 100080

Patentee after: BEIJING ULTRAPOWER SOFTWARE Co.,Ltd.

Address before: 100089 Beijing city Haidian District wanquanzhuang Road No. 28 Wanliu new building 6 storey block A Room 601

Patentee before: BEIJING ULTRAPOWER SOFTWARE Co.,Ltd.