Local Server Port Binding for Web-Native App Communication
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Current methods for communication between web pages and native applications are inefficient, particularly for users who have already installed the application, as they cannot adjust operation prompts based on the actual installation status, and require network support, leading to poor user experience.
Innovation Solution
A method and apparatus that enable communication between a web page and a native application by using a local server to provide a URL service via a port bound with the native application, allowing the browser client to select a port and determine the installation status of the native application, adjusting operation prompts accordingly without requiring URL schema registration or network support.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If indirect communication via URL schema and server polling is used, then communication between web page and native application is enabled, but network support is required and user experience deteriorates when network is abnormal
Solution Approach 1:
The patent introduces a local server as an intermediary component that runs on the user terminal itself. This local server acts as a mediator between the web page and native application, enabling direct communication without requiring external network support. The local server receives requests from the web page and forwards them to the native application, and vice versa, thus eliminating the dependency on network conditions while maintaining reliable communication.
2Adaptability or versatility
If URL schema registration is required for communication, then native application can be invoked, but device complexity increases
Solution Approach 1:
The patent extracts the communication protocol requirements from the system configuration and replaces them with a simpler port-based communication mechanism. Instead of requiring URL schema registration and complex browser support, the solution uses a local server that listens on a specific port and communicates with the native application through standard network protocols. This extraction of the communication logic from the system configuration reduces device complexity while maintaining adaptability.
3Ease of operation
If operation prompt cannot be adjusted based on installation status, then web page can be simplified, but user experience deteriorates
Solution Approach 1:
The patent implements a feedback mechanism where the local server continuously monitors the installation status of the native application and adjusts the operation prompt on the web page accordingly. When the native application is detected to be installed, the prompt is automatically changed from download-related text to update-related text. This feedback loop enables dynamic adaptation of the user interface based on actual system state, improving user experience without requiring complex manual configuration.
Data Source
AI summary
A method for communication of a native application on a terminal includes: receiving a first response from a web server in response to a web page access request initiated via the apparatus, wherein the first response comprises an identifier and version information of an application; selecting a port and initiating, to a local server on the apparatus, an access request carrying an identification of the selected port; determining whether a second response carrying an identifier and version information of a native application bound with the selected port on the terminal is received from the local server; in response to determining that the second response is received, determining whether the identifier of the native application and the identifier of the application in the first response are the same; and in response to determining that the identifiers are the same, adjusting an operation prompt according to the version information of the native application and the version information of the application in the first response.


