Android 打开URL
生活随笔
收集整理的這篇文章主要介紹了
Android 打开URL
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
打開鏈接
? ? ? ? Intent it = new Intent(Intent.ACTION_VIEW, Uri.parse("http://www.baidu.com"));it.setClassName("com.android.browser", "com.android.browser.BrowserActivity");getContext().startActivity(it);
打開本地網(wǎng)頁
Intent intent=new Intent(); intent.setAction("android.intent.action.VIEW"); Uri CONTENT_URI_BROWSERS = Uri.parse("content://com.android.htmlfileprovider/sdcard/123.html"); intent.setData(CONTENT_URI_BROWSERS); intent.setClassName("com.android.browser", "com.android.browser.BrowserActivity"); startActivity(intent);總結
以上是生活随笔為你收集整理的Android 打开URL的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Un-Routed Net ConStr
- 下一篇: mysql+sqlplus命令找不到_S