6

I'm trying to select a url from a card to be opened by the glass browser. Is there a way to set or invoke this?

The Card API for 'getting a uri' from my examination is for rendering images. https://developers.google.com/glass/develop/gdk/reference/com/google/android/glass/app/Card#getImage(int)

StanleyZheng
  • 4,008
  • 3
  • 21
  • 24

1 Answers1

6

You can open a URL in the built-in browser by starting an activity with an ACTION_VIEW intent. For example:

String url = "http://www.whatever.com";
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setData(Uri.parse(url));
startActivity(intent);
Tony Allevato
  • 6,429
  • 1
  • 29
  • 34