CN107632884A - A kind of method that browser starts external application by middle device - Google Patents
A kind of method that browser starts external application by middle device Download PDFInfo
- Publication number
- CN107632884A CN107632884A CN201710818094.7A CN201710818094A CN107632884A CN 107632884 A CN107632884 A CN 107632884A CN 201710818094 A CN201710818094 A CN 201710818094A CN 107632884 A CN107632884 A CN 107632884A
- Authority
- CN
- China
- Prior art keywords
- browser
- external application
- middle device
- api interface
- fullpath
- 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
Landscapes
- Stored Programmes (AREA)
Abstract
Start the method for external application by middle device the invention discloses a kind of browser, the browser starts external application by middle device;The middle device includes local Web Service interfaces and API interfaces, and middle device provides API interfaces by Web Service interfaces;The browser calls the Web Service interfaces that middle device provides by http protocol, and the middle device is by calling api interface to start external application.The api interface includes the first api interface and the second api interface;The middle device reads the fullpath of external application by the first api interface, and middle device starts external application by the second api interface.The present invention extends the application function of browser, has preferable application prospect.
Description
Technical field
The invention belongs to mobile communication technology field, and in particular to a kind of browser starts applications by middle device
The method of program.
Background technology
User is in the local application during user equipment is shown by web browser, it is impossible in browsing device net page
External application is directly run, because browser does not possess the interface for starting application program;On the other hand, even if user equipment
The local external application for being mounted with user and having needed, user run local external application in the needs that browse web sites
When, it can not also obtain the fullpath of the application program.The external application for browser program, except
There is the external application that interactive other applications can be referred to as browser with browser beyond browser program.
Browser can not start the reason for external application mainly have two aspect:On the one hand it is due to that browser is no outer
The fullpath of portion's application program, browser and webpage can not start external application;On the other hand it is due to that browser does not have
There is the api interface for starting application program.Due to the security strategy in general browser, its<input file=type>Though label
Some file can be so selected in a local computer and reads data therein, but final webpage can not be provided by browser
Interface read fullpath where this file, can not also be run the data of reading as application program.
The content of the invention
Start the method for external application by middle device it is an object of the invention to provide a kind of browser, it is described
Browser obtains the fullpath of external application by middle device and starts external application;The middle device bag
Local Web Service interfaces and API interfaces are included, and middle device provides API interfaces by Web Service interfaces;Institute
State the Web Service interfaces that browser calls middle device to provide by http protocol;The present invention is obtained by middle device
The fullpath of external application simultaneously starts external application by middle device.
The present invention is achieved through the following technical solutions:A kind of browser starts external application by middle device
Method, the browser pass through middle device obtain external application fullpath and start external application;Institute
Stating middle device includes local Web Service interfaces and API interfaces, and middle device is provided by Web Service interfaces
API interfaces;The browser calls the Web Service interfaces of middle device offer by http protocol;The browser leads to
The fullpath for calling the api interface of middle device to read external application is crossed, and browser is by calling middle device
Api interface starts external application.
The api interface of the middle device includes the first api interface and the second api interface;The browser passes through calling
First api interface of middle device reads the fullpath of external application, and states browser by calling middle device
Second api interface starts external application.
It is existing skill that the browser, which calls the method for the Web Service interfaces of middle device offer by http protocol,
Art, and be not the improvement of the present invention, therefore repeat no more.
A kind of method that browser starts external application by middle device, is mainly included the following steps that:
Step S1, run the Web that web application in a browser calls middle device to provide by http protocol
Service interface;
Step S2, the middle device eject a file selection window by the first api interface, obtained by file selection window
The fullpath of external application, and the return value using the fullpath of external application as the first api interface are taken, is returned
Preserved back to the web application in browser;
Step S3, the web application in browser are adjusted the fullpath of the external application preserved before as parameter
With the second api interface, the second api interface call operation system api interface, the operating system api interface starts outside
Application program, and web application of second api interface into browser returns to the result of application program launching.
The middle device is needed by manually starting, or automatic start of starting shooting after mounting;When browser calls middle fill
When putting, carried out if middle device is in starting state according to step S1- steps S3;Otherwise it will eject and remind in user's opening
Between device window.
The step S2 is mainly included the following steps that:
Step S201, browser call the first api interface of middle device, if without response, ejection prompting user starts middle
The window of device;If there is response, middle device ejection file selection window, user passes through window selection file destination, selection
Pass through the fullpath of the first api interface returning to external application program afterwards;
Step S202, browser and the application program operated in Web browser obtain the fullpath of external application, clear
Device of looking at preserves the fullpath of external application by webpage.
The step S3 is mainly included the following steps that:
Step S301, selects the external application to be started in the web application of user in a browser, in browser
The fullpath of external application saved web application read step S2;
Step S302, the fullpath of external application of the web application to preserve in browser are used as parameter call
Second api interface of middle device;If without response, ejection prompting user starts the window of middle device;It is described if there is response
Second api interface call operation system api interface, the operating system api interface run external application;
Step S303, Web application of the state that second api interface returns according to operating system api interface into browser
The startup result of program returning to external application program.
In use, the browser preserves the fullpath of external application to the present invention in the form of a web page,
Second api interface of the webpage using the fullpath of external application as parameter call middle device, the middle dress
The second api interface put calls the operating system api interface of local computer to start external application, clear so as to realize
Device of looking at starts external application by middle device.
In order to preferably realize the present invention, further, operating system in the step S3 is Windows systems,
Any one in linux system, macOS systems.
In order to preferably realize the present invention, further, the browser is the browser based on Microsoft's IE kernels, is based on
The browser of Google's Chrome kernels, the browser based on Mozilla Gecko kernels, browsing based on apple WebKit kernels
Any one in device.The browser is the general browser of compatible http protocol.
Independently of browser execution, the middle device provides a local Web to the middle device on the local computer
Service is serviced, and provides 2 main the first api interfaces and the second api interface by Web Service services.Described
One api interface is used for the fullpath for reading external application;Second api interface is used to start external application.
First api interface:The browser calls the first api interface to eject a local file choosing by middle device
Select window, the local file selection window belongs to middle device and unrelated with browser;Therefore middle device can pass through this
Select file in window and obtain the fullpath of local file;The local file is external application, is obtained outer
After the fullpath of portion's program, return value of the middle device using the fullpath of external program as the first api interface, return to
Browser and webpage, are preserved by webpage;First api interface can not be passed to parameter.
Second api interface:Webpage in the browser using the fullpath of the external application of preservation as
Second api interface of parameter call middle device;The api interface operation of the second api interface call operation system is outside should
Use program;After external application operation, according to the state of the api interface of operating system return, middle device returns to webpage
The result of application program launching success/failure.
Beneficial effects of the present invention:
(1)The browser is read out the fullpath of external application by middle device, and is carried by middle device
The api interface of confession start the application program of outside;
(2)First api interface is used for the fullpath for reading external application, and browser can be connect by the first API
Mouth is read out the fullpath of external application, the complete road that the browser passes through web storage external application
Footpath;
(3)Second api interface is used to start external application, and second api interface passes through call operation system
Api interface is so as to running external application.
Brief description of the drawings
Fig. 1 is the FB(flow block) that browser reads external application fullpath;
Fig. 2 is the FB(flow block) that browser starts external application.
Embodiment
Embodiment 1:
In the general browser of http protocol, the middle device independently of browser execution on the local computer;It is described
Browser obtains the fullpath of external application by middle device and starts external application;The middle device bag
Local Web Service interfaces and API interfaces are included, and middle device provides API interfaces by Web Service interfaces;Institute
State the Web Service interfaces that browser calls middle device to provide by http protocol;The browser is middle by calling
The api interface of device reads the fullpath of external application, and browser is by calling the api interface of middle device to start
External application.
Due to the security strategy in general browser, its<input file=type>Although label can be in local computing
Some file is selected in machine and reads data therein, but final webpage can not read this text by the interface that browser provides
Fullpath where part;When user selects C in a browser:Windows System32 mstsc.exe, recall afterwards
[input] .value methods in JavaScript, browser can only return to the filename " mstsc.exe " of user's select file
Word string, rather than return to " C:Windows System32 mstsc.exe " word strings;Therefore general browser can not directly be read
Take the fullpath of external application and directly initiate external application.
The web application of operation in a browser calls the Web Service of middle device offer by http protocol
Interface, the Web Service interfaces of the middle device are provided with api interface, so as to which middle device can provide for browser
Read the fullpath of external application and start external application, therefore browser can be outer by middle device startup
Portion's application program.
Embodiment 2:
The present embodiment is further optimized on the basis of embodiment 1, and the api interface includes the first api interface and the 2nd API
Interface.
The web application of operation in a browser calls the Web Service of middle device offer by http protocol
Interface, the middle device start the fullpath that the first api interface reads the local external application of computer, browser
So as to which the fullpath of external application is stored in browser web application;The browser is with complete road
The second api interface that footpath provides as parameter call middle device, the second api interface call operation system API, so as to open
Dynamic external application.
The present invention obtains the fullpath of external application by middle device and starts outside answer by middle device
With program, the application function of browser is extended, there is preferable application prospect.
The other parts of the present embodiment repeat no more with embodiment 1.
Embodiment 3:
The present embodiment is further optimized on the basis of embodiment 2, as shown in figure 1, the web application of browser passes through
Http protocol calls the Web Service interfaces that middle device provides;The middle device is read outside by the first api interface
The fullpath of application program, it is clear if middle device is without response after browser calls the first api interface of middle device
Ejection in device of looking at starts middle device window, and user restarts middle device;If middle device responds, the middle device bullet
Go out file selection window, user passes through window selection file destination, the first api interface returning to external application of the middle device
The fullpath of program;The web application of the browser obtains the fullpath of external application and by external program
Fullpath be stored in webpage;
Webpage in browser using the fullpath of the external application preserved before as the api interface of parameter call second,
The second api interface call operation system api interface, the operating system api interface start external application, and second
Api interface returns to the result of application program launching to webpage.
The present invention obtains the fullpath of external application by middle device and starts outside answer by middle device
With program, the application function of browser is extended, there is preferable application prospect.
The other parts of the present embodiment are same as Example 2, therefore repeat no more.
Embodiment 4:
The present embodiment is further optimized on the basis of embodiment 2 or 3, and the browser is started outer by the second api interface
Portion's application program, as shown in Fig. 2 user can select the fullpath of saved external program in a browser, browse
Second api interface of the webpage using the fullpath of external program as parameter call middle device in device, if without response, it is clear
Ejection in device of looking at please start middle device window;If response, the API of the second api interface call operation system of middle device
Interface starts external application;Second api interface starts the result of successfully/failure to browser returning to external program.
The present invention obtains the fullpath of external application by middle device and starts outside answer by middle device
With program, the application function of browser is extended, there is preferable application prospect.
The other parts of the present embodiment are identical with above-described embodiment 2 or 3, therefore repeat no more.
Embodiment 5:
In the general browser of http protocol, the middle device independently of browser execution on the local computer;It is described
Browser reads the fullpath of external application by middle device and starts external application;The middle device
Api interface includes the first api interface and the second api interface;The browser starts external application by middle device
Method mainly includes the following steps that:
Step S1, run the Web that web application in a browser calls middle device to provide by http protocol
Service interface;
Step S2, the middle device eject a file selection window by the first api interface, obtained by file selection window
The fullpath of external application, and the return value using the fullpath of external application as the first api interface are taken, is returned
Preserved back to the web application in browser;
Step S3, the web application in browser are adjusted the fullpath of the external application preserved before as parameter
With the second api interface, the second api interface call operation system api interface, the operating system api interface starts outside
Application program, and web application of second api interface into browser returns to the result of application program launching.
The step S2 is mainly included the following steps that:
Step S201, browser call the first api interface of middle device, if without response, ejection prompting user starts middle
The window of device;If there is response, middle device ejection file selection window, user passes through window selection file destination, selection
Pass through the fullpath of the first api interface returning to external application program afterwards;
Step S202, the web application in browser obtain the fullpath of external application, and the Web in browser should
The fullpath of external application is preserved with program.
The step S3 is mainly included the following steps that:
Step S301, selects the external application to be started in the web application of user in a browser, in browser
The fullpath of external application saved web application read step S2;
Step S302, the fullpath of external application of the web application to preserve in browser are used as parameter call
Second api interface of middle device;If without response, ejection prompting user starts the window of middle device;It is described if there is response
Second api interface call operation system api interface, the operating system api interface run external application;
Step S303, Web application of the state that second api interface returns according to operating system api interface into browser
The startup result of program returning to external application program.
The present invention obtains the fullpath of external application by middle device and starts outside answer by middle device
With program, the application function of browser is extended, there is preferable application prospect.
It is described above, be only presently preferred embodiments of the present invention, any formal limitation not done to the present invention, it is every according to
Any simply modification, the equivalent variations made according to the technical spirit of the present invention to above example, each fall within the protection of the present invention
Within the scope of.
Claims (7)
1. a kind of method that browser starts external application by middle device, it is characterised in that the browser passes through
Middle device obtains the fullpath of external application and starts external application;The middle device includes local Web
Service interface and API interfaces, and middle device provides API interfaces by Web Service interfaces;The browser leads to
Cross the Web Service interfaces that http protocol calls middle device to provide;The browser is by calling the API of middle device to connect
Mouth reads the fullpath of external application, and browser is by calling the api interface of middle device to start applications journey
Sequence.
2. a kind of browser according to claim 1 starts the method for external application, its feature by middle device
It is, the api interface of the middle device includes the first api interface and the second api interface;The browser is middle by calling
First api interface of device reads the fullpath of external application, and states browser by calling the second of middle device
Api interface starts external application.
3. a kind of browser according to claim 2 starts the method for external application, its feature by middle device
It is, mainly includes the following steps that:
Step S1, run the Web that web application in a browser calls middle device to provide by http protocol
Service interface;
Step S2, the middle device eject a file selection window by the first api interface, obtained by file selection window
The fullpath of external application, and the return value using the fullpath of external application as the first api interface are taken, is returned
Preserved back to the web application in browser;
Step S3, the web application in browser are adjusted the fullpath of the external application preserved before as parameter
With the second api interface, the second api interface call operation system api interface, the operating system api interface starts outside
Application program, and web application of second api interface into browser returns to the result of application program launching.
4. a kind of browser according to claim 3 starts the method for external application, its feature by middle device
It is, the step S2 is mainly included the following steps that:
Step S201, browser call the first api interface of middle device, if without response, ejection prompting user starts middle
The window of device;If there is response, middle device ejection file selection window, user passes through window selection file destination, selection
Pass through the fullpath of the first api interface returning to external application program afterwards;
Step S202, the web application in browser obtain the fullpath of external application, and the Web in browser should
The fullpath of external application is preserved with program.
5. a kind of browser according to claim 3 starts the method for external application, its feature by middle device
It is, the step S3 is mainly included the following steps that:
Step S301, selects the external application to be started in the web application of user in a browser, in browser
The fullpath of external application saved web application read step S2;
Step S302, the fullpath of external application of the web application to preserve in browser are used as parameter call
Second api interface of middle device;If without response, ejection prompting user starts the window of middle device;It is described if there is response
Second api interface call operation system api interface, the operating system api interface run external application;
Step S303, Web application of the state that second api interface returns according to operating system api interface into browser
The startup result of program returning to external application program.
6. a kind of browser according to claim 3 starts the method for external application, its feature by middle device
It is, the operating system in the step S3 is any one in Windows systems, linux system, macOS systems.
7. a kind of browser according to claim any one of 1-6 starts the side of external application by middle device
Method, it is characterised in that the browser be the browser based on Microsoft's IE kernels, the browser based on Google's Chrome kernels,
Browser based on Mozilla Gecko kernels, any one in the browser based on apple WebKit kernels.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710818094.7A CN107632884B (en) | 2017-09-12 | 2017-09-12 | Method for starting external application program by browser through intermediate device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710818094.7A CN107632884B (en) | 2017-09-12 | 2017-09-12 | Method for starting external application program by browser through intermediate device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107632884A true CN107632884A (en) | 2018-01-26 |
CN107632884B CN107632884B (en) | 2021-06-01 |
Family
ID=61100904
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710818094.7A Active CN107632884B (en) | 2017-09-12 | 2017-09-12 | Method for starting external application program by browser through intermediate device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107632884B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109933445A (en) * | 2019-03-14 | 2019-06-25 | 杭州汉领信息科技有限公司 | It is not based on the local application call method of the browser-cross cross-system platform of plug-in unit |
CN111226429A (en) * | 2018-09-21 | 2020-06-02 | 思杰系统有限公司 | System and method for intercepting and enhancing SAAS application calls via an embedded browser |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102541575A (en) * | 2010-12-07 | 2012-07-04 | 腾讯科技(深圳)有限公司 | Method and device for opening browser, method for sending splash screen image, and server |
CN103049320A (en) * | 2012-12-17 | 2013-04-17 | 广州市动景计算机科技有限公司 | Method and device for starting external application program in browser |
CN103064738A (en) * | 2013-01-15 | 2013-04-24 | 珠海金山办公软件有限公司 | Method and system for embedding local application program window into browser in Linux |
CN103473367A (en) * | 2013-09-27 | 2013-12-25 | 北京奇虎科技有限公司 | Method for using local application program in browser and web browser |
CN104239063A (en) * | 2014-09-23 | 2014-12-24 | 福建星网视易信息系统有限公司 | Web browser and method for calling local application program through web browser |
-
2017
- 2017-09-12 CN CN201710818094.7A patent/CN107632884B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102541575A (en) * | 2010-12-07 | 2012-07-04 | 腾讯科技(深圳)有限公司 | Method and device for opening browser, method for sending splash screen image, and server |
CN103049320A (en) * | 2012-12-17 | 2013-04-17 | 广州市动景计算机科技有限公司 | Method and device for starting external application program in browser |
CN103064738A (en) * | 2013-01-15 | 2013-04-24 | 珠海金山办公软件有限公司 | Method and system for embedding local application program window into browser in Linux |
CN103473367A (en) * | 2013-09-27 | 2013-12-25 | 北京奇虎科技有限公司 | Method for using local application program in browser and web browser |
CN104239063A (en) * | 2014-09-23 | 2014-12-24 | 福建星网视易信息系统有限公司 | Web browser and method for calling local application program through web browser |
Non-Patent Citations (1)
Title |
---|
PRETTY: "从浏览器快速启动程序", 《电脑爱好者》 * |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111226429A (en) * | 2018-09-21 | 2020-06-02 | 思杰系统有限公司 | System and method for intercepting and enhancing SAAS application calls via an embedded browser |
CN111226429B (en) * | 2018-09-21 | 2022-11-15 | 思杰系统有限公司 | System and method for intercepting and enhancing SAAS application calls via an embedded browser |
US11669376B2 (en) | 2018-09-21 | 2023-06-06 | Citrix Systems, Inc. | Systems and methods for intercepting and enhancing SaaS application calls via embedded browser |
CN109933445A (en) * | 2019-03-14 | 2019-06-25 | 杭州汉领信息科技有限公司 | It is not based on the local application call method of the browser-cross cross-system platform of plug-in unit |
Also Published As
Publication number | Publication date |
---|---|
CN107632884B (en) | 2021-06-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20140208328A1 (en) | Method for terminal acceleration, terminal and storage medium | |
US20240004949A1 (en) | Systems and Methods for Hosted Applications | |
US20230072428A1 (en) | Method, Apparatus, and System for Pushing Application Program, and Device | |
EP3457666B1 (en) | Method and system for starting an application | |
CN105573733B (en) | Method, web front-end and the system that browser is communicated with web front-end | |
US20190109920A1 (en) | Browser resource pre-pulling method, terminal and storage medium | |
CN106375483A (en) | File transmission method and device | |
CN108574709B (en) | Method and device for realizing cross-domain operation | |
CN104965848A (en) | Front-end resource loading method and apparatus | |
CN109933381B (en) | Kernel loading method and device | |
CN111414562A (en) | Application program page API interface preposition method and device and storage medium | |
CN103810033B (en) | The method and apparatus that a kind of detection is started with program | |
CN105354498A (en) | Operation method of registry, related device and equipment | |
CN104598267B (en) | The tune of application plays method and device | |
CN107632884A (en) | A kind of method that browser starts external application by middle device | |
CN111538922B (en) | Link jump method, application client, device and storage medium | |
US10445397B2 (en) | Method and apparatus for uploading information | |
WO2017092455A1 (en) | Method for web browsing in mobile terminal, and mobile terminal | |
CN110674444A (en) | Method and terminal for downloading dynamic webpage | |
CN110020338B (en) | Browser and webpage opening method and device | |
US10713414B2 (en) | Web page display method, terminal, and storage medium | |
CN111309307B (en) | Method and device for integrating VUE page and workflow system | |
CN112182446B (en) | Page display method and device, terminal equipment and computer readable storage medium | |
CN108345683A (en) | Webpage display process, device, terminal and storage medium | |
CN112351094A (en) | Webpage pushing method and device, electronic equipment and storage medium |
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 |