Closed GoogleCodeExporter closed 8 years ago
Hello,
Setting an image file in a Card should just work as long as the URI has a
"file://" scheme. One issue that might be occurring in your use-case would be
that the full image taken by the Camera is too big to be loaded onto a Card
(check the logs for warnings): make sure to resize the image to an appropriate
size (640x360px should do it).
Best,
Alain
Original comment by ala...@google.com
on 6 Jan 2014 at 9:27
That was my problem -- I needed to scale the bitmap to 640x360 or less before
adding it to a card.
Incidentally, one thing that threw me off was the fact that the API
documentation for Card.addImage states:
public Card addImage (Uri uri)
Adds an image defined by an Uri to card. Supported schemes are: android.resource file
This in combination with the fact that my image didn't show up led me to the
tentative conclusion that only resource files were allowed on timeline cards.
For other developers, it might make sense to update the documentation
(https://developers.google.com/glass/develop/gdk/reference/com/google/android/gl
ass/app/Card#addImage(android.net.Uri)) to reflect both the 640x360 limitation,
and to remove the erroneous "Supported schemes are: android.resource file"
statement.
Original comment by josephba...@gmail.com
on 7 Jan 2014 at 3:36
Oh, this seems to be an issue with how the Javadocs got generated into HTML,
the doc should be read as: Suppored schemes are: "android.resource" and "file";
meaning that an URI that has a scheme of "android.resource://" or "file://"
will work.
We will update the docs to remove the confusion.
Original comment by ala...@google.com
on 7 Jan 2014 at 4:55
Original issue reported on code.google.com by
josephba...@gmail.com
on 3 Jan 2014 at 9:42