Android 浏览器自定义scheme:market://协议
2013-09-09 20:24
369 查看
目前的浏览器中,自定义schemed的有UC,还有FireFox。大部分的浏览器没做这个点,因为这个点实际使用的时候确实意义不大。
原生的android 浏览器要做自定义sheme,要处理2个问题,一个就是在url的地址栏中输入类似:market://details?id=com.tencent.mobileqq 这样的链接,然后就可以调起系统中的应用市场,比如Google play,豌豆家。。。等。还有就是当在网页中点击这样的链接的时候,也可以有同样的效果。
具体的不多说了,保留一些有用的链接如下:
1.百度测试market协议的链接,挺好
http://appstest.baidu.com/market/index.xhtml
2.第一个看到有关于market协议的资料
http://zhanhao.iteye.com/blog/1415462
3.Google的官方文档,不是很全
http://developer.android.com/distribute/googleplay/promote/linking.html#android-app
4.基础,有必要看看
http://blog.csdn.net/dyllove98/article/details/9968751 http://www.eoeandroid.com/forum.php?mod=viewthread&tid=234813
http://stackoverflow.com/questions/10316944/accurate-market-search-via-intent
http://stackoverflow.com/questions/3133650/android-intent-to-open-users-preferred-browser
http://bbs.gfan.com/forum.php?mod=viewthread&tid=349494
http://moto0421.iteye.com/blog/1030350
http://blog.csdn.net/hundsong/article/details/6623500
http://developer.android.com/guide/topics/manifest/data-element.html#mime
details
market://details?id=com.tencent.mobileqq
http://market
http://market.android.com/details?id=com.tencent.mobileqq
http://bbs.gfan.com/forum.php?mod=viewthread&tid=349494
market://search
market://search?q=pname:com.tencent.mobileqq
market://search?q=pname:com.skyd.luckywheel
market://details?id=com.skyd.luckywheel
http://blog.moa.cse.tw/2012/05/androidandroid-app-openurl.html http://www.dotblogs.com.tw/pou/archive/2012/01/01/64089.aspx
下面是测试的时候用的:
http://www.riaspace.com/2011/08/defining-custom-url-schemes-for-your-air-mobile-applications/
https://docs.google.com/document/d/1H255a9QacH06Z9-239xAOEixbR967RmLu7-o0siRaJg/edit?pli=1
https://groups.google.com/forum/#!topic/android-developers/-hkq8-S5-Gs
http://bbs.9ria.com/thread-153303-1-1.html
http://www.pocketdigi.com/20101002/117.html
http://stackoverflow.com/questions/7876163/custom-url-scheme-android
http://code.google.com/p/oauth-php/issues/detail?id=55
http://blog.csdn.net/favormm/article/details/6623490
http://www.bangchui.org/read.php?tid=41179
http://www.blogjava.net/Inn-Gry/archive/2011/10/07/360135.html
https://support.tapatalk.com/threads/implement-intent-filters-and-custom-url-schemes.17100/
http://comments.gmane.org/gmane.comp.handhelds.android.devel/152369
https://begood.good.com/thread/4113
https://www.ibm.com/developerworks/community/forums/html/topic?id=77777777-0000-0000-0000-000014956126
http://developer.appcelerator.com/question/120393/custom-url-scheme---iphone--android
http://blog.csdn.net/hundsong/article/details/6614764
http://www.dotblogs.com.tw/pou/archive/2012/01/01/64089.aspx
http://www.bjguahao.gov.cn/comm/content.php?hpid=113&keid=1030001&haoscore=web&getyear=2013&getmonth=10
原生的android 浏览器要做自定义sheme,要处理2个问题,一个就是在url的地址栏中输入类似:market://details?id=com.tencent.mobileqq 这样的链接,然后就可以调起系统中的应用市场,比如Google play,豌豆家。。。等。还有就是当在网页中点击这样的链接的时候,也可以有同样的效果。
具体的不多说了,保留一些有用的链接如下:
1.百度测试market协议的链接,挺好
http://appstest.baidu.com/market/index.xhtml
2.第一个看到有关于market协议的资料
http://zhanhao.iteye.com/blog/1415462
3.Google的官方文档,不是很全
http://developer.android.com/distribute/googleplay/promote/linking.html#android-app
4.基础,有必要看看
http://blog.csdn.net/dyllove98/article/details/9968751 http://www.eoeandroid.com/forum.php?mod=viewthread&tid=234813
http://stackoverflow.com/questions/10316944/accurate-market-search-via-intent
http://stackoverflow.com/questions/3133650/android-intent-to-open-users-preferred-browser
http://bbs.gfan.com/forum.php?mod=viewthread&tid=349494
http://moto0421.iteye.com/blog/1030350
http://blog.csdn.net/hundsong/article/details/6623500
http://developer.android.com/guide/topics/manifest/data-element.html#mime
details
market://details?id=com.tencent.mobileqq
http://market
http://market.android.com/details?id=com.tencent.mobileqq
http://bbs.gfan.com/forum.php?mod=viewthread&tid=349494
market://search
market://search?q=pname:com.tencent.mobileqq
market://search?q=pname:com.skyd.luckywheel
market://details?id=com.skyd.luckywheel
http://blog.moa.cse.tw/2012/05/androidandroid-app-openurl.html http://www.dotblogs.com.tw/pou/archive/2012/01/01/64089.aspx
下面是测试的时候用的:
// ------------- // String url = null; // final String myaction = intent.getAction(); // if (Intent.ACTION_SEARCH.equals(myaction)) { // url = intent.getStringExtra(SearchManager.QUERY); // Log.i("tag", "url = " + intent.getStringExtra(SearchManager.QUERY)); // // if (url.contains("market")) { // Log.i("tag", "xxx url contains market"); // // 测试跳到APP详情页面 // Intent intent3 = new Intent(); // intent3.setAction(Intent.ACTION_VIEW); // // Make sure the intent goes to the Browser itself // intent3.setPackage(mActivity.getPackageName()); // intent3.addCategory(Intent.CATEGORY_DEFAULT); // // String url = "market://details?id=com.tencent.mobileqq"; // Uri uri3 = Uri.parse(url); // intent3.setData(uri3); // // intent3.setClassName("com.xiaomi.market", "com.xiaomi.market.ui.AppDetailActivity"); // mActivity.startActivity(intent3); // return; // } // } Log.i("tag", "3333333 url = " + url.toString()); if (url.contains("market")) { Log.i("tag", "url contains market"); // 测试跳到APP详情页面 Intent intent3 = new Intent(); intent3.setAction(Intent.ACTION_VIEW); Uri uri3 = Uri.parse(url); intent3.setData(uri3); // intent3.setClassName("com.xiaomi.market", "com.xiaomi.market.ui.AppDetailActivity"); activity.startActivity(intent3); return false; }
// 测试跳到APP详情页面 // Intent intent3 = new Intent(); // intent3.setAction(Intent.ACTION_VIEW); // String url = "market://details?id=com.tencent.mobileqq"; // Uri uri3 = Uri.parse(url); // intent3.setData(uri3); // intent3.setClassName("com.xiaomi.market", "com.xiaomi.market.ui.AppDetailActivity"); // mActivity.startActivity(intent3); // 测试跳到APP搜索结果页面 // Intent intent2 = new Intent(); // intent2.setAction(Intent.ACTION_VIEW); // String url = "market://search?q=pname:com.tencent.mobileqq"; // Uri uri3 = Uri.parse(url); // intent2.setData(uri3); // intent2.setClassName("com.xiaomi.market", "com.xiaomi.market.ui.JoinActivity"); // mActivity.startActivity(intent2);
http://www.riaspace.com/2011/08/defining-custom-url-schemes-for-your-air-mobile-applications/
https://docs.google.com/document/d/1H255a9QacH06Z9-239xAOEixbR967RmLu7-o0siRaJg/edit?pli=1
https://groups.google.com/forum/#!topic/android-developers/-hkq8-S5-Gs
http://bbs.9ria.com/thread-153303-1-1.html
http://www.pocketdigi.com/20101002/117.html
http://stackoverflow.com/questions/7876163/custom-url-scheme-android
http://code.google.com/p/oauth-php/issues/detail?id=55
http://blog.csdn.net/favormm/article/details/6623490
http://www.bangchui.org/read.php?tid=41179
http://www.blogjava.net/Inn-Gry/archive/2011/10/07/360135.html
https://support.tapatalk.com/threads/implement-intent-filters-and-custom-url-schemes.17100/
http://comments.gmane.org/gmane.comp.handhelds.android.devel/152369
https://begood.good.com/thread/4113
https://www.ibm.com/developerworks/community/forums/html/topic?id=77777777-0000-0000-0000-000014956126
http://developer.appcelerator.com/question/120393/custom-url-scheme---iphone--android
http://blog.csdn.net/hundsong/article/details/6614764
http://www.dotblogs.com.tw/pou/archive/2012/01/01/64089.aspx
http://www.bjguahao.gov.cn/comm/content.php?hpid=113&keid=1030001&haoscore=web&getyear=2013&getmonth=10
相关文章推荐
- 浅谈浏览器插件检测 和自定义协议的支持
- 安卓学习笔记---使用浏览器打开app指定协议(Url Scheme)
- Android中Scheme跳转协议
- 基于Java Socket的自定义协议,实现Android与服务器的长连接(一)
- Android自定义URL使用Scheme方式唤起Activity或App
- Android 蓝牙通信及自定义消息协议的解析和生成
- android 默认浏览器 无法下载,此手机不支持此内容(自定义文件or APK文件看过了)
- Android网页中tel,sms,mailTo,Intent,Market协议用法总结
- 基于Java Socket的自定义协议,实现Android与服务器的长连接(二)
- C# 新建 exe文件,并且自定义协议从浏览器中启动该程序
- Android自定义URL使用Scheme方式唤起Activity或App
- Android自定义URL使用Scheme方式唤起Activity或App
- android ios 在浏览器中自定义URL
- Android自定义浏览器选择本地文件上传问题
- 自定义浏览器协议,实现web程序调用本地程序
- 仿迅雷客户端的浏览器自定义协议的小程序
- 仿迅雷客户端的浏览器自定义协议的小程序
- 【Android界面实现】自定义Gallery控件实现简单3D图片浏览器
- android H5 应用内跳转Scheme协议
- Android 浏览网页:WebView 嵌入浏览器(浏览历史返回、自定义加载失败界面、支持缩放、获取标题栏)