我正在尝试从要由玻璃浏览器打开的卡片中选择一个URL。有没有设置或调用此方法的方法?
从我的考试中“获取uri”的Card API用于渲染图像。
https://developers.google.com/glass/develop/gdk/reference/com/google/android/glass/app/Card#getImage(int)
最佳答案
您可以通过使用ACTION_VIEW
意图启动 Activity 来在内置浏览器中打开URL。例如:
String url = "http://www.whatever.com";
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setData(Uri.parse(url));
startActivity(intent);