Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Adding Card images throws exception for HTTP and HTTPS resource schemes

Doing some HTTPS json calls in glass with the GDK, so far so good. Tried to set a card to one of the returned https urls using this code:

Uri uri = Uri.parse(url);
card.addImage(uri);

A strange exception occurred, seemingly implying that glass doesn't support HTTPS?

ERROR/AndroidRuntime(14507): FATAL EXCEPTION: main
java.lang.IllegalArgumentException: unsupported image scheme: https
at com.google.android.glass.app.Card.addImage(Card.java:178)

I've tried the same thing with HTTP images, and receive an "unsupported image scheme: http" error.

How am I supposed to load images with the GDK? Is there some API usage I'm missing?

like image 263
johnarleyburns Avatar asked Nov 22 '25 16:11

johnarleyburns


1 Answers

Based on this Stack Overflow response [1] posted Jan. 16, 2014 it seems this is not yet supported and the only supported schemes for the Card builder class are file and android.resource.

There is a feature request [2] for tracking support for web images in the Card builder class.

[1] GoogleGlass : Add image in background : unsupported image scheme: http
[2] https://code.google.com/p/google-glass-api/issues/detail?id=299

like image 143
tw1742 Avatar answered Nov 25 '25 10:11

tw1742