【发布时间】:2018-03-21 21:51:39
【问题描述】:
是否可以使用捆绑在您的应用中的可绘制资源而不是托管图像来向 Gboard 添加贴纸?
Google 提供了以下代码 sn-p here 来展示如何向 Gboard 添加贴纸,看起来唯一的方法是引用托管图片:
new Indexable.Builder("Sticker")
.setName("Bye")
// add url for sticker asset
.setImage("http://www.snoopysticker.com?id=1234")
// see: Support links to your app content section
.setUrl("http://sticker/canonical/image/bye")
// Set the accessibility label for the sticker.
.setDescription("A sticker for Bye")
// Add search keywords.
.put("keywords", "bye", "snoopy", "see ya", "good bye")
.put("isPartOf",
new Indexable.Builder("StickerPack")
.setName("Snoopy Pack")
.build())
.build())};
非常感谢所有帮助!
【问题讨论】:
标签: android