From 7f0825f8195a522ed7e8bcdb6347f3a719e06c74 Mon Sep 17 00:00:00 2001
From: admin <weikou2014>
Date: 星期一, 16 六月 2025 15:29:44 +0800
Subject: [PATCH] 新版穿山甲接入/拦截应用宝链接跳转至应用市场

---
 BuWanVideo/src/com/weikou/beibeivideo/ui/video/VideoPlayerBrowserActivity.java |   29 +++++++++++++++++++++++++++++
 1 files changed, 29 insertions(+), 0 deletions(-)

diff --git a/BuWanVideo/src/com/weikou/beibeivideo/ui/video/VideoPlayerBrowserActivity.java b/BuWanVideo/src/com/weikou/beibeivideo/ui/video/VideoPlayerBrowserActivity.java
index d18af86..59c97ef 100644
--- a/BuWanVideo/src/com/weikou/beibeivideo/ui/video/VideoPlayerBrowserActivity.java
+++ b/BuWanVideo/src/com/weikou/beibeivideo/ui/video/VideoPlayerBrowserActivity.java
@@ -53,6 +53,7 @@
 import com.weikou.beibeivideo.util.ui.TopStatusSettings;
 import com.yeshi.video.player.util.PlayerFullScreenUtil;
 
+import java.net.URI;
 import java.util.Set;
 
 public class VideoPlayerBrowserActivity extends BaseActivity implements OnClickListener {
@@ -186,6 +187,7 @@
                     prefixSet.add("iqiyi://");
                     prefixSet.add("youku://");
                     prefixSet.add("imgotv://");
+                    prefixSet.add("txvideo://");
 
                     for (String prefix : prefixSet) {
                         if (url.startsWith(prefix)) {
@@ -199,6 +201,33 @@
                     }
                     return true;
                 }
+                else if (url.contains("/a.app.qq.com/")&&url.contains("com.qiyi.video")) {
+                    Uri uri =   Uri.parse(url);
+                    if(uri!=null) {
+                        String packageName = uri.getQueryParameter("pkgname");
+                        if(packageName==null){
+                            return false;
+                        }
+                        runOnUiThread(new Runnable() {
+                            @Override
+                            public void run() {
+                                Toast.makeText(VideoPlayerBrowserActivity.this, "姝e湪鎵撳紑搴旂敤甯傚満...", Toast.LENGTH_SHORT).show();
+                            }
+                        });
+
+                        try {
+                            // 浼樺厛灏濊瘯Google Play
+                            startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id=" + packageName)));
+                        } catch (ActivityNotFoundException e) {
+                            // 濡傛灉Google Play涓嶅瓨鍦紝灏濊瘯鍏朵粬甯傚満
+                            try {
+                                startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("amzn://apps/android?p=" + packageName)));
+                            } catch (ActivityNotFoundException e2) {
+                            }
+                        }
+                        return true;
+                    }
+                }
 
 
                 return super.shouldOverrideUrlLoading(view, request);

--
Gitblit v1.8.0