You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by Apache Wiki <wi...@apache.org> on 2012/10/12 18:01:04 UTC
[Cordova Wiki] Update of "Core API Audit" by brianleroux
Dear Wiki user,
You have subscribed to a wiki page or wiki category on "Cordova Wiki" for change notification.
The "Core API Audit" page has been changed by brianleroux:
http://wiki.apache.org/cordova/Core%20API%20Audit?action=diff&rev1=2&rev2=3
/!\ deprecated completely. alert/confirm in standard browser API, vibrate move to http://www.w3.org/TR/vibration/, kill beep
+ *Definitions*:
+
+
+ - *Local Notifications*
+ - System timers/alarms that can be set up to fire [periodically] in
+ order to poke your app with some intent
+ - No UI requirements, I think, just a "wake from sleep" feature
+ - *StatusBar Notifications*
+ - That awesome bar at the top: you can set up an icon, supply
+ ticker-text, and/or configure drop down notification window items
+ - Notifications may use sound/vibration/flashing lights to attract
+ the attention of user when phone isn't in use
+ - Users clicking notification window items will poke your app with
+ some intent
+ - Lots of features, vary between systems
+ - *Push Notifications*
+ - External cloud services send messages to your device in response to
+ some server action/stimulus
+ - Once a push arrives, action should likely be some combination of
+ Local/StatusBar Notifications, but there are system limitations
+
+ *Goals*:
+
+ - Identify whats possible on each platform (initially android/ios)
+ - Unify the api across platforms (as much as possible)
+ - Use w3c spec for when possible:
+ - http://www.w3.org/TR/notifications/
+ - http://www.w3.org/TR/eventsource/ (or maybe not this one..)
+ - Organize plugin documentation, and write up a single unified guide
+ describing the various pieces and provide simple example
+ - Potentially: prepare for move to core plugin, though that is not a
+ direct goal
+
+ *Current state of the world: *(s/the world/phonegap-plugins/)
+
+ *iOS*
+
+
+ - *LocalNotifications*
+ - Needs documentation fixup
+ - 6 months since proper update, but the code looks fine (at first
+ glance)
+ - *PushNotifications*
+ - Seems well maintained (Max Ogden +more)
+ - Inspired by UA implementation (below) but seems to have a more
+ robust api
+ - Note from Max: no need for explicit notification api when app is in
+ background but do when app is in foreground
+ - *UAPushNotifications*
+ - Urban Airship (http://urbanairship.com/)
+ - We have no local implementation, just a TODO in repro, but found
+ external: https://github.com/urbanairship/phonegap-ua-push
+ - May be sufficient to just update our readme to point to that repo?
+ - *StatusBarNotifier*
+ - Seems to just change the top text of the *webview* status bar, so
+ this plugin seems to not be a StatusBar notification as I defined above,
+ more like an app "title" bar, so plugin seems misnamed.
+ - Depends on 3rdparty plugin:
+ https://github.com/frankdilo/FDStatusBarNotifierView
+ - ios6 only, apparently?
+ - *NotificationEx*
+ - Not interesting, seems to just implement features that were removed
+ from old cordova version
+
+ *Android*
+
+
+ - *LocalNotification*
+ - Docs claim similar api to iOS version, but looks different (at first
+ glance)
+ - Can't see how to register a callback (at first glance) -- so how is
+ this useful? Generic wakeup?
+ - 8 months since proper update, and the code looks like it needs work
+ - *Push Notification*
+ - There is no push notification plugin in the phonegap-plugin repo..
+ - However, Max Ogden pointed me to external: GCM-Cordova (Google
+ Cloud Messaging) https://github.com/marknutter/GCM-Cordova
+ - GCM replaces C2DM as supported android push messaging service
+ - Api is different than ios push plugin
+ - Also Note from Max: you have to explicitly add things to the status
+ bar as opposed to iOS where push notifications automatically get
+ displayed
+ in the UI [for background apps I assume]
+ - *StatusBarNotification*
+ - Braden recently worked to clean this up to use w3c spec etc
+ - I haven't scanned through it to see how much functionality it
+ supports
+
+ *Open Questions*:
+
+
+ - StatusBar Notifications: Intended for background services to notify a
+ user to start some action (instead of just doing the action without users'
+ explicit intent) -- so what does this mean for iOS without background
+ services?
+ - Are StatusBar notifications ever useful in foreground? Is that against
+ some design principle? Leave that decision to the app developer? (fwiw:
+ w3c spec seems to be a little vague, but no where does it say that
+ notifications are to be used only while in background)
+ - Push Notifications on ios: Can we intercept these when app is not in
+ foreground, or must we just rely on default system behavior?
+
+ *Prioritizing Steps Forward:*
+
+
+ 1. StatusBar Notifications on iOS (w3c spec)
+ 2. Push Notifications on android
+ 3. Push Notifications on iOS (minor fixup/polyfill hopefully)
+ 4. Local Notifications on android
+
+
== Storage ==
/!\ deprecate, the w3c doesnt want to support nor should we. file api and idb should care for all these use cases