ResultHandler.java 文件源码

java
阅读 40 收藏 0 点赞 0 评论 0

项目:tvConnect_android 作者:
final void openURL(String url) {
  // Strangely, some Android browsers don't seem to register to handle HTTP:// or HTTPS://.
  // Lower-case these as it should always be OK to lower-case these schemes.
  if (url.startsWith("HTTP://")) {
    url = "http" + url.substring(4);
  } else if (url.startsWith("HTTPS://")) {
    url = "https" + url.substring(5);
  }
  Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
  try {
    launchIntent(intent);
  } catch (ActivityNotFoundException ignored) {
    Log.w(TAG, "Nothing available to handle " + intent);
  }
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号