Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the solutions for H5 to open APP

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

This article mainly explains "what are the plans for H5 to open APP". The content in the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "what are the plans for H5 to open APP"?

1. A scheme that evokes APP

As shown in the figure below, there are three main channels to open APP: traffic APP encapsulation channel, native open channel and some tricks.

1.1 Traffic APP encapsulation channel

In order to ensure that traffic is not lost, traffic entrances such as Wechat, Mobile QQ and Weibo block and encapsulate the original arousal schemes of iOS and Android. In these APP, it is not effective to use the native call APP scheme, and only their scheme or the APP on the whitelist can call the APP through H5.

1.1.1 Wechat

Wechat evokes that the APP scheme was originally WXJSBridge and later changed to WXJS-SDK. At this point, someone may be about to say, you are talking nonsense, I don't see any corresponding interface on JS-SDK for calling APP. In fact, there are all these interfaces about APP, but they are not written in the document.

To use Wechat's evocation APP scheme, you need two things:

Clearly know the interface that invokes APP

The APP to be aroused is on Wechat's whitelist.

So for third-party APP, you can't use it even if you know the name of the interface.

The essential implementation of JS-SDK and JSBridge is the same, but JS-SDK also requires users to cache a jsapi_ticket globally in their own backend. If Tencent simply wants to do the logic to evoke APP, it is undoubtedly a fast and good way to use JSBridge directly.

1.1.2 Mobile QQ

Mobile QQ, like Wechat, also encapsulates the evocation APP and has whitelist restrictions, so only Tencent APP can be used.

However, in Wechat, it is not possible to arouse Tencent APP to use schema, but for opening Tencent APP on Mobile QQ, you can choose to use schema instead of Mobile QQ's encapsulation scheme MPP.

In addition, there is something wrong with Mobile QQ's MPP method of evoking APP and passing parameters, and the documentation is not perfect, so it is really not as good as using schema directly.

1.1.3 other traffic APP

Mainly refers to Weibo, mobile Baidu and other APP, should also be the way to open the whitelist, not usually used, here do not repeat.

two。 Primary channel

2.1 Schema

Schema is an in-page jump protocol, which is mainly composed of the following parts [1]

Behavior (a function of the application) | scheme:// [path] [? query] | | parameters required by the application identification function

But after Chrome25, after iOS9, Android and iOS natively no longer support this protocol, and instead turn to the new schemes App Link and Universal Link.

In contrast to this scheme, Schema cannot determine whether the APP was opened successfully, so it cannot do some processing for not opening the APP (this can only be achieved by hack, by determining whether the page is visible or not). However, Schema now has good support on all major mobile browsers except native browsers (such as QQ Browser, Chrome browser, etc.), and using schema does not require additional processing on the client, so it is possible to do some simple logic.

2.2 Universal Link

Universal Link is a seamless link between APP and Web developed by iOS. When visiting a link, if APP is installed, jump directly to the appropriate page of APP, and if APP is not installed, jump to the appropriate H5 page. However, we can use this feature to evoke APP.

Universal Link has several drawbacks:

The APP to be aroused should be supported accordingly.

The current page and evoked domain name must be cross-domain.

Must be Https

2.3 APP Link

The original intention of APP Link is the same as that of Universal Link, which is to provide users with a seamless user experience-jump to APP if you install APP and jump to the corresponding page without installing APP, so we can also use it to evoke APP. Similarly, it also needs to be set up by APP.

However, APP Link is a solution provided on Android, which differs from Universal Link in that it does not need to use the https protocol

3. Other channels

3.1 YingYongBao Channel

YingYongBao channel is YingYongBao's behavior that borrows the ability of her own Tencent APP to use her authority to help other APP evoke on Wechat in exchange for other promotion resources.

However, this scheme has been blocked by Wechat. So at present, as a third-party APP, there is no way to evoke on Wechat.

Thank you for your reading, the above is the content of "what is the scheme for H5 to open APP". After the study of this article, I believe you have a deeper understanding of what is the scheme for H5 to open APP, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report