首页>
外国专利>
METHOD AND APPARATUS FOR REALIZING COMMUNICATION BETWEEN WEB PAGE AND NATIVE APPLICATION, AND ELECTRONIC DEVICE
METHOD AND APPARATUS FOR REALIZING COMMUNICATION BETWEEN WEB PAGE AND NATIVE APPLICATION, AND ELECTRONIC DEVICE
展开▼
机译:用于实现网页与本地应用之间的通信以及电子设备的方法和装置
展开▼
页面导航
摘要
著录项
相似文献
摘要
A method and an apparatus for realizing communication between a web page and a native application, and an electronic device are provided. The method includes: receiving a first response that is returned by a web server in response to a web page access request initiated by a user (S101); when the first response includes an identifier, a download link, and version information of an application, selecting a port number from a registered port set and initiating, to a local server located on a local terminal, an access request carrying the port number (S102); when receiving a second response, which carries a name and version information of a native application, returned by the local server, determining, according to names, whether the native application in the second response is the same as the application in the first response (S103); and if the native application in the second response and the application in the first response are the same, adjusting an operation prompt of the download link of the application according to the version information of the native application and the version information of the application in a process of rendering a web page based on the first response (S104). Embodiments of this application realize communication between a web page and a native application, and improve user experience.
展开▼