CN108256312B - Method and device for opening local application program on webpage and mobile terminal - Google Patents

Method and device for opening local application program on webpage and mobile terminal Download PDF

Info

Publication number
CN108256312B
CN108256312B CN201810055252.2A CN201810055252A CN108256312B CN 108256312 B CN108256312 B CN 108256312B CN 201810055252 A CN201810055252 A CN 201810055252A CN 108256312 B CN108256312 B CN 108256312B
Authority
CN
China
Prior art keywords
list
local application
webpage
application program
protocol
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.)
Active
Application number
CN201810055252.2A
Other languages
Chinese (zh)
Other versions
CN108256312A (en
Inventor
陈崇勇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201810055252.2A priority Critical patent/CN108256312B/en
Publication of CN108256312A publication Critical patent/CN108256312A/en
Application granted granted Critical
Publication of CN108256312B publication Critical patent/CN108256312B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/30Authentication, i.e. establishing the identity or authorisation of security principals
    • G06F21/44Program or device authentication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72403User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
    • H04M1/72445User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality for supporting Internet browser applications
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72448User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions
    • H04M1/72463User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions to restrict the functionality of the device

Landscapes

  • Engineering & Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The embodiment of the application discloses a method and a device for opening a local application program on a webpage and a mobile terminal, and is applied to the technical field of internet. The method comprises the following steps: when loading webpage resources according to a webpage opening request, acquiring a private protocol for opening a local application program corresponding to a webpage from the webpage resources; judging whether the private protocol is in a white list or a black list of a preset protocol list; if the private protocol is in a white list, opening the local application program corresponding to the webpage according to the private protocol, and if the private protocol is in a black list, not opening the local application program corresponding to the webpage, so that the opening mode of the local application program corresponding to the webpage is more friendly to the user, and the use experience of the browser of the user is improved.

Description

Method and device for opening local application program on webpage and mobile terminal
Technical Field
The present application relates to the field of internet technologies, and in particular, to a method and an apparatus for opening a local application on a web page, and a mobile terminal.
Background
When a browser opens a web page, there is often a web page corresponding to a third-party application, for example, a Taobao web page corresponds to a Taobao application. When the third-party application program corresponding to the webpage is installed on the mobile terminal, the third-party application program is a local application program corresponding to the webpage on the mobile terminal. When the browser opens the webpage, the corresponding local application program installed in the mobile terminal can be automatically jumped to open, and the browser use experience of the user is greatly influenced.
Disclosure of Invention
In view of the above problems, the present application provides a method, an apparatus, and a mobile terminal for opening a local application program on a web page, and whether to open the local application program is determined according to a black-and-white list of a preset protocol list, so that an opening manner is more user-friendly, and browser use experience of a user is improved.
In a first aspect, an embodiment of the present application provides a method for opening a local application on a web page, where the method includes: when loading webpage resources according to a webpage opening request, acquiring a private protocol for opening a local application program corresponding to a webpage from the webpage resources; judging whether the private protocol is in a white list or a black list of a preset protocol list; and if the private protocol is in a white list, opening the local application program corresponding to the webpage according to the private protocol, and if the private protocol is in a black list, not opening the local application program corresponding to the webpage.
In a second aspect, an embodiment of the present application provides an apparatus for opening a local application on a web page, where the apparatus includes: the system comprises a private protocol acquisition module, a web page resource acquisition module and a web page resource processing module, wherein the private protocol acquisition module is used for acquiring a private protocol of a local application program corresponding to a web page from the web page resource when the web page resource is loaded according to a web page opening request; the judging module is used for judging whether the private protocol is in a white list or a black list of a preset protocol list; and the program opening module is used for opening the local application program corresponding to the webpage according to the private protocol if the private protocol is in a white list, and not opening the local application program corresponding to the webpage if the private protocol is in a black list.
In a third aspect, an embodiment of the present application provides a mobile terminal, including a display screen, a memory and a processor, where the display screen and the memory are coupled to the processor, the display screen is used for displaying a browser webpage and a local application program, and the memory stores instructions, and when the instructions are executed by the processor, the processor executes the above method.
In a fourth aspect, the present application provides a computer-readable storage medium having program code executable by a processor, the program code causing the processor to perform the above-mentioned method.
According to the method, the device and the mobile terminal for opening the local application program on the webpage, the private protocol is obtained from the webpage resource in the process of loading the webpage resource, and the obtained private protocol is the private protocol for opening the local application program corresponding to the webpage. And then judging whether the blacklist or the whitelist of the private protocol in the preset protocol list is in the white list, if the blacklist is in the white list, opening the corresponding local application program according to the private protocol, and if the blacklist is in the white list, not opening the corresponding local application program.
These and other aspects of the present application will be more readily apparent from the following description of the embodiments.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a flowchart illustrating a method for opening a local application on a web page according to a first embodiment of the present application;
FIG. 2 is a flowchart illustrating a method for opening a local application by a web page according to a second embodiment of the present application;
FIG. 3 is a flowchart illustrating a portion of steps of a method for opening a local application from a web page according to a second embodiment of the present application;
FIG. 4 is a schematic diagram illustrating a white list setting display according to a second embodiment of the present application;
FIG. 5 is a schematic diagram illustrating a black and white list setting display according to a second embodiment of the present application;
FIG. 6 is a functional block diagram of an apparatus for opening a native application from a web page according to an embodiment of the present application;
FIG. 7 is a block diagram of another embodiment of a device for opening a native application from a web page;
fig. 8 is a block diagram illustrating a structure of a mobile terminal according to an embodiment of the present application;
fig. 9 is a block diagram of a mobile terminal according to an embodiment of the present application;
fig. 10 is a block diagram illustrating a mobile terminal for performing a method for opening a local application by a web page according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
When the web pages of the browser are loaded, except for a normal loading link, some web pages have corresponding third-party application programs, and if the third-party application programs are installed on the mobile terminal installed in the browser, the third-party application programs are local application programs corresponding to the web pages. And if the webpage is loaded, directly jumping to the corresponding local application program, namely opening the local application program corresponding to the webpage. The opening of the local application program occupies the running resources of the mobile terminal on one hand, and on the other hand, the opening of the local application program can occupy the display resources of the display screen, namely, the display layer of the opened local application program is higher than the webpage, the display of the webpage is shielded, and the use experience of a user on the browser is greatly influenced. However, if each web page opens the corresponding local application, a prompt interface indicating whether to open is displayed to prompt the user to allow the corresponding local application to be opened or not, which may also interfere with the web page browsing of the user and also affect the user experience of the browser.
The inventor finds that, in general, users have common local applications, such as panning and paying treasures, which are mainstream applications, that is, for a part of a web page, when the user opens the web page, the user tends to jump from the web page and open the local application corresponding to the web page. In addition, for some web pages, the user usually only browses the web page, and does not open the corresponding application program corresponding to the web page. Therefore, the embodiment of the application provides a method for opening a local application program on a webpage, whether the local application program corresponding to the webpage is opened or not is determined through a preset protocol list comprising a black list and a white list, the opening mode is more flexible, the method is more user-friendly, and the use experience of a user on a browser is improved.
First embodiment
Referring to fig. 1, a first embodiment of the present application provides a method for opening a local application on a web page. The method for opening the local application program of the webpage acquires a private protocol for opening the local application program corresponding to the webpage from webpage resources, and determines whether to open the local application program according to whether the private protocol belongs to a white list or a black list. In a specific embodiment, the method for opening the local application by the web page is applied to the apparatus 300 for opening the local application by the web page as shown in fig. 6 and the mobile terminal 400 (fig. 8 and 9) corresponding to the apparatus 300 for opening the local application by the web page. The following will describe a specific flow of this embodiment by taking a mobile phone as an example, and it is understood that the mobile terminal applied in this embodiment of the present application is not limited to a mobile phone, and may be other mobile terminals, such as a Pad, a personal computer, and the like. The method for opening the local application program by the webpage specifically comprises the following steps:
step S110: and when the webpage resources are loaded according to the webpage opening request, acquiring a private protocol for opening the local application program corresponding to the webpage from the webpage resources.
When a user opens a web page in a browser, the browser receives a web page opening request, and acquires resources of the web page from a server according to a Uniform Resource Locator (URL) of the web page.
The browser can analyze the private protocol jumped to the local application program from the loaded webpage resource, namely, the private protocol for opening the application program installed locally on the mobile terminal corresponding to the webpage.
The specific process may be that all the loaded contents of the web page are rendered and parsed by the browser kernel. When the browser kernel loads the web page, the resource and various links of the web page all download links, an interface public browser downloading over urlroading (KKWebView view, KKWebResourceRequest request) for downloading the resource is provided, the interface informs the browser, and the second parameter of the interface can acquire all requested links in the web page. Many request character strings can be obtained from the parameters of the interface, some are link addresses, and some are private protocols. Usually, these character strings can be printed out in the browser to find the corresponding proprietary protocol.
Step S120: and judging whether the private protocol is in a white list or a black list of a preset protocol list, if the private protocol is in the white list, executing the step S130, and if the private protocol is in the black list, executing the step S140.
In the embodiment of the application, a preset protocol list is prestored, the preset protocol list comprises various private protocols for opening the local application program of the webpage, and different private protocols are used for opening different local application programs. The preset protocol list comprises a white list and a black list, and the private protocol in the preset protocol list may belong to the white list or the black list. If a certain private protocol is a private protocol in the white list, it indicates that the web page can directly open the corresponding local application program according to the private protocol. If a certain private protocol is a private protocol in the blacklist, the webpage can not open the application program corresponding to the private protocol.
Specifically, the black list and the white list in the preset protocol list may be stored in a manner that a special segmentation symbol, such as a segmentation line, may be set. The list before the special segmentation symbol may be designated as a black list and the list after the segmentation symbol may be designated as a white list. Of course, the specific storage manner of the preset protocol list is not limited in the embodiment of the present application.
And judging whether the private protocol acquired from the webpage resource belongs to a white list or a black list of a preset protocol list. The determining method may be that the private protocols are matched with the private protocols in the preset protocol list one by one, and if the private protocols are matched with the private protocols in the preset protocol list, the list to which the private protocols belong, which is obtained from the web page resource, is the list to which the matched private protocols belong. That is, if the private protocol matched with the private protocol acquired from the web page resource is in the white list, the private protocol acquired from the web page resource is in the white list; and if the private protocol matched with the private protocol acquired from the webpage resource is in the blacklist, the private protocol acquired from the webpage resource is in the blacklist. Of course, the specific determination method is not limited in the embodiment of the present application.
Step S130: and opening a local application program corresponding to the webpage according to the private protocol.
If the private protocol acquired from the webpage resource belongs to the white list, the behavior corresponding to the private protocol is allowed, and the local application program can be opened according to the private protocol.
Step S140: and not opening the local application program corresponding to the webpage.
If the private protocol acquired from the web page resource belongs to the blacklist, the local application program corresponding to the web page is not opened, that is, the local application program corresponding to the private protocol acquired from the web page resource is not opened. The non-opening mode may be to directly shield the local application opening request behavior corresponding to the private protocol, to intercept the process of opening the local application according to the private protocol, and so on.
Second embodiment
Compared with the first embodiment, the embodiment further includes acquiring a preset protocol list. Specifically, referring to fig. 2, the method includes:
step S210: and acquiring a preset protocol list.
The browser obtains a preset protocol list including a white list and a black list, and of course, only the white list or only the black list may be included in the preset protocol list. The white list and the black list respectively comprise private protocols used for opening the local application program on the webpage, and the same private protocol cannot exist in the white list and the black list at the same time.
In a specific embodiment, the server may dynamically maintain a preset protocol list, and the preset protocol list of the browser is obtained from the server. The preset protocol list in the server may be updated according to an operation of whether a user opens a local application corresponding to the web page in the plurality of mobile terminals, that is, if the user selects to open a certain local application in a certain number or a certain proportion of mobile terminals, the private protocol for opening the local application in the web page is added to the white list; and if the number of the mobile terminals exceeds a certain number or a certain proportion, the user selects to refuse to open a certain local application program, and the webpage is opened to add a black and white list to the private protocol of the local application program. For example, the user opens the corresponding local application program from the webpage or refuses to open the corresponding local application program through the feedback channel, the user selects to open or refuse when inquiring whether to open the local application program or not in the webpage, and the like, the mobile terminal sends the feedback message or selection of the user to the server, and the server updates the preset protocol list according to the operation of the user.
In this embodiment, the server may also update the pre-set protocol list in other ways, such as adding a private protocol for opening rogue software to a blacklist.
The browser can acquire the latest preset protocol list from the server at preset time intervals, so that the information of the preset protocol list in the browser is more accurate. Or, the latest preset protocol list is acquired from the server every time the browser is started, so that the preset protocol list applied to the browser in the using process is updated by the server latest.
In another specific embodiment, the preset protocol list may be set by a user. Specifically, referring to fig. 3, the process of setting the preset protocol list may be:
step S211: receiving a preset protocol list setting request.
The user can initiate a preset protocol list setting request for configuring the private protocol in the white list and the private protocol in the black list of the preset protocol list according to the requirement of the user.
Step S212: and displaying setting selection items corresponding to one or more local application programs according to the setting request, wherein the setting selection items comprise white list selection items and black list selection items.
When a setting request is received, setting selection items corresponding to the local application program can be displayed. The setting selection items comprise white list selection items and black list selection items, the white list selection items corresponding to the local application program are used for enabling a user to select to open the private protocol of the local application program to be added into a white list, and the black list selection items corresponding to the local application program are used for enabling the user to select to open the private protocol of the local application program to be added into the black list.
For example, as shown in fig. 4, a white list entry may be set, local applications that the web page may open via a private protocol are displayed under the white list entry, and whether each local application is to be added to the white list is selected by the user. Similarly, a blacklist entry may be set, local applications that the web page may open through a private protocol may also be displayed under the blacklist entry, and whether each local application is added to the blacklist may be selected by the user. If the local application is added to the white list in fig. 4, the selection control described in fig. 4 may be checked, as shown in application a in fig. 4.
Alternatively, as shown in fig. 5, the option items for adding to the white list or the black list are displayed corresponding to each local application that can be opened through the private protocol, and the user selects whether to add the local application to the white list or the black list. In fig. 5, if the local application is added to the white list, the selection control corresponding to the white list shown in fig. 5 may be selected, as shown in application a in fig. 5; if the local application is added to the blacklist, the selection control corresponding to the blacklist shown in fig. 5 may be checked, as shown in application B in fig. 5.
Of course, the local application may also be added to neither the white list nor the black list, as shown in fig. 5 for application C and application D. And if the user selects to add the local application program into the white list, opening the private protocol of the local application program on the webpage and adding the private protocol into the white list. And if the user selects to add the local application program into the blacklist, opening the private protocol of the local application program on the webpage and adding the private protocol into the blacklist.
Step S213: and receiving blacklist setting or white list setting determined according to the setting selection items, wherein the blacklist setting or the white list setting is set to one or more local application programs.
Step S214: and adding the private protocol corresponding to the local application program set as the white list into a white list of a preset protocol list, and adding the private protocol corresponding to the local application program set as the black list into a black list of the preset protocol list.
The user sets the white list of the local application program, namely, the local application program is added into the white list through the white list selection items, and the user sets the blacklist of the local application program, namely, the local application program is added into the blacklist through the blacklist selection items. And after the user selects the local application program added into the white list and the local application program added into the black list through the selection items, receiving the selection of the user. And adding the private protocol corresponding to the local application program added into the white list into a white list of a preset protocol list, and adding the private protocol corresponding to the local application program added into the black list into a black list of the preset protocol list. The private protocol corresponding to the local application program, namely the private protocol according to which the local application program is opened by the webpage, is disclosed.
In the embodiment of the present application, the preset protocol list of the browser may be obtained through any one of the above embodiments, or may be obtained through a combination of the above two embodiments.
Step S220: and when the webpage resources are loaded according to the webpage opening request, acquiring a private protocol for opening the local application program corresponding to the webpage from the webpage resources.
Step S230: judging whether the private protocol is in a white list or a black list of a preset protocol list, and if the private protocol is in the white list, executing step S240; if the private protocol is in the blacklist, go to step S250.
Step S240: and opening a local application program corresponding to the webpage according to the private protocol.
Step S250: and not opening the local application program corresponding to the webpage.
When a webpage is opened, a private protocol for opening the local application program is acquired according to webpage resources loaded from the server, and whether the corresponding local application program is opened or not is determined according to a preset protocol list.
Of course, the private protocol obtained from the web page resource may also belong to neither a white list nor a black list, and if the private protocol is not in the preset protocol list, the user may be prompted to select whether to open the local application. Specifically, if the private protocol acquired from the web page resource is not in the preset protocol list, a selection prompt for whether to open the local application corresponding to the web page is displayed. And if the user selects to open the local application program, correspondingly, receiving a control command for opening the local application program corresponding to the webpage triggered according to the user selection prompt, and opening the local application program corresponding to the webpage. And if the user refuses to open the local application program, not opening the local application program.
Further, the user may select whether to open the local application according to the selection prompt, and the selection may be sent to the server, where the server may be used as a basis for updating the preset protocol list.
To sum up, according to the method for opening a local application program on a web page provided in the embodiment of the present application, when a web page resource is loaded from a server according to a web page opening request, a private protocol for opening the local application program corresponding to the web page is acquired from the web page resource. And judging whether the private protocol belongs to a white list or a black list of a preset protocol list. And if the local application program belongs to the white list, normally opening the local application program, and if the local application program belongs to the black list, not opening the local application program.
Third embodiment
An embodiment of the present application provides an apparatus 300 for opening a local application on a web page, please refer to fig. 6, where the apparatus 300 includes: the private protocol acquiring module 310 is configured to acquire a private protocol used for opening a local application corresponding to a webpage from a webpage resource when the webpage resource is loaded according to a webpage opening request; a determining module 320, configured to determine whether the private protocol is in a white list or a black list of a preset protocol list; the program opening module 330 is configured to open the local application program corresponding to the web page according to the private protocol if the private protocol is in the white list, and not open the local application program corresponding to the web page if the private protocol is in the black list.
Optionally, as shown in fig. 7, the apparatus 300 may further include: the prompt module 340 is configured to display a selection prompt indicating whether to open a local application corresponding to the web page if the private protocol is not in the preset protocol list; if a control command for opening the local application corresponding to the web page triggered according to the selection prompt is received, the program opening module 330 is configured to open the local application corresponding to the web page.
Further, as shown in fig. 7, the apparatus 300 may further include a list obtaining module 350, configured to obtain the preset protocol list from a server, where the preset protocol list is updated by the server according to an operation of whether a user opens a local application corresponding to a web page in the plurality of mobile terminals.
The list obtaining module 350 may obtain the latest preset protocol list from the server at preset intervals; or acquiring the latest preset protocol list from a server each time the browser is started.
Optionally, the list obtaining module 350 may further include: a request receiving unit, configured to receive a preset protocol list setting request; the display unit is used for displaying setting selection items corresponding to one or more local application programs according to the setting request, and the setting selection items comprise white list selection items and black list selection items; a setting receiving unit, configured to receive blacklist settings or white list settings for one or more local applications, which are determined according to the setting selection items; and the setting unit is used for adding the private protocol corresponding to the local application program set as the white list to the white list of the preset protocol list and adding the private protocol corresponding to the local application program set as the black list to the black list of the preset protocol list.
Fourth embodiment
An embodiment of the present application provides a mobile terminal 400, please refer to fig. 8, where the mobile terminal 400 includes a display screen 120, a memory 104, and a processor 102, the display screen 120 and the memory 104 are coupled to the processor 102, the display screen 120 is used for displaying a browser webpage and a native application, and the memory stores instructions, and when the instructions are executed by the processor 102, the processor 102 executes the above-mentioned method for opening the native application by the webpage.
Specifically, as shown in fig. 9, the mobile terminal 400 may include an electronic body 10, where the electronic body 10 includes a housing 12 and a display 120 disposed on the housing 12. The housing 12 may be made of metal, such as steel or aluminum alloy. In this embodiment, the display screen 120 generally includes a display panel 111, and may also include a circuit and the like for responding to a touch operation performed on the display panel 111. The Display panel 111 may be a Liquid Crystal Display (LCD) panel, and in some embodiments, the Display panel 111 is a touch screen 109. The web page content in this embodiment may be displayed on the display screen 120.
Referring to fig. 10, in an actual application scenario, the mobile terminal 400 may be used as a smartphone terminal, in which case the electronic body 10 generally further includes one or more processors 102 (only one is shown in the figure), a memory 104, an RF (Radio Frequency) module 106, an audio circuit 110, a sensor 114, an input module 118, and a power module 122. It will be understood by those skilled in the art that the structure shown in fig. 10 is merely illustrative and is not intended to limit the structure of the electronic body 10. For example, the electronics body section 10 may also include more or fewer components than shown in FIG. 10, or have a different correspondence than shown in FIG. 10.
Those skilled in the art will appreciate that all other components are peripheral devices with respect to the processor 102, and the processor 102 is coupled to the peripheral devices through a plurality of peripheral interfaces 124. The peripheral interface 124 may be implemented based on the following criteria: universal Asynchronous Receiver/Transmitter (UART), General Purpose Input/Output (GPIO), Serial Peripheral Interface (SPI), and Inter-Integrated Circuit (I2C), but the present invention is not limited to these standards. In some examples, the peripheral interface 124 may comprise only a bus; in other examples, the peripheral interface 124 may also include other elements, such as one or more controllers, for example, a display controller for interfacing with the display panel 111 or a memory controller for interfacing with a memory. These controllers may also be separate from the peripheral interface 124 and integrated within the processor 102 or a corresponding peripheral.
The memory 104 may be used to store software programs and modules, and the processor 102 executes various functional applications and data processing by executing the software programs and modules stored in the memory 104. The memory 104 may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid state memory. In some examples, the memory 104 may further include memory remotely located from the processor 102, which may be connected to the electronics body portion 10 or the display screen 120 via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The RF module 106 is configured to receive and transmit electromagnetic waves, and achieve interconversion between the electromagnetic waves and electrical signals, so as to communicate with a communication network or other devices. The RF module 106 may include various existing circuit elements for performing these functions, such as an antenna, a radio frequency transceiver, a digital signal processor, an encryption/decryption chip, a Subscriber Identity Module (SIM) card, memory, and so forth. The RF module 106 may communicate with various networks such as the internet, an intranet, a wireless network, or with other devices via a wireless network. The wireless network may comprise a cellular telephone network, a wireless local area network, or a metropolitan area network. The Wireless network may use various Communication standards, protocols, and technologies, including, but not limited to, Global System for Mobile Communication (GSM), Enhanced Mobile Communication (Enhanced Data GSM Environment, EDGE), wideband Code division multiple Access (W-CDMA), Code Division Multiple Access (CDMA), Time Division Multiple Access (TDMA), Wireless Fidelity (WiFi) (e.g., Institute of Electrical and Electronics Engineers (IEEE) standard IEEE 802.10A, IEEE802.11 b, IEEE802.1 g, and/or IEEE802.11 n), Voice over internet protocol (VoIP), world wide mail Access (Microwave for Wireless Communication), Wi-11 Wireless Access (wimax), and any other suitable protocol for instant messaging, and may even include those protocols that have not yet been developed.
The audio circuitry 110, speaker 101, microphone 103, microphone 105 collectively provide an audio interface between a user and the electronics body section 10 or the display screen 120.
The sensor 114 is disposed in the electronics body portion 10 or in the display screen 120, examples of the sensor 114 include, but are not limited to: acceleration sensor 114F, gyroscope 114G, magnetometer 114H, and other sensors.
In this embodiment, the input module 118 may include the touch screen 109 disposed on the display screen 120, and the touch screen 109 may collect a touch operation of the user (for example, an operation of the user on or near the touch screen 109 using any suitable object or accessory such as a finger, a stylus, etc.) on or near the touch screen 109, so that the touch gesture of the user may be obtained and the corresponding connection device may be driven according to a preset program, and thus, the user may select the target area through a touch operation on the display screen. Optionally, the touch screen 109 may include a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch detection device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 102, and can receive and execute commands sent by the processor 102. In addition, the touch detection function of the touch screen 109 may be implemented by various types, such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the touch screen 109, in other variations, the input module 118 may include other input devices, such as keys 107. The keys 107 may include, for example, character keys for inputting characters, and control keys for activating control functions. Examples of such control keys include a "back to home" key, a power on/off key, and the like.
The display screen 120 is used to display information input by the user, information provided to the user, and various graphic user interfaces of the electronic body section 10, which may be configured by graphics, text, icons, numbers, videos, and any combination thereof, such as search page information, search result information of a browser. In one example, the touch screen 109 may be disposed on the display panel 111 so as to be integral with the display panel 111.
The power module 122 is used to provide power supply to the processor 102 and other components. Specifically, the power module 122 may include a power management system, one or more power sources (e.g., batteries or ac power), a charging circuit, a power failure detection circuit, an inverter, a power status indicator light, and any other components associated with the generation, management, and distribution of power within the electronics body portion 10 or the display screen 120.
The mobile terminal 400 further comprises a locator 119, the locator 119 being configured to determine an actual location of the mobile terminal 400. In this embodiment, the locator 119 implements the positioning of the mobile terminal 400 by using a positioning service, which is understood to be a technology or a service for obtaining the position information (e.g., longitude and latitude coordinates) of the mobile terminal 400 by using a specific positioning technology and marking the position of the positioned object on an electronic map.
It should be understood that the above-described mobile terminal 400 is not limited to a smartphone terminal, but should refer to a computer device that can be used in mobility. Specifically, the mobile terminal 400 refers to a mobile computer device equipped with an intelligent operating system, and the mobile terminal 400 includes, but is not limited to, a smart phone, a smart watch, a tablet computer, and the like.
It should be noted that, in the present specification, the embodiments are all described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments may be referred to each other. For the device-like embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment. For any processing manner described in the method embodiment, all the processing manners may be implemented by corresponding processing modules in the apparatus embodiment, and details in the apparatus embodiment are not described again.
In the description herein, reference to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the application. In this specification, the schematic representations of the terms used above are not necessarily intended to refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction.
Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In the description of the present application, "plurality" means at least two, e.g., two, three, etc., unless specifically limited otherwise.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing specific logical functions or steps of the process, and the scope of the preferred embodiments of the present application includes other implementations in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the present application.
The logic and/or steps represented in the flowcharts or otherwise described herein, e.g., an ordered listing of executable instructions that can be considered to implement logical functions, can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of the computer-readable medium would include the following: an electrical connection (mobile terminal) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Additionally, the computer-readable medium could even be paper or another suitable medium upon which the program is printed, as the program can be electronically captured, via for instance optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner if necessary, and then stored in a computer memory.
It should be understood that portions of the present application may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
It will be understood by those skilled in the art that all or part of the steps carried by the method for implementing the above embodiments may be implemented by hardware related to instructions of a program, which may be stored in a computer readable storage medium, and when the program is executed, the program includes one or a combination of the steps of the method embodiments. In addition, functional units in the embodiments of the present application may be integrated into one processing module, or each unit may exist alone physically, or two or more units are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented in the form of a software functional module and sold or used as a stand-alone product, may also be stored in a computer readable storage medium.
The storage medium mentioned above may be a read-only memory, a magnetic or optical disk, etc. Although embodiments of the present application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present application, and that variations, modifications, substitutions and alterations may be made to the above embodiments by those of ordinary skill in the art within the scope of the present application.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit the same; although the present application has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not necessarily depart from the spirit and scope of the corresponding technical solutions in the embodiments of the present application.

Claims (10)

1. A method for opening a local application on a web page, the method comprising:
loading a webpage resource from a server according to a URL (uniform resource locator) of a webpage, rendering and analyzing the webpage resource by a browser kernel when the webpage resource is loaded, and acquiring a private protocol from parameters of an interface for downloading the resource from the browser kernel, wherein the private protocol is a protocol for opening a local application program corresponding to the webpage;
judging whether the private protocol is in a white list or a black list of a preset protocol list;
if the private protocol is in the white list, opening the local application program corresponding to the webpage according to the private protocol,
and if the private protocol is in the blacklist list, shielding the request for opening the local application program corresponding to the private protocol.
2. The method of claim 1, further comprising:
if the private protocol is not in the preset protocol list, displaying a selection prompt for whether to open a local application program corresponding to the webpage;
and if a control command for opening the local application program corresponding to the webpage triggered according to the selection prompt is received, opening the local application program corresponding to the webpage.
3. The method of claim 1, further comprising: acquiring the preset protocol list from a server, wherein the preset protocol list is updated by the server according to user operation, and the user operation is the operation of whether a local application program corresponding to a webpage is opened by a user in the plurality of mobile terminals, wherein if the user selects to open the local application program, a private protocol of the local application program opened by the webpage is added to a white list of the preset protocol list; and if the user refuses to open the local application program, adding the private protocol of the local application program opened by the webpage into a blacklist of a preset protocol list.
4. The method of claim 3, further comprising:
acquiring the latest preset protocol list from a server at preset time intervals; or
And acquiring the latest preset protocol list from the server every time the browser is started.
5. The method of claim 1, further comprising:
receiving a preset protocol list setting request;
displaying setting options corresponding to one or more local application programs according to the setting request, wherein the setting options comprise white list options and black list options;
receiving blacklist setting or white list setting determined according to the setting selection items, wherein the blacklist setting or the white list setting is set for one or more local application programs;
and adding the private protocol corresponding to the local application program set as the white list into a white list of a preset protocol list, and adding the private protocol corresponding to the local application program set as the black list into a black list of the preset protocol list.
6. An apparatus for opening a native application on a web page, the apparatus comprising:
the system comprises a private protocol acquisition module, a server and a browser kernel, wherein the private protocol acquisition module is used for loading webpage resources from the server according to the URL of a webpage, rendering and analyzing the webpage resources by the browser kernel when the webpage resources are loaded, and acquiring a private protocol from parameters of an interface for downloading the resources from the browser kernel, wherein the private protocol is a protocol for opening a local application program corresponding to the webpage;
the judging module is used for judging whether the private protocol is in a white list or a black list of a preset protocol list;
and the program opening module is used for opening the local application program corresponding to the webpage according to the private protocol if the private protocol is in a white list, and shielding the request for opening the local application program corresponding to the private protocol if the private protocol is in a black list.
7. The apparatus of claim 6, further comprising:
the prompting module is used for displaying a selection prompt for whether to open a local application program corresponding to the webpage if the private protocol is not in the preset protocol list;
and if a control command for opening the local application program corresponding to the webpage triggered according to the selection prompt is received, the program opening module is used for opening the local application program corresponding to the webpage.
8. The apparatus of claim 7, further comprising:
the list acquisition module is used for acquiring the preset protocol list from a server, wherein the preset protocol list is updated by the server according to user operation, the user operation is the operation of whether a local application program corresponding to a webpage is opened by a user in the plurality of mobile terminals, and if the user selects to open the local application program, a private protocol of the local application program opened by the webpage is added to a white list of the preset protocol list; and if the user refuses to open the local application program, adding the private protocol of the local application program opened by the webpage into a blacklist of a preset protocol list.
9. A mobile terminal comprising a display screen, a memory and a processor, the display screen and the memory coupled to the processor, the display screen for displaying a browser web page and a native application, the memory storing instructions that, when executed by the processor, the processor performs the method of any of claims 1 to 5.
10. A computer-readable storage medium having program code executable by a processor, the program code causing the processor to perform the method of any of claims 1 to 5.
CN201810055252.2A 2018-01-19 2018-01-19 Method and device for opening local application program on webpage and mobile terminal Active CN108256312B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810055252.2A CN108256312B (en) 2018-01-19 2018-01-19 Method and device for opening local application program on webpage and mobile terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810055252.2A CN108256312B (en) 2018-01-19 2018-01-19 Method and device for opening local application program on webpage and mobile terminal

Publications (2)

Publication Number Publication Date
CN108256312A CN108256312A (en) 2018-07-06
CN108256312B true CN108256312B (en) 2020-11-27

Family

ID=62741953

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810055252.2A Active CN108256312B (en) 2018-01-19 2018-01-19 Method and device for opening local application program on webpage and mobile terminal

Country Status (1)

Country Link
CN (1) CN108256312B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111273950B (en) * 2019-12-31 2023-03-21 百度国际科技(深圳)有限公司 Application awakening method and device, electronic equipment and computer readable storage medium
CN111726663A (en) * 2020-06-10 2020-09-29 海信视像科技股份有限公司 Display device and control method for establishing connection with display device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103425926A (en) * 2012-05-14 2013-12-04 腾讯科技(深圳)有限公司 Application program starting method, list configuring method, terminal and server
CN106528657A (en) * 2016-10-19 2017-03-22 广东欧珀移动通信有限公司 Control method and device for browser skipping to application program
CN107370740A (en) * 2017-07-28 2017-11-21 北京五八信息技术有限公司 Redirect hold-up interception method and device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103425926A (en) * 2012-05-14 2013-12-04 腾讯科技(深圳)有限公司 Application program starting method, list configuring method, terminal and server
CN106528657A (en) * 2016-10-19 2017-03-22 广东欧珀移动通信有限公司 Control method and device for browser skipping to application program
CN107370740A (en) * 2017-07-28 2017-11-21 北京五八信息技术有限公司 Redirect hold-up interception method and device

Also Published As

Publication number Publication date
CN108256312A (en) 2018-07-06

Similar Documents

Publication Publication Date Title
US11444895B2 (en) Session message sticking method and device
CN108712561B (en) Authority management method, device, mobile terminal and storage medium
CN108021642B (en) Application program recommendation method and device, mobile terminal and storage medium
CN109857403B (en) Page updating method and device, page processing method and device
CN106775828B (en) Application program installation method and device and computer equipment
CN108255683B (en) Method for prompting message in terminal and terminal
CN106775827B (en) Application program updating method and device and computer equipment
US10474507B2 (en) Terminal application process management method and apparatus
CN108037990B (en) Task information processing method and device and server
CN108536415B (en) Application volume control method and device, mobile terminal and computer readable medium
CN108197264B (en) Webpage acceleration display method and device, mobile terminal and storage medium
CN106713608B (en) Application function state modification method and device and terminal
CN110557499B (en) Information processing method and device and mobile terminal
CN110221882B (en) Display method, display device, mobile terminal and storage medium
CN107896256B (en) Information pushing method and device, mobile terminal, server and readable storage medium
CN108256312B (en) Method and device for opening local application program on webpage and mobile terminal
CN106095423B (en) Method, terminal and server for providing browsing service
CN108647070B (en) Information reminding method and device, mobile terminal and computer readable medium
CN112749074A (en) Test case recommendation method and device
CN110221736B (en) Icon processing method and device, mobile terminal and storage medium
CN107819938B (en) Corner mark configuration method and device, mobile terminal and server
CN108881969B (en) Method and device for drawing bullet screen and mobile terminal
CN107463395B (en) Component calling method and device
CN108509509B (en) Webpage display method and device, mobile terminal and storage medium
CN107930126B (en) Game reservation data processing method and device and mobile terminal

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
CB02 Change of applicant information
CB02 Change of applicant information

Address after: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Applicant after: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

Address before: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Applicant before: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

GR01 Patent grant
GR01 Patent grant