Uri myUri = Uri.parse("http://stackoverflow.com");
下面是如何在隐式意图中使用新创建的Uri的示例。在用户手机上的浏览器中查看。
// Creates a new Implicit Intent, passing in our Uri as the second paramater.
Intent webIntent = new Intent(Intent.ACTION_VIEW, myUri);
// Checks to see if there is an Activity capable of handling the intent
if (webIntent.resolveActivity(getPackageManager()) != null){
startActivity(webIntent);
}