如在短信中点击http://m.klxhb.com/Deals/Detail/96这个连接地址,可以选择在应用中打开
1应用的配置文件中要做如下配置:
<activity            android:name="com.xmt.app.demo.MainActivity"            android:label="@string/app_name" >            <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" />                <category android:name="android.intent.category.DEFAULT" />                <category android:name="android.intent.category.BROWSABLE" />                <data                    android:host="m.klxhb.com"                    android:pathPrefix="/Deals/Detail"                    android:scheme="http" />            </intent-filter>        </activity>

2在MainActivity的onCreate中,加入判断
String url = getIntent().getDataString();if (url != null && url.contains("Deals/Detail")){Xmt.toDeal(MainActivity.this, mUserInfo, url);}

更多相关文章

  1. android小功能实现之发送短信
  2. androidのMMS短信发送过程(二)
  3. Android实现发送短信
  4. Android邮件地址正则表达式
  5. android 定时发送短信
  6. 短信拦截的解决方案 经典

随机推荐

  1. android breakpad
  2. view的clickable属性和点击background颜
  3. android testing (一)
  4. Android添加依赖recycleview错误
  5. Ionic2 在Android设备上的部署
  6. Android倒计时CountDownTimer小记
  7. [Android]去除程序中广告的好方法:告诉广
  8. Android消息处理机制——AsyncTask 源码
  9. Android基于Cling开发DLNA应用
  10. ListView的优化就这么多了