How would I create a drawable from a URL? I'm using Flow's Net class mentioned below (https://github.com/HipByte/Flow). I'm pretty new to RubyMotion and Flow, but have a reasonable understanding of android and java.
I'm trying something like this:
Net.get(source) do |response|
image = response.body
stream = Java::Io::ByteArrayInputStream.new(image.bytes.to_a)
drawable = Android::Graphics::Drawable::Drawable.createFromStream(stream,"name")
Drawable seems to always be nil, while all the proceeding steps at least do something.
I would prefer a cross platform solution, but the ios version of my code is working so I'd settle for a platform specific way to do it in android