gddhy

_(:з」∠)_ 加载中...
  • 主页
  • 归档
  • 工具
  • 关于
所有文章 友链

gddhy

_(:з」∠)_ 加载中...

  • 主页
  • 归档
  • 工具
  • 关于

调用内置浏览器打开

2021-01-05
字数统计:187字 阅读时长≈1分

微信(需要root)

1
am start -n com.tencent.mm/com.tencent.mm.plugin.webview.ui.tools.WebViewUI -a android.intent.action.VIEW -d https://baidu.com

命令来自酷安应用WeView

跳转微信内置浏览器

1
2
3
4
5
6
7
8
9
10
11
public static boolean openWithWeChat(String url){
try{
Runtime.getRuntime().exec("su -c " +
"am start -n com.tencent.mm/com.tencent.mm.plugin.webview.ui.tools.WebViewUI -a" +
" android.intent.action.VIEW -d " + url);
return true;
} catch (IOException e) {
e.printStackTrace();
return false;
}
}

跳转支付宝内置浏览器

1
2
3
4
5
6
7
8
9
10
11
12
public static boolean openWithAlipay(Context context, String url){
String data = "intent://platformapi/startapp?saId=10000007&" +
"qrcode=" + Uri.encode(url) +
"#Intent;" + "scheme=alipayqr;package=com.eg.android.AlipayGphone;end";
try{
context.startActivity(Intent.parseUri(data, Intent.URI_INTENT_SCHEME));
return true;
} catch (Exception e) {
e.printStackTrace() ;
return false;
}
}

来自https://github.com/ekibun/OpenInApp

简单打包了两个apk 用支付宝打开.apk | 用微信打开.apk (需要root)

赏

谢谢你请我吃糖果

微信

扫一扫,分享到微信

微信分享二维码
Hexo不渲染指定文件
安卓版本与API对照
目录,不存在的…
留言已关闭
:gddhy
© gddhy
Hexo Theme Yilia by Litten
  • 所有文章
  • 友链

tag:

  • Android
  • 软件分享
  • game
  • Hexo
  • JavaScript
  • 旧机博物馆
  • MIUI
  • Java
  • git
  • Termux
  • mtk
  • 原神
  • Win
  • Html
  • 安卓学习笔记

    缺失模块

  • Luminous' Home
  • 影子博客
  • 四次元领域
  • 初之音
  • Mr.Pumpkin
  • ZhaoQuinn 's Blog