Transfer a bitmap

Hi,

how do I transfer a bitmap from an Android / iOS app to the app running on the watch?

Thanks for any help!
  • Unless you write an Android/iOS companion app, you don't. The only thing you can do is download an image with the makeImageRequest() method. Note that neither of these options are possible from a watch face or data field.
  • Unless you write an Android/iOS companion app, you don't. The only thing you can do is download an image with the makeImageRequest() method. Note that neither of these options are possible from a watch face or data field.


    Hi Travis, thanks for the reply!

    I am writing a companion app, where I generate a bitmap image. I want to transfer it to the watch and display it. How do I do it?
  • Argh! I have led you astray. The only thing I see that you can do is transmit data via Comm.transmit(), but once you do that there isn't any way to generate something that can be displayed. There is no way that I see to generate or receive a bitmap on the device side except for makeImageRequest().

    Maybe the Garmin folks could chime in. I suppose it might be possible to call makeImageRequest() from the device to very simple web server running on on the phone, but I'm just making stuff up as I go now.. :(

    Travis
  • Argh! I have led you astray. The only thing I see that you can do is transmit data via Comm.transmit(), but once you do that there isn't any way to generate something that can be displayed. There is no way that I see to generate or receive a bitmap on the device side except for makeImageRequest().

    Maybe the Garmin folks could chime in. I suppose it might be possible to call makeImageRequest() from the device to very simple web server running on on the phone, but I'm just making stuff up as I go now.. :(

    Travis


    That's a pity :-(

    The way to go would be to have a method to load the bitmap from a byte array in Monkey C. That array should be possible to transfer via the Comm.transmit method you are mentioning...
  • Argh! I have led you astray. The only thing I see that you can do is transmit data via Comm.transmit(), but once you do that there isn't any way to generate something that can be displayed. There is no way that I see to generate or receive a bitmap on the device side except for makeImageRequest().

    Maybe the Garmin folks could chime in. I suppose it might be possible to call makeImageRequest() from the device to very simple web server running on on the phone, but I'm just making stuff up as I go now.. :(

    Travis



    That's a pity... :-(

    It should be simple to load a bitmap from a byte array in Monkey C, that is a crucial part that is missing.
  • Former Member
    Former Member over 8 years ago
    Yeah, you're not missing anything here. At this time, the only way to get an external image into a ConnectIQ app is with makeImageRequest(). It isn't possible to send them over from a partner app with Comm.transmit().

    I'm not sure building a bitmap on the device from a byte array is something we will be able to include because the images have to be converted into a device format, and doing that conversion natively on the device might not be something we can integrate. I don't think there are any technical limitations to doing that conversion in the phone SDKs, and being able to send them to the device using Comm.transmit, so I will put a feature request ticket in for that.
  • Yeah, you're not missing anything here. At this time, the only way to get an external image into a ConnectIQ app is with makeImageRequest(). It isn't possible to send them over from a partner app with Comm.transmit().

    I'm not sure building a bitmap on the device from a byte array is something we will be able to include because the images have to be converted into a device format, and doing that conversion natively on the device might not be something we can integrate. I don't think there are any technical limitations to doing that conversion in the phone SDKs, and being able to send them to the device using Comm.transmit, so I will put a feature request ticket in for that.


    Hi Brian, thanks for the reply!

    I think you at Garmin are not aware how much you (i.e. the Connect IQ platform) could gain by adding this simple feature :-)

    Anyway, I found a way to overcome this obstacle in my case, but I fear that may be at the cost of some performance loss.
  • I tried experimenting with per-pixel rendering byte array, but it is very slow, and when the image is larger 64x64 pixels application crashes.
    Really miss the possibility to transfer images from an phone application. Or at least the opportunity to do low-level work with bitmaps, such as adding something like setPixels function.
  • Hello,

    Yes it's really pity that we can't do it !

    It will permit do develop a companion android app based on mapsforge api and offroad map stocked on phone + garmin iq widget that request through Comm.transmit() and according to gps position, a map image to display....

    It will be very usefull to have that during hiking activity because not data connection will be necessary !
  • hello,

    is someone tried makeImageRequest with url "file://localhost/xxxxx" for example file://localhost/sdcard/DCIM/xxx.png ?