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)
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);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With