CN103914284A - Method and device for implementing embedded browser webpage in mobile embedded platform - Google Patents
Method and device for implementing embedded browser webpage in mobile embedded platform Download PDFInfo
- Publication number
- CN103914284A CN103914284A CN201210592745.2A CN201210592745A CN103914284A CN 103914284 A CN103914284 A CN 103914284A CN 201210592745 A CN201210592745 A CN 201210592745A CN 103914284 A CN103914284 A CN 103914284A
- Authority
- CN
- China
- Prior art keywords
- embedded
- class object
- title
- method body
- platform
- 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
Links
Abstract
The invention discloses a method and a device for implementing an embedded browser webpage in a mobile embedded platform. The method for implementing the embedded browser webpage in the mobile embedded platform includes the steps: creating a Java interface class of the mobile embedded platform and setting at least one method body in the Java interface class; implementing a class object of the Java interface class and implementing method bodies in the class object according to operation needing to be executed by the embedded browser webpage; setting the class object in an embedded browser; calling the method bodies in the class object by the aid of a Javascript file introduced in the embedded browser webpage when the webpage is loaded into the embedded browser of the mobile embedded platform, and accordingly, executing corresponding operation through the method bodies by the embedded browser webpage.
Description
Technical field
The present invention relates to embedded platform technical field, particularly embedded browsing device net page implementation method and device in a kind of mobile embedded platform.
Background technology
Along with the development of mobile embedded platform, the local application of mobile embedded platform (as Android Android, Iphone, blackberry, blueberry Blackberry, Saipan Symbian) is more and more, and for demonstrating data content in client terminal local application more efficiently, embedded browser represents more and more that the mode of server end webpage is also used.
But, in current mobile embedded platform, embedded browsing device net page only limits to the displaying of web data and the reception of user data etc., cause the implementation of embedded browsing device net page too single, function is very weak, has limited development and the application of embedded browsing device net page.
Summary of the invention
The invention provides embedded browsing device net page implementation method and device in a kind of mobile embedded platform, to solve, existing embedded browsing device net page implementation is too single, the problem of hypofunction etc., reaches embedded browsing device net page to be had with this locality apply equal System Privileges ability.
For achieving the above object, the embodiment of the present invention has adopted following technical scheme:
The embodiment of the present invention provides embedded browsing device net page implementation method in a kind of mobile embedded platform, comprising:
Create the Java interface class of mobile embedded platform side, and in described Java interface class, at least one method body is set;
The operation that realizes the class object of described Java interface class embedded browsing device net page execution as required realizes the method body in described class object;
Described class object is arranged in embedded browser;
In the time that webpage is loaded in the embedded browser of mobile embedded platform, utilize the Javascript script file of introducing in embedded browsing device net page to call the method body in described class object, so that embedded browsing device net page utilizes the party's body of laws to carry out corresponding operation;
The quantity of the method body that wherein, described Javascript script file comprises is identical with quantity and the title of the method body that title comprises with described Java interface class.
The embodiment of the present invention also provides embedded browsing device net page implement device in a kind of mobile embedded platform, comprising:
Class object is realized unit, for creating the Java interface class of mobile embedded platform side, and at least one method body is set in described Java interface class; The operation that realizes the class object of described Java interface class embedded browsing device net page execution as required realizes the method body in described class object;
Class object setting unit, for being arranged on embedded browser by described class object;
Method body call unit, for in the time that webpage is loaded into the embedded browser of mobile embedded platform, utilize the Javascript script file of introducing in embedded browsing device net page to call the method body in described class object, so that embedded browsing device net page utilizes the party's body of laws to carry out corresponding operation;
The quantity of the method body that wherein, described Javascript script file comprises is identical with quantity and the title of the method body that title comprises with described Java interface class.
From the above mentioned, the embodiment of the present invention by arranging the class object that can carry out corresponding operating in embedded browser, and call technological means of this class object etc. by embedded browsing device net page, make embedded browsing device net page can carry out set operation, as make embedded browsing device net page carry out the operation with System Privileges, then reach and embedded browsing device net page is had with this locality apply equal System Privileges ability.
Thereby improve the dirigibility of embedded browsing device net page implementation, strengthened the function of embedded browsing device net page, contributed to the development and application of embedded browsing device net page.
Accompanying drawing explanation
Embedded browsing device net page implementation method process flow diagram in the mobile embedded platform of one that Fig. 1 provides for one embodiment of the invention;
Embedded browsing device net page implement device structural representation in the mobile embedded platform of one that Fig. 2 provides for another embodiment of the present invention.
Embodiment
For making the object, technical solutions and advantages of the present invention clearer, below in conjunction with accompanying drawing, embodiment of the present invention is described further in detail.
One embodiment of the invention provides embedded browsing device net page implementation method in a kind of mobile embedded platform, and referring to Fig. 1, described method comprises the steps:
S100: create the Java interface class of mobile embedded platform side, and as required at least one method body is set in Java interface class.The method body arranging in java class is empty, does not fill concrete content in method body.
S101: the corresponding operating of realizing the class object of Java interface class embedded browsing device net page execution is as required realized the method body in described class object.
The instantiation of Java interface class is obtained to class object, and as required webpage carry out operating setting method body in content.The application program that the application interface (API) that this step can be provided by mobile embedded platform is developed is carried out.
The corresponding operating that the embedded browsing device net page of above-mentioned needs is carried out can be the operation with the System Privileges of mobile embedded platform, traditional embedded browsing device net page does not have the authority of mobile embedded platform local operation system, cannot carry out the operation such as whether some application program of inquiry has been arranged in system, and the present embodiment is by making embedded browser have the ability of System Privileges by webpage to calling of class object.Utilize operation that System Privileges can carry out including, but not limited to network connection state of inquire about whether some application is mounted in system, local application, the system of obtaining in startup system is current etc.
The method body of realizing in java class object is including, but not limited to method body that whether predetermined application is installed for inquiring about mobile embedded platform, and/or, for starting the method body of mobile embedded platform predetermined application, 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.
For class object arranges the mark title of indicating class object position in platform, this mark title and class object have corresponding relation, can in platform, uniqueness identify class object.By mark title is arranged in the view object of embedded browser, so that described class object is arranged in embedded browser.The class object constructed can be along with the initialization of embedded browser view, is directly cured in embedded browser, as a window subobject of Javascript script file in webpage and be called.
For example, in the time that mobile embedded platform is Android (Android) platform, the parameter of the correlation method by webpage view (webview) control is set to the mark title of class object, so that class object is arranged in embedded browser.
WebVIew control supplying method: webView.addJavascriptInterface (javascriptInterface, INTERFACE_NAME),
The mark title that is set to class object by interface name (INTERFACE_NAME) parameter of said method, can be arranged on class object in embedded browser.
Javascript script file in webpage gets final product the authority ability of calling system by curing window subobject, require embedded browsing device net page to there is which type of authority ability, as long as interpolation respective party body of laws in the class object (curing window subobject) providing is provided in this locality, as: current network state, the current network type of the system of obtaining of the system of obtaining is wifi or 3G state etc., these operations can be realized by the API of mobile embedded platform by this locality application, and implementation is simple, convenient.
S103: in the time that webpage is loaded in the embedded browser of mobile embedded platform, utilize the Javascript script file of introducing in embedded browsing device net page to call the method body in described class object, so that embedded browsing device net page utilizes the party's body of laws to carry out corresponding operation.
Can carry out the operation of above-mentioned Javascript script file being introduced to webpage at server side, the web data that server stores comprises this Javascript script file,, after web data being loaded in embedded browser, in embedded browsing device net page, be provided with this Javascript script file.
Method body in Javascript script file has the ability of respective party body of laws in the class object that calls Java interface class.The quantity of the method body that Javascript script file comprises is identical with quantity and the title of the method body that title comprises with Java interface class, to utilize Javascript script file to realize calling method body in class object.
Carrying out while specifically calling, utilize the method body of predetermined title in Javascript script file, call the title method body identical with this predetermined title in the method body of described class object.
As the method body of predetermined title in Javascript script file, according to the mark title of this predetermined title and class object, utilize the mode of the predetermined title of window. mark name find the method body in class object and call the party's body of laws.
Further embodiment of this invention also provides embedded browsing device net page implement device in a kind of mobile embedded platform, and referring to Fig. 2, this device 200 is arranged in mobile embedded platform, and this device 200 comprises:
Class object is realized unit 211, for creating the Java interface class of mobile embedded platform side, and as required at least one method body is set in Java interface class; The operation that realizes the class object of described Java interface class embedded browsing device net page execution as required realizes the method body in described class object;
Class object setting unit 212, for being arranged on embedded browser by described class object;
Method body call unit 213, for in the time that webpage is loaded into the embedded browser of mobile embedded platform, utilize the Javascript script file of introducing in embedded browsing device net page to call the method body in described class object, so that embedded browsing device net page utilizes the party's body of laws to carry out corresponding operation.Scene as shown in FIG., by HTML(Hypertext Markup Language, HTML (Hypertext Markup Language)) page download is to after in mobile embedded platform, the embedded browser of mobile embedded platform shows html web page, and method body call unit 213 is controlled Javascript script file in html web page and called class object and realize the method body of realizing corresponding authority ability in unit 211.
The party's body of laws is including, but not limited to method body that whether predetermined application is installed for inquiring about mobile embedded platform, and/or, for starting the method body of mobile embedded platform predetermined application, and/or, for obtaining the method body of the current network connection state of mobile embedded platform.
Further, class object setting unit 212, is used to described class object that the mark title of indication described class object position in platform is set; By described mark title is arranged in the view object of embedded browser, so that described class object is arranged in embedded browser.
The quantity of the method body that Javascript script file comprises is identical with quantity and the title of the method body that title comprises with described Java interface class.Method body call unit 213, for utilizing the method body of the predetermined title of Javascript script file, calls the title method body identical with this predetermined title in the method body of described class object.For example, method body call unit 213, specifically for utilizing the method body of predetermined title in Javascript script file, according to the mark title of this predetermined title and class object, utilize the mode of the predetermined title of window. mark name find the method body in class object and call the party's body of laws.
From the above mentioned, the embodiment of the present invention by arranging the class object that can carry out corresponding operating in embedded browser, and call technological means of this class object etc. by embedded browsing device net page, make embedded browsing device net page can carry out set operation, as make embedded browsing device net page carry out the operation with System Privileges, reach and embedded browsing device net page is had with this locality apply equal System Privileges ability, thereby improve the dirigibility of embedded browsing device net page implementation, strengthen the function of embedded browsing device net page, contribute to the development and application of embedded browsing device net page.
The foregoing is only preferred embodiment of the present invention, be not intended to limit protection scope of the present invention.All any modifications of doing within the spirit and principles in the present invention, be equal to replacement, improvement etc., be all included in protection scope of the present invention.
Claims (10)
1. an embedded browsing device net page implementation method in mobile embedded platform, is characterized in that, described method comprises:
Create the Java interface class of mobile embedded platform side, and in described Java interface class, at least one method body is set;
Realize the corresponding operating of the class object of described Java interface class embedded browsing device net page execution as required and realize the method body in described class object;
Described class object is arranged in embedded browser;
In the time that webpage is loaded in the embedded browser of mobile embedded platform, utilize the Javascript script file of introducing in embedded browsing device net page to call the method body in described class object, so that embedded browsing device net page utilizes the party's body of laws to carry out corresponding operation;
The quantity of the method body that wherein, described Javascript script file comprises is identical with quantity and the title of the method body that title comprises with described Java interface class.
2. method according to claim 1, is characterized in that, describedly described class object is arranged on to embedded browser comprises:
For described class object arranges the mark title of indicating described class object position in platform;
By described mark title is arranged in the view object of embedded browser, so that described class object is arranged in embedded browser.
3. method according to claim 2, it is characterized in that, when described mobile embedded platform is Android platform, the parameter of the correlation method by webpage view webview control is set to the mark title of described class object, so that described class object is arranged in embedded browser.
4. method according to claim 2, is characterized in that, the described method body that utilizes the Javascript script file of introducing in embedded browsing device net page to call in described class object comprises:
Utilize the method body of predetermined title in Javascript script file, call the title method body identical with this predetermined title in the method body of described class object.
5. method according to claim 4, is characterized in that, the described method body that utilizes predetermined title in Javascript script file calls the title method body identical with this predetermined title in the method body of described class object and comprises:
The method body of predetermined title in Javascript script file, according to the mark title of this predetermined title and class object, utilizes the mode of the predetermined title of window. mark name find the method body in class object and call the party's body of laws.
6. method according to claim 1, it is characterized in that, the corresponding operating that the embedded browsing device net page of described needs is carried out is the operation with the System Privileges of mobile embedded platform, and the method body in the class object that the described as required operation that embedded browsing device net page is carried out realizes comprises following method body:
Whether the method body of predetermined application is installed for inquiring about mobile embedded platform, and/or,
For starting the method body of mobile embedded platform predetermined application, and/or,
For obtaining the method body of the current network connection state of mobile embedded platform.
7. an embedded browsing device net page implement device in mobile embedded platform, is characterized in that, described device comprises:
Class object is realized unit, for creating the Java interface class of mobile embedded platform side, and at least one method body is set in described Java interface class; The operation that realizes the class object of described Java interface class embedded browsing device net page execution as required realizes the method body in described class object;
Class object setting unit, for being arranged on embedded browser by described class object;
Method body call unit, for in the time that webpage is loaded into the embedded browser of mobile embedded platform, utilize the Javascript script file of introducing in embedded browsing device net page to call the method body in described class object, so that embedded browsing device net page utilizes the party's body of laws to carry out corresponding operation;
The quantity of the method body that wherein, described Javascript script file comprises is identical with quantity and the title of the method body that title comprises with described Java interface class.
8. device according to claim 7, is characterized in that, described class object setting unit is used to described class object that the mark title of indication described class object position in platform is set; By described mark title is arranged in the view object of embedded browser, so that described class object is arranged in embedded browser.
9. device according to claim 7, is characterized in that, described method body call unit, for utilizing the method body of the predetermined title of Javascript script file, calls the title method body identical with this predetermined title in the method body of described class object.
10. device according to claim 7, it is characterized in that, described method body call unit, specifically for utilizing the method body of predetermined title in Javascript script file, according to the mark title of this predetermined title and class object, utilize the mode of the predetermined title of window. mark name find the method body in class object and call the party's body of laws.
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 true CN103914284A (en) | 2014-07-09 |
CN103914284B 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) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107329997A (en) * | 2017-06-08 | 2017-11-07 | 腾讯科技(深圳)有限公司 | Page display method and device, client, storage medium |
CN108897605A (en) * | 2018-07-24 | 2018-11-27 | 北京万相融通科技股份有限公司 | A kind of method and device of multipad embedded web page |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20120185450A1 (en) * | 2009-10-06 | 2012-07-19 | International Business Machines Corporation | Method and system to handle java class versioning |
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 |
-
2012
- 2012-12-31 CN CN201210592745.2A patent/CN103914284B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20120185450A1 (en) * | 2009-10-06 | 2012-07-19 | International Business Machines Corporation | Method and system to handle java class versioning |
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 |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107329997A (en) * | 2017-06-08 | 2017-11-07 | 腾讯科技(深圳)有限公司 | Page display method and device, client, storage medium |
CN108897605A (en) * | 2018-07-24 | 2018-11-27 | 北京万相融通科技股份有限公司 | A kind of method and device of multipad embedded web page |
CN108897605B (en) * | 2018-07-24 | 2022-03-08 | 北京万相融通科技股份有限公司 | Method and device for embedding desktop application program into webpage |
Also Published As
Publication number | Publication date |
---|---|
CN103914284B (en) | 2017-12-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107870821B (en) | Cross-platform calling method and system for application program | |
EP2806357A1 (en) | Method and communication device for updating a web application | |
CN102790961B (en) | Update method of application program, mobile terminal and server | |
CN107515764B (en) | Application page opening method, terminal and computer readable storage medium | |
CN105354488B (en) | It is a kind of to apply installation method, relevant apparatus and using installation system | |
CN103942225A (en) | Method and system for invoking resources of Hybrid App client and client | |
CN105284136A (en) | In-vehicle access of mobile device functions | |
US8495617B2 (en) | Interworking system between user terminal and smart card for executing widget, and method thereof | |
US20090307300A1 (en) | Method and system for executing an application on a mobile device | |
CN106686200B (en) | Mobile application program updating method, mobile terminal and updating system | |
CN105487905A (en) | Updating method and device of hybrid application | |
CN107637110B (en) | Method for loading configuration files | |
CN105323269A (en) | Method for updating APP in Android system, terminal and storage medium | |
KR20110025135A (en) | Method and apparatus for controlling a remote user interface in a home network | |
CN104035783A (en) | Platform integrating method and platform integrating system matched with third party web page in application program | |
WO2017201106A1 (en) | Portable electronic device and method for displaying data thereon | |
CN105450731A (en) | Method and apparatus for realizing communication between web layer and native layer | |
US20170351503A1 (en) | Method and system for installing software | |
CN105786476B (en) | Data processing method and system between mobile client and server | |
CN103914284A (en) | Method and device for implementing embedded browser webpage in mobile embedded platform | |
CN103929501A (en) | Intelligent remote control server and control method thereof | |
CN108123970A (en) | Method for exhibiting data and relevant apparatus | |
CN106131109A (en) | The method and apparatus of any cost caching in the embedded webpage of APP is realized based on http protocol | |
CN104301419A (en) | Non-local-machine remote download control system and method | |
CN103744663A (en) | Pre-caching technology based Android interface design frame model |
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. |