Push notifications on Nokia X
Upcoming SlideShare
Loading in...5
×
 

Push notifications on Nokia X

on

  • 8,367 views

The Nokia Notifications API enables you to implement Push notifications in your Nokia X apps. Nokia Notifications consists of a client API and a server API. If you’re already using Google Cloud ...

The Nokia Notifications API enables you to implement Push notifications in your Nokia X apps. Nokia Notifications consists of a client API and a server API. If you’re already using Google Cloud Messaging in an Android app, you can port or even add Nokia Notifications to the same code base and APK. In this webinar, we’ll show you how to use Nokia Notifications in your Nokia X apps and walk you through example code provided in the Nokia X SDK.

Statistics

Views

Total Views
8,367
Views on SlideShare
1,702
Embed Views
6,665

Actions

Likes
0
Downloads
21
Comments
0

16 Embeds 6,665

http://developer.nokia.com 6261
http://coreportal-qa.developer.nokia.com 217
http://devnokia.dev 78
http://nokia.dev 55
http://devb.developer.nokia.com 17
http://web.coreportal-qa.developer.nokia.com 9
http://131.253.14.98 8
https://translate.googleusercontent.com 6
http://translate.googleusercontent.com 4
http://www.slideee.com 4
http://news.google.com 1
http://web.developer.nokia.com 1
http://developer.nokia.com.dev 1
http://library.developer.nokia.com 1
http://webcache.googleusercontent.com 1
http://www.google.co.id 1
More...

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Push notifications on Nokia X Push notifications on Nokia X Presentation Transcript

  • Push notifications on Nokia X
  • NOKIA X PLATFORM DIFFERENTIATORS NOKIA NOTIFICATIONS
  • • Nokia Notifications enables real-time push notifications to your application running on Nokia X software platform. • Notification is a message that is sent from a specific notification service to an application installed on the device. • Nokia Notifications API consists of two parts: Nokia Notifications Client API (Client API) is the Java API enabling an application to register to a service, and receive and handle notifications. • Nokia Notifications Service API (Service API) defines the communication method between a 3rd party service and Nokia Notifications service. NOKIA NOTIFICATIONS (I)
  • • The process of receiving notifications is straightforward. The application, implementing Client API, registers itself for receiving notifications by sending service specific sender identification (sender ID) to Nokia Notifications server. • Nokia Notifications server responds by sending a device specific registration identification (registration ID, RID) to the client device. • The client application then provides the RID for the 3rd party server, which implements Service API. • Finally, the 3rd party server can send notifications, via Nokia Notifications server, for the devices whose registration ID it knows. It is the responsibility of the developer to implement a) client application with Client API and b) server with Service API. NOKIA NOTIFICATIONS (II)
  • NOKIA X PLATFORM DIFFERENTIATOR SPORTING C2DM/GCM APPLICATION TO USE NOKIA NOTIFICATIONS
  • NOKIANOTIFICATIONSAPI MATCHING THE C2DM / GCM • Client API: • Matching push notification APIs • Intent based API to: • register/unregister in device to receive notifications and • receive notifications with payload • Nokia Notifications helper library to use the Intent based API • Registering the application: com.nokia.pushnotifications.REGISTER • Unregistering the application: com.nokia.pushnotifications.UNREGISTER • Receiving registration ID: com.nokia.pushnotifications.intent.REGISTRATION • Receiving notifications with payload: com.nokia.pushnotifications.RECEIVE • Server API: • Support for 4kB payload • 100 message buffer in server + notification of flushing the buffer • HTTP API that supports JSON (matching the GCM server API) • dry_run parameter allowing developers to test their request without actually sending a message
  • NOT SUPPORTED BY NOKIANOTIFICATIONSAPI • Service statistics for developer • User specific notifications, which provides a mapping between a user and instances of an app running on multiple devices owned by the user • Receiving messages from multiple senders, e.g. a news application receiving messages from multiple sources • Bidirectional XMPP protocol based communication (new in CCS) • Some optional server API parameters: • restricted_package_name: A string containing the package name of your application. When set, the messages will only be sent to registration IDs that match the package name. • collapse_key: For collapsing group of the notifications • notification_key: For sending the notification to multiple devices of the one user • delay_while_idle: To prevent the notification sending to the idle device. The notification is delivered next time, when the device is active.
  • DIFFERENCES IN NAMESPACES General differences in namespaces Intent and permission names
  • PORTINGAPPROACHES FOR THE CLIENTAPP (I) Before you can start using Nokia Notifications API, you need to register a Sender ID from Nokia Notification developer console. Porting your existing GCM application to use Nokia Notifications can be done roughly by two different approaches: 1. If your application utilises the GCM helper library (gcm.jar), you can take in use the Nokia Notifications helper library which implements a similar API. 2. If your application utilises C2DM/GCM Intent API, you need to replace the namespaces of intent actions and permissions to match those defined in Nokia Notifications API. You can also abstract the notifications specific code in your app or use an adaptive, dynamic approach to incorporate both Google services and Nokia Notifications in a single application.
  • PORTINGAPPROACHES FOR THE CLIENTAPP (II) Despite the approach you choose, any C2DM or GCM application that is modified to use Nokia Notifications needs following basic changes: 1. Change sender ID from Google API project number or account name to Nokia Notifications sender ID • To acquire the Nokia Notifications Sender ID you need a Nokia Developer Account to access the Nokia Notifications developer console. 2. Make sure that application's own service knows how to send notifications to applications associated with a specific Nokia Notifications registration IDs • Your service has to use the Nokia Notifications Server API to send push notifications to devices using Nokia Notifications so you should either: • modify the service to only use the Nokia Notifications Server API, or • add some metadata to the registration ID so that the service knows which service each ID is associated with.
  • PORTING THE SERVER SIDE IMPLEMENTATION Porting the server implementation is quite straightforward. The minimum set of changes include: Changing the API key and URI to https://nnapi.ovi.com/nnapi/2.0/send
  • NOKIA X PLATFORM DEMO NOTIFICATIONS API DEVELOPER CONSOLE FOR NOKIA X DEVICES
  • Nokia X website http://developer.nokia.com/nokia-x Code samples http://developer.nokia.com/resources/code-sample/capture-the-flag-v1.0 Capture the Flag game is a Nokia example application demonstrating the use of Nokia services on Nokia X software platform: HERE Maps, Nokia Notifications and Nokia In-App Payment. Nokia X Tutorials (video clips) http://www.youtube.com/playlist?list=PLuc1ZjZXgzePUQmR9X8p59pe629668ACy DEVELOPER RESOURCES
  • Thanks! Michael Samarin Director, Developer Training and Evangelism Futurice @MichaelSamarin