「SenchaTouch + Cordova」のiOS、Androidアプリ開発ではまったことを少しメモする。
通知スタイルの設定が表示されない
変更前
touch/src/device/push/Cordova.js
setPushConfig : function (config) {
var methodName = Ext.id(null, 'callback');
//Cordova's PushPlugin needs a static method to call when notifications are received
Ext.device.push.Cordova.callbacks[methodName] = config.callbacks.received;
return {
"badge" : (config.callbacks.type === Ext.device.Push.BADGE) ? "true" : "false",
"sound" : (config.callbacks.type === Ext.device.Push.SOUND) ? "true" : "false",
"alert" : (config.callbacks.type === Ext.device.Push.ALERT) ? "true" : "false",
"ecb" : 'Ext.device.push.Cordova.callbacks.' + methodName,
"senderID" : config.senderID
};
},
変更後
touch/src/device/push/Cordova.js
setPushConfig : function (config) {
var methodName = Ext.id(null, 'callback');
//Cordova's PushPlugin needs a static method to call when notifications are received
Ext.device.push.Cordova.callbacks[methodName] = config.callbacks.received;
return {
"badge" : (config.callbacks.type & Ext.device.Push.BADGE) ? "true" : "false",
"sound" : (config.callbacks.type & Ext.device.Push.SOUND) ? "true" : "false",
"alert" : (config.callbacks.type & Ext.device.Push.ALERT) ? "true" : "false",
"ecb" : 'Ext.device.push.Cordova.callbacks.' + methodName,
"senderID" : config.senderID
};
},