mardi 18 mars 2014

Ext.device.Push and Ext.device.push.Cordova buggy and not usable

Hello,



the push notification abstraction has multiple issues:



Ext.device.push.Cordova bug:

The type config uses the bitwise | operator to add multiple flags, but the Cordova setPushConfig then uses === instead of checking the flag with &.



Abstration 1:
The abstraction misses to also implement the unregister event, so I again need to sniff which push service (Sencha,Simulator,Cordova) is used and then trigger the the unregister event for Cordova.



Abstration 2:

Ext.device.Push promisses a unified interface, but then requires a lot of platform-specific logic inside the "unified" functions, since the Android and iOS push registration process and messages are different. My solution below really unifies this, so there's no platform-specific handling necessary anymore.





My solution:

- Add unregister: function(config) {} to the new Ext.device.push.Abstract

- Completely refactor Ext.device.push.Cordova



Best regards,

Roland




Aucun commentaire:

Enregistrer un commentaire