javaandroidsony-smartwatch

Images Sony Smartwatch 2


I am trying to show an external image (not in my application project) in the Sony Smartwatch UI. I know how to do it with an image located in the drawable folder.

    Bundle iconBundle = new Bundle();
    iconBundle.putInt(Control.Intents.EXTRA_LAYOUT_REFERENCE, R.id.thumbnail);
    iconBundle.putString(Control.Intents.EXTRA_DATA_URI,
            ExtensionUtils.getUriString(mContext, R.drawable.thumbnail_list_item));

In this example I have the image in the drawable folder called R.drawable.thumbnail_list_item. The problem is when I try it with an external image. I have the following URL: http://tcset.com/images/logotcsetarriba.png, and this code does not work:

    Bundle iconBundle = new Bundle();
    iconBundle.putInt(Control.Intents.EXTRA_LAYOUT_REFERENCE, R.id.thumbnail);
    iconBundle.putString(Control.Intents.EXTRA_DATA_URI,
            ExtensionUtils.getUriString(mContext, "http://tcset.com/images/logotcsetarriba.png"));

How could I do it? I need held :S Thank you!!


Solution

  • You must download external image first to the device. Then you might have to use http://developer.sonymobile.com/reference/sony-addon-sdk/com/sonyericsson/extras/liveware/extension/util/control/ControlExtension#showBitmap(Bitmap).