Android open Taobao client (hand Amoy) effect and implementation code

We won't talk about the methods of implicit call. If you install the SDK or Alibaba Baichuan, please refer to the official documents. These are not a problem.

1、 Open in app

The application calls Taobao internally. When the "recently running application" is displayed, only one application will be displayed, provided that the Taobao client is installed.

design sketch:

First, determine whether the application is installed:

Open the product details page:

After opening Taobao in the application, directly clicking the internal button will directly open external Taobao.

2、 Application external open

Opening an application externally refers to directly arousing the Taobao client and displaying the corresponding page. When displaying the "recently running application", the current application and Taobao client will be displayed.

design sketch:

First, determine whether the application is installed:

Open store:

At this time, the URL prefix must be "Taobao: / /", not "HTTPS: / /", otherwise the effect will not be achieved. Some cases on the Internet should add the following sentence:

Originally, this is easy to use, but when I use it, it will show "the store does not exist". Later, I found that I don't need this. I can directly specify the URL prefix as "Taobao: / /", and this sentence will show that the store does not exist. In fact, you open Taobao, enter the ADB shell in as, and enter dumpsys activity activities, You can still see shophomepageactivity, but it can't achieve the effect we want.

In addition, you can also open a new interface by specifying flag:

summary

The above is the effect and implementation code of Android opening Taobao client (hand Amoy) introduced by Xiaobian. I hope it will help you. If you have any questions, please leave me a message and Xiaobian will reply to you in time. Thank you very much for your support for the programming tips website!

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>