Embodiment
Below with reference to drawings and Examples, the technical scheme that realizes goal of the invention is elaborated.Should be appreciated that specific embodiment described herein, only in order to explain the present invention, is not intended to limit the present invention.
The main technical solution scheme of the embodiment of the present invention is: utilize operating system to carry browser (the browser Safiri carrying such as IOS system) and add the function of web page interlinkage to desktop, generate application shortcut icon at desktop, in the time of application shortcut icon in user's clicking operation system desktop, browser utilizes the wscript.exes such as Javascript to complete the invoked procedure of applications pages in the face of third party's application, realizes the fast access of the corresponding function application to third party's application on operating system desktop.
In the present invention, related operating system can be IOS operating system, Android system, Saipan system or other handheld equipment operating systems, in following embodiment, all illustrate with IOS operating system, but be not limited to this kind of situation, other similar operating systems all can adopt the following technical scheme of the present invention to realize the various function application in desktop access third party application.
Please refer to Fig. 1, Fig. 1 is the schematic flow sheet of the present invention in the method preferred embodiment of operating system desktop access third party application.
As shown in Figure 1, a kind of method in operating system desktop access third party application that the present embodiment proposes, comprising:
Step S101, third party is applied in operating system desktop and adds application shortcut icon;
Wherein, third party applies such as being Tencent QQ browser, UC browser, dolphin browser, the mini browser of Opera or other browsers, or other application etc., the application of application described in shortcut icon can be certain specific function or the web application that third party applies, such as bookmark etc.
The present embodiment scheme can realize third party's application its corresponding function application is added on operating system desktop, its purposes includes but not limited to: for certain function in third party's application creates shortcut, click after the application shortcut icon on desktop, can directly open corresponding specific function in third party's application; For third party's application realizes User Defined icon function, user can create a self-defining image target shortcut according to hobby.
Concrete methods of realizing is as follows:
Take IOS system as example, because IOS system does not directly provide the system interface that application is added to desktop, IOS system carries browser Safari can add web page interlinkage to desktop, third party's application can be used IOS browser Safiri and be completed the interpolation that specific function is applied, on IOS desktop, generate an application shortcut icon, open by IOS browser Safiri the page that this application shortcut icon is corresponding when pressing after application shortcut icon.
Particularly, IOS system provides setting options to select whether to add application shortcut icon for user at desktop, and in the time that user is chosen in IOS desktop interpolation application shortcut icon, third party's application generates the application page of html form according to the attribute information of described application.
Then, call IOS browser by IOS system interface, open this application page and present to user; On this application page, provide option to select whether select to add this application page for user, if user selects to add, be chosen in the described application page according to user and add operation, and then realize in IOS system desktop and add application shortcut icon.
Thus, third party's applications exploiting IOS system carries browser Safari and adds the function of web page interlinkage to desktop, completes the interpolation of application-specific, generates an application shortcut icon on IOS desktop.
Step S102, in the time judging user and click the application shortcut icon on described operating system desktop, the default wscript.exe of browser utilization is accessed the application of described third party's application that described application shortcut icon is corresponding.
Click after the icon on IOS desktop user, the address of the chained address of IOS browser Safiri access when being added to desktop is identical, if can utilize IOS browser Safiri to open the application page of third party's application after therefore clicking desktop icons, must in the page, utilize wscript.exe such as Javascript processes, while opening with desktop icons are clicked when the identical page is shown in IOS browser Safiri, behavior is different.
Here, IOS browser Safiri judges according to the status attribute of the Webpage of current click " window.navigator.standalone " whether user clicks the application shortcut icon on IOS desktop, in the time that this attribute is predetermined value true, the Webpage that judges current click is that the application shortcut icon click from IOS desktop is opened.If webpage is clicked and is opened from desktop, produce a click event with Javascript, click a hiding link (link) on the current web page page, the href(Hypertext Reference of this link, hypertext is quoted) address be the applicable character string of merit of calling third party corresponding to application shortcut icon application, thereby realize the corresponding function application in IOS desktop access third party application.
Particularly, as shown in Figure 2, when system is in the time having network application scene, above-mentioned steps S101 comprises:
Step S1011, in the time that user is chosen in operating system desktop interpolation application shortcut icon, described third party's application generates the application page of html form according to the attribute information of described application;
IOS system provides setting options to select whether to add application shortcut icon for user at desktop, and in the time that user is chosen in IOS desktop interpolation application shortcut icon, the attribute information of the application that third party's application is selected according to user generates the application page of html form.
Wherein, attribute information comprises icon, URL and the Apply Names etc. of described application.
Step S1012, calls browser by operating system interface, opens the described application page;
Call IOS browser by IOS system interface, open this application page and present to user; On this application page, provide option to select whether to select to add this application page for user.
Step S1013, is chosen in the described application page according to user and adds operation, adds application shortcut icon at described operating system desktop.
If user selects to add the application page of this correspondence, be chosen in the described application page according to user and add operation, and then realize in IOS system desktop and add application shortcut icon.
The present embodiment third party applications exploiting IOS system carries browser Safari and can add the function of web page interlinkage to desktop, completes the interpolation of application-specific, generates an application shortcut icon on IOS desktop.
Please refer to Fig. 3 a to Fig. 3 c, Fig. 3 a to Fig. 3 c is that IOS browser Safiri of the present invention adds the example of web page interlinkage to IOS desktop.
Take Tencent QQ browser as example, as shown in Figure 3 a, Fig. 3 a is that IOS browser Safiri opens the interface schematic diagram after Tengxun's homepage, utilize afterwards IOS browser Safiri to add " Tengxun's homepage " (http://www.qq.com/) to IOS desktop, press the 3rd button of Tengxun's homepage toolbar, select " being added into main screen ", enter the interface shown in Fig. 3 b.Then, press after " interpolation ", on IOS desktop, will occur the icon of " Tengxun's homepage ", as shown in Figure 3 c, after pressing this icon, can enter fast IOS browser Safiri, IOS browser Safiri will open " Tengxun's homepage " automatically, reach quick effect of accessing Tengxun's homepage.
Please refer to Fig. 4 a to Fig. 4 c, Fig. 4 a to Fig. 4 c is that the present embodiment utilizes IOS browser Safiri to add the example of application shortcut icon at IOS desktop.
Take Tencent QQ browser as example, this example can be realized the bookmark function shortcut icon adding on IOS desktop in QQ browser.
In the time that user is chosen in IOS desktop interpolation bookmark function shortcut icon, QQ browser generates the application page of html form according to attribute informations such as the icon of bookmark function, URL and Apply Nameses; Then call IOS browser by IOS system interface, open the application page of this bookmark function, and provide interpolation selection user to select to add shortcut icon, as shown in Fig. 4 a; The application page that is chosen in bookmark function according to user adds operation, as shown in Figure 4 b; Finally add bookmark shortcut icon at IOS desktop, as shown in Fig. 4 c.
As shown in Figure 5, when system is when without network application scene, above-mentioned steps S101 comprises:
Step S1011, in the time that user is chosen in operating system desktop interpolation application shortcut icon, described third party's application generates the application page of html form according to the attribute information of described application;
Step S1014, is converted to the application page of described html form generating the application page of data uri form;
Wherein, data uri(Data Uniform Resource Identifier, data general-purpose resource identifier) be by RFC2397(http: //tools.ietf.org/html/rfc2397) definition, a kind of new URL scheme, allow small documents that its data are directly embedded among document, just as quoted in outside.
Step S1015, third party's application is monitored a port numbers of specifying by monitoring module;
Wherein, monitor module and can be built in third party's application, also can not be built in third party's application, but be independent of outside third party's application, such as being arranged in other function servers, monitor module by third party's application call and monitor the port numbers of appointment.
Step S1016, calls browser by operating system interface and opens listening port address;
Step S1017, browser is initiated request to described monitoring module;
Step S1018, described monitoring module, according to described request, responds the data uri that uses html redirect parcel to described browser;
Step S1019, described browser is opened the application page of the data uri form of html redirect parcel;
Step S1013, is chosen in the described application page according to user and adds operation, adds application shortcut icon at described operating system desktop.
Particularly, for without also generating in this locality the application page add desktop under network condition, and under clickable icon, also can enter on the table the application page of third party's application, the application page of the html form of generation need to be converted to the application page of data uri form.
Take IOS system as example, due to the defect of IOS system interface, third party's application can not directly be called IOS browser Sarifi and be opened data uri.For this reason, the present embodiment solution is a built-in monitoring module in third party's application, monitors a port numbers of specifying, and then calling system interface is opened " http://localhost: listening port number ".Safiri browser will be called to open this address, initiate request with the monitoring module in backward third party's application.
Monitoring module in now third party's application is responded the request of IOS browser Safiri, will use data uri(<html><headG reatT.GreaT.GT<meta http-equiv=" Content-Type " content=" text/html of html redirect parcel; Charset=utf8 " ><meta http-equiv=" refresh " content=" 0; Url=data uri " ></html>) send to IOS browser Safiri as response.
Sending the data uri that uses html redirect parcel, is that the url in order to add the application on desktop to is data uri, rather than " http://localhost: listening port number ".Because the monitoring module in third party's application can be closed immediately after completing the response of IOS browser Safiri, if the url of application is " http://localhost: listening port number ", when it is opened, will there is the mistake of " cannot open webpage ".
Due to IOS browser Safiri called after, third party's application is switched to backstage, still need to continue operation and now monitor module, therefore, can call IOS system interface beginBackgroundTaskWithExpirationHandler, make third party be applied in backstage short-time duty, after completing the response of IOS browser Safiri, close immediately its built-in monitoring module.
It should be noted that, as previously mentioned, this monitoring module also can not be built in third party's application, but is independent of outside third party's application, such as being arranged in other function servers, monitors module monitor the port numbers of appointment by third party's application call.
The present embodiment passes through such scheme, utilize IOS system to carry browser and add the function of web page interlinkage to desktop, generate application shortcut icon at desktop, in the time that user clicks the application shortcut icon on IOS desktop, IOS browser utilizes the wscript.exes such as Javascript to complete the invoked procedure of applications pages in the face of third party's application, thereby on IOS desktop, has realized the fast access of the application to third party's application, in addition, without under network condition, by the application page being converted into data uri form, and apply built-in one third party and monitor module, the port numbers of utilizing the application of Safiri requesting third-party to monitor, the application page static or that dynamically generate is changed into data uri, use html redirect parcel, send to again Safiri, reach and utilize Safiri to add the object of application icon to desktop, after clicking desktop icons, can call third party's application, be applied to desktop and from desktop fast access third party application thereby realized without still completing under network condition to add, meet user's request.
As shown in Figure 6, preferred embodiment of the present invention proposes a kind of system in operating system desktop access third party application, comprising: third party applies 601 andbrowser 602, wherein:
Third party applies 601, for add application shortcut icon at operating system desktop;
Browser 602, in the time judging user and click the application shortcut icon on described operating system desktop, utilizes default wscript.exe to access described third party that described application shortcut icon is corresponding and applies 601 application.
Wherein, third party applies 601 such as being Tencent QQ browser, UC browser, dolphin browser, the mini browser of Opera or other browsers etc., the application of application described in shortcut icon can be that third party applies 601 certain specific function or web application, such as bookmark etc.
The present embodiment scheme can realize third party and apply 601 its corresponding function application is added on operating system desktop, its purposes includes but not limited to: certain function of applying in 601 for third party creates shortcut, click after the application shortcut icon on desktop, can directly open third party and apply specific function corresponding in 601; Realize User Defined icon function for third party applies 601, user can create a self-defining image target shortcut according to hobby.
Concrete methods of realizing is as follows:
Take IOS system as example, because IOS system does not directly provide the system interface that application is added to desktop, IOS system carries browser Safari can add web page interlinkage to desktop, third party's application can be used IOS browser Safiri and be completed the interpolation that specific function is applied, on IOS desktop, generate an application shortcut icon, open by IOS browser Safiri the page that this application shortcut icon is corresponding when pressing after application shortcut icon.
Particularly, IOS system provides setting options to select whether to add application shortcut icon for user at desktop, and in the time that user is chosen in IOS desktop interpolation application shortcut icon, third party's application generates the application page of html form according to the attribute information of described application.
Then, call IOS browser by IOS system interface, open this application page and present to user; On this application page, provide option to select whether select to add this application page for user, if user selects to add, be chosen in the described application page according to user and add operation, and then realize in IOS system desktop and add application shortcut icon.
Thus, third party's applications exploiting IOS system carries browser Safari and adds the function of web page interlinkage to desktop, completes the interpolation of application-specific, generates an application shortcut icon on IOS desktop.
Click after the icon on IOS desktop user, the address of the chained address of browser Safiri access when being added to desktop is identical, apply 601 the application page if therefore can utilize browser Safiri to open third party after click desktop icons, must in the page, utilize wscript.exe such as Javascript processes, while opening with desktop icons are clicked when the identical page is shown in browser Safiri, behavior is different.
Here, IOS browser Safiri judges according to the status attribute of the Webpage of current click " window.navigator.standalone " whether user clicks the application shortcut icon on IOS desktop, in the time that this attribute is predetermined value true, the Webpage that judges current click is that the application shortcut icon click from IOS desktop is opened.If webpage is clicked and is opened from desktop, produce a click event with Javascript, click a hiding link (link) on the current web page page, the href(Hypertext Reference of this link, hypertext is quoted) address be to call application third party corresponding to shortcut icon to apply 601 the applicable character string of merit, thereby realize the corresponding function application of applying 601 IOS desktop access third party.
Particularly, correspondence system is in there being network application scene, IOS system provides setting options to select whether to add application shortcut icon for user at desktop, in the time that user is chosen in IOS desktop interpolation application shortcut icon, the attribute information of the described application that third party's application is selected according to user generates the application page of html form, wherein, attribute information comprises icon, URL and the Apply Names etc. of described application.
Then callbrowser 602 by IOS system interface, open the described application page and present to user; On this application page, provide option to select whether to select to add this application page for user; Be chosen in the described application page according to user and add operation, add application shortcut icon at described IOS desktop.
The present embodiment third party applies 601 and utilizes IOS system to carry browser Safari can to add the function of web page interlinkage to desktop, complete the interpolation of application-specific, generates an application shortcut icon on IOS desktop.
Please refer to Fig. 3 a to Fig. 3 c, Fig. 3 a to Fig. 3 c is that browser Safiri of the present invention adds the example of web page interlinkage to IOS desktop.
Take Tencent QQ browser as example, as shown in Figure 3 a, Fig. 3 a is that IOS browser Safiri opens the interface schematic diagram after Tengxun's homepage, utilize afterwards IOS browser Safiri to add " Tengxun's homepage " (http://www.qq.com/) to IOS desktop, press the 3rd button of Tengxun's homepage toolbar, select " being added into main screen ", enter the interface shown in Fig. 3 b.Then, press after " interpolation ", on IOS desktop, will occur the icon of " Tengxun's homepage ", as shown in Figure 3 c, after pressing this icon, can enter fast IOS browser Safiri, IOS browser Safiri will open " Tengxun's homepage " automatically, reach quick effect of accessing Tengxun's homepage.
Please refer to Fig. 4 a to Fig. 4 c, Fig. 4 a to Fig. 4 c is that the present embodiment utilizes IOS browser Safiri to add the example of application shortcut icon at IOS desktop.
Take Tencent QQ browser as example, this example can be realized the bookmark function shortcut icon adding on IOS desktop in QQ browser.
In the time that user is chosen in IOS desktop interpolation bookmark function shortcut icon, QQ browser generates the application page of html form according to attribute informations such as the icon of bookmark function, URL and Apply Nameses; Then call IOS browser by IOS system interface, open the application page of this bookmark function, and provide interpolation selection user to select to add shortcut icon, as shown in Fig. 4 a; The application page that is chosen in bookmark function according to user adds operation, as shown in Figure 4 b; Finally add bookmark shortcut icon at IOS desktop, as shown in Fig. 4 c.
Correspondence system is in without network scenarios, for without also generating in this locality the application page add desktop under network condition, and under clickable icon, also can enter on the table third party and apply 601 the application page, the application page of the html form of generation need to be converted to the application page of data uri form.
Wherein, data uri(Data Uniform Resource Identifier, data general-purpose resource identifier) be by RFC2397(http: //tools.ietf.org/html/rfc2397) definition, a kind of new URL scheme, allow small documents that its data are directly embedded among document, just as quoted in outside.
Take IOS system as example, due to the defect of IOS system interface, third party applies 601 and can not directly call IOS browser 602Sarifi and open data uri.For this reason, the present embodiment solution is a built-in monitoring module in third party applies 601, monitors a port numbers of specifying, and then calling system interface is opened " http://localhost: listening port number ".Safiri browser will be called to open this address, and the monitoring module of applying in 601 with backward third party is initiated request.
Now third party applies the request of the monitoring module response IOS browser Safiri in 601, will use data uri(<html><headG reatT.GreaT.GT<meta http-equiv=" Content-Type " content=" text/html of html redirect parcel; Charset=utf8 " ><meta http-equiv=" refresh " content=" 0; Url=data uri " ></html>) send to IOS browser Safiri as response.
Sending the data uri that uses html redirect parcel, is that the url in order to add the application on desktop to is data uri, rather than " http://localhost: listening port number ".Because the monitoring module that third party applies in 601 can be closed immediately after completing the response of IOS browser Safiri, if the url of application is " http://localhost: listening port number ", when it is opened, will there is the mistake of " cannot open webpage ".
Due to IOS browser Safiri called after, third party applies 601 and is switched to backstage, still need to continue operation and now monitor module, therefore, can call IOS system interface beginBackgroundTaskWithExpirationHandler, make third party apply 601 at backstage short-time duty, after completing the response of IOS browser Safiri, close immediately its built-in monitoring module.
It should be noted that, this monitoring module also can not be built in third party and apply in 601, apply outside 601 but be independent of third party, such as being arranged in other function servers, by third party apply 601 call monitor module monitor the port numbers of appointment.
The embodiment of the present invention is in the method and system of operating system desktop access third party application, utilize IOS system to carry browser and add the function of web page interlinkage to desktop, generate application shortcut icon at desktop, in the time that user clicks the application shortcut icon on IOS desktop, browser utilizes the wscript.exes such as Javascript to complete the invoked procedure of applications pages in the face of third party's application, thereby on IOS desktop, has realized the fast access of the application to third party's application, in addition, without under network condition, by the application page being converted into data uri form, and apply built-in one third party and monitor module, the port numbers of utilizing the application of Safiri requesting third-party to monitor, the application page static or that dynamically generate is changed into data uri, use html redirect parcel, send to again Safiri, reach and utilize Safiri to add the object of application icon to desktop, after clicking desktop icons, can call third party's application, be applied to desktop and applying corresponding function application from desktop fast access third party without still completing under network condition to add thereby realized, user's different demands are met.
The foregoing is only the preferred embodiments of the present invention; not thereby limit the scope of the claims of the present invention; every equivalent structure or flow process conversion that utilizes instructions of the present invention and accompanying drawing content to do; or be directly or indirectly used in other relevant technical fields, be all in like manner included in scope of patent protection of the present invention.