我正在尝试在带有动态图标的不同页面的Cordova应用程序中创建按钮。 我正在使用以下技术和插件。
Cordova 8.1.2 (cordova-lib@8.1.1)
android@7.1.4
插件
cordova-plugin-shortcuts-android 0.1.0 "Android Shortcuts"
它工作正常,但是我需要添加动态图标。我的代码如下:
var shortcut = {
id: '123456,
shortLabel: lblSmall,
longLabel: lblBig,
iconBitmap: 'Path to png File',
intent: {
action: 'android.intent.action.RUN',
data: 'Path to app page' // Must be a well-formed URI
}
}
执行时出现以下错误
Bitmap must Not be null
有人可以帮我设置快捷方式插件的动态图标吗?
谢谢。