在对应的应用程序的AndroidManifest.xml中配置:

<activity            android:name=".ui.TabHostActivity"            android:windowSoftInputMode="stateHidden|stateAlwaysHidden|adjustPan"            android:launchMode="singleTop"            android:screenOrientation="nosensor" >            <intent-filter>                <action android:name="android.intent.action.MAIN" />                <category android:name="android.intent.category.LAUNCHER" />            </intent-filter>                        <intent-filter> <!-- --> <action android:name="android.intent.action.VIEW"></action> <category android:name="android.intent.category.DEFAULT"></category> <category android:name="android.intent.category.BROWSABLE"></category> <data android:host="www.kuyue.com" android:scheme="kuyue"></data> <!-- --> </intent-filter>                    </activity>

网页代码:

<a href="kuyue://www.kuyue.com">open</a>

1 .MAC终端查看本机ip: ifconfig | grep inet 2 . 终端下开一个简单服务器,适用于mac: python -m SimpleHTTPServer 可以把带有上面网页代码的Html放进一个文件中,再在终端定位到该文件夹,输入2的命令开一个简单的服务器用于测试,测试的时候记住第三方的浏览器有可能不能正确调用本地程序,请用android自带浏览器进行设置。


*** 颜色的代码都可以自定义,但必须是一一对应的。

微信检测:
微信在打开网页的时候会在你的正确地址后面加上带一个isappinstalled=1 (1是表示有该应用,0表示没有 可能 没有也会没有这个参数)

更多相关文章

  1. Android版本号对应API、版本名称、NDK版本等
  2. gradle 配置文件 build.gradle 属性详解
  3. 阻止android软键盘自动弹出
  4. Android版本和API Level对应关系
  5. android之应用程序退到android桌面的实现
  6. android自带的drawable图标ico名称对应表
  7. android process bar 几种style
  8. Android实现九宫格
  9. android makefile prebuild

随机推荐

  1. flash如何自动连接mysql数据库
  2. Windows下重置MySQL密码【MYSQL】
  3. MySQL5.7完全卸载
  4. MySQL数据导入到infobright中
  5. MySQL在C++中使用后务必释放 result,否则
  6. 利用keepalived构建高可用MySQL-HA
  7. MySQL表格查询基本语句2
  8. 组织这种结构的最佳方式?
  9. mysql添加外键语句
  10. lucene 4.10 检索mysql数据库