0

Sencha Touch has 2 classes Ext.device.Notification and Ext.Msg to display messages. As per documentation of Ext.device.Notification Notifications are used to show native dialog boxes. The Simulator implementation will use Ext.MessageBox for show and a simply animation when you call vibrate. In otherwords, while testing in simulator/chrome emulation, Notifications behaves like MessageBox. But on actual device, it launches native device notification.

So I was wondering why would we not always use Ext.device.Notification to show Notifications ? Is there a need to use Ext.Msg? Are there any performance issues of using Notification over Msg?

1 Answer 1

0

Haven't used Ext.device.Notification so far but it seems that you can not style this type of message as you could style Ext.Msg. So it should be easier to include Ext.Msg into your app theme and have a consistent look.

On the other hand (as you already mentioned) you can vibrate the device using Ext.device.Notification. This is not possible using Ext.Msg though.

That being said these two classes are not completely interchangeable.

2
  • Just curious ... Is it not the desired behaviour for the notifications to appear as native as possible? Will there be a need to add styles to it?
    – suman j
    Jul 24, 2014 at 16:36
  • That depends on your or your client wishes. The default native notification doesn't fit into every theme. For instance the client I am working for right now doesn't care about native look. It's more important that the app looks the same on every device. So native design would break this demand.
    – Martin
    Jul 24, 2014 at 16:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.