The viv.image library capsule will not be supported in the near future. The good news is that the migration is very easy and this functionality already exists in the viv.core library capsule. This means you should not have to worry about deprecation for this functionality in the future!
The following steps show how to migrate your capsule from viv.image.Image to viv.core.BaseImage in order to use the same functionality:
- Remove viv.image from your capsule.bxb files' capsule imports.
- If you do not have viv.core imported, import viv.core in place of viv.image. Your new capsule
import should look like this:
import (viv.core) {
Notice there is no version required. This is because viv.core is always considered to be up to date!
as (core)
} - Now that you have the correct Library capsule available, simply refactor all instances of viv.image.Image to core.BaseImage in your capsule.
Please note the following differences between viv.image.Image and viv.core.BaseImage:
- viv.image.Image.url was a Required property while viv.core.BaseImage.url is Optional. You should still define a url for each image as, without it, Bixby would not know what to display but this gives you greater control of when your capsule defines it.
- The viv.image.Image.size property is not available with viv.core.BaseImage. However, Bixby provides various ways to display your images without having to specify your image size.
Comments
0 comments
Please sign in to leave a comment.