How to Use Push Notification Service?
- Part 1: Register on Vendors PNS (Push Notification Service)
- Part 2: Register on Push Notification Service
- Part 3: Configure the application in HAWK
- Push Notification Service FAQ
Prerequisites
-
For iOS devices:
- you have registered as an Apple developer (you can register here: https://developer.apple.com/programs/register/)
- you have an Apple Mac OSx with Keychain Access.
- For Android devices, you have a Google account (you can create a Google account here: https://accounts.google.com).
Part 1: Register on Vendors PNS (Push Notification Service)
This tutorial explains how to register on the 2 main PNS:
Register on Apple Push Notification Service (APNS)
Step 1: Generate the certificate
- On your Apple Mac OSx, open Keychain Access,
- choose Keychain Access/Certificate Assistant/Request a Certificate from a Certificate Authority,
-
in the Certificate Information window:
- in the User Email Address field: enter your email address,
- in the Common Name field: enter your name,
- in the Request is field: select Saved to disk,
- click Continue.
The Certificate Assistant saves a Certificate Signing Request (CSR) file to your desktop.
Step 2: Convert the certificate into a.p12 file
- On your Apple Mac OSx, open Keychain Access,
- click Keys to display the available private keys,
- right-click on the Private Key name,
- click Export,
- save the key in .p12 file format,
- enter the private key passphrase that should be used when importing this key on another computer.
Step 3: Generate the .cer file
- Log in the iOS Developer Portal,
- click iOS Provisioning Portal,
- in the menu on the left, click Certificates,
- click the Distribution tab,
- click Request certificate and upload the .csr file,
- wait for Pending status to change into Issued status,
- once the status is Issued, click Download to download the .cer file.
Step 4: Register the devices
You can skip this step if you are using an Enterprise Certificate.
Prerequisite: You need your UDID
How to get your UDID (Unique Device Identifier)?
- Plug your device in your computer,
- open iTunes,
-
in the Devices section, choose your device,
Your device's stats are displayed: Name, Capacity, Software version, Serial number. - click the Serial number to show the UDID.
- In the left menu, click Devices,
- click Add Devices,
- enter the devices' information.
The App ID allows identifying your application, which is especially used by the Apple Push Notification service (APNs).
- Click App IDs and New App ID,
- in the Description field, enter a description for your App ID,
- in the Bundle Seed ID field, select Generate new or select an existing Bundle Seed ID,
- in the Bundle Identifier field, enter an identifier for your App ID,
Do not use the wild-card * as the last element of the App ID: the App ID must be unique so that you can send notifications.
- click Submit.
The App ID appears in the list.
Step 6: Enable Push notification
- In the App ID list, click Configure,
- Select Enable for Apple Push Notification Service,
- In front of your App ID, in the Apple Push Notification service column, click Configure,
The Apple Push Notification service SSL Certificate Assistant window appears.
- click Continue,
- under Submit Certificate Signing Request, click Browse and select the CSR file that you generated and click Generate,
- once the SSL Certificate is generated, click Continue,
- under Download and install your Apple Push Notification... click Download and click Done.
You now have a valid certificate and push notification is available.
Step 7: Create a Distribution Provisioning Profile
- On the left menu, click Provisioning,
- click the Distribution tab,
-
in the Distribution Method field, select:
- App Store, if you want to distribute your application via the Apple App Store,
- Ad Hoc, if you want to deploy your application on a selected range of devices,
You should submit 2 provisioning profiles, one for each Distribution method.
- In the Profile name field, enter a name for the Distribution Provisioning Profile,
- in the App ID field, choose the App ID you generated on Step 5,
- select the devices,
- click Submit,
- click Download to download the .mobileprovision file.
Now you have:
- an Apple iOS Developer account
- a certificate file (.cer)
- a private key file (.p12)
- a private key passphrase
- a provisioning profile file (.mobileprovision)
Register on Android's Google Cloud Messaging (GCM)
In this step, you will obtain essential data to send notifications via the Streamezzo Push Notification console:
- Push Notification Sender ID
- API Key
Step 1: Obtain the Push Notification Sender ID
- Register on Google APIs console: https://code.google.com/apis/console,
- connect with your Google account credentials,
- click API Project,
- choose Create,
- in the Create project window, enter the name of your project and click Create project,
In the URL bar, the address looks like: https://code.google.com/apis/console/#project:786859101573
- take note of the value after "project" in our example, 786859101573.
This value is your Push Notification Sender ID. You need this value to fill in the settings of your project in HAWK for Eclipse.
Step 2: Obtain the API Key
- Click Services,
- in the list of all services, in front of Google Cloud Messaging for Android, turn the OFF button to ON.
- accept the terms of use,
- back to the top of the Google APIs page, click API Access,
- click Create new server key,
- if necessary, specify the server IP addresses from which you accept API requests, Streamezzo Server IP address is 88.190.25.177,
- click Create.
Your API Key displays in the Key for server apps (with IP locking) frame.
Part 2: Register the application
Prerequisites:
- You have requested activation of your Developer Account to be allowed to use Push Notification Service.
- For iOS developers, you have generated a Passphrase and a .p12 file containing the private key and the certificate for iOS APNs.
- For Android developers, you have registered on Google APIs Console
Step 1: Add the application
- Access to the PNS web console at https://notif.pve1.streamezzo.com/danotifconsole/adm/console/apps
- log in with your platform connection credentials,
- in the App Developer field, choose your name,
- in the App Name field, enter your application name,
- click Add.
Your application appears in the Registered Apps table.
Step 2: Configure the application
- In the Registered Apps table, click the name of your application,
-
fill in the Application Settings:
-
Android Settings:
- enter the API Key you obtained in Google APIs Console, see Register on Android GCM,
- click Update.
-
iOS Settings:
- enter the Passphrase you defined when you converted the certificate into a .p12 file,
- browse to select the .p12 file you obtained when you converted the certificate into a .p12 file,
- click Update.
-
Android Settings:
Part 3: Configure and install the application
Prerequisites:
- You have registered your application in the Apps Manager Console
Step 1: Modify the Project Settings
- In HAWK, in the Project Explorer, right-click on your project and choose Settings,
- expand Master and click HAWK Settings,
- in the Push Notification settings, select Enable Push Notification,
- select the Notification types you wish to activate on the device.
Step 2: Modify Android settings
Click Android and fill in the settings:
- in the Application name field, enter the name of the application as defined in the Apps Manager Console,
- in the Version field, enter the name of the Major Version as defined in the Apps Manager Console,
- in the Push Notification Sender ID field, enter the ID you obtained on Google APIs Console, see Register on Android GCM,
Step 3: Install your Application
- Click your project in the Project Explorer.
- In the Menu Bar, click HAWK and choose Create Application Installers.
- Type your platform username and password and click Next.
- Select the platforms for which you want to create Application Installers and click Finish.
The Deployment view appears with the generated files.
The explorer opens with the generated application installer.
- Activate Bluetooth (Android) or plug your iPhone to your Mac.
- Transfer the application installer to your device.
- Click the file in order to launch the application installation.
Part 4: Send Notifications via Push Notification Service
Step 1: Connect to Push Notification Service
- Access to the PNS web console at https://notif.pve1.streamezzo.com/danotifconsole/adm/console/apps,
- type your platform account credentials,
- in front of your application name, click Compose.
Step 2: Send the notification
- In the Alert field, enter the text of your alert,
- in the Badge field, enter the number that will be displayed in the badge,
- in the Sound field, enter the name of a sound file, supposed to be packaged in the application
- in the Vibrate field, enter a pattern (array of semicolon-separated integers that are the durations (in milliseconds) for which to turn on or off the vibrator).
- In the Activity instruction field, choose Leave app as is or Start app, if you want your application to open when you send a notification,
- in the Text DEF field, enter HAWK_notification_data,
- in the Text field, enter the data that will be transmitted to the registered JavaScript callbacks,
- in the Startable DEF field, enter HAWK_notification_reception,
- click Send Message.
The application receives and handles the notification.
Push Notification Service FAQ
What can we do with Push Notification Service?
When registered on Push Notification Service, you can send notifications to your application whatever the platform it is installed on, provided that you have used the HAWK APIs in your HTML application.
What are the supported platforms?
With Push Notification Service you can send notifications on iOS and Android devices.
What is the procedure to enable push notifications?
This is a 4-step procedure:
- Register on Vendors PNS (Push Notification Service)
- Register on PNS
- Configure the application in HAWK
- Send notification via PNS
Find the detailed procedures here.
What is the exact role of the Push Notification Service?
Upon application registration to the service, the Vendor's PNS generates a token, which is sent from the Vendor's PNS to the device and then from the device to the PNS.

Once registration is done, Push Notification Service enables to send a notification to the device via the appropriate Vendor Push Notification Service:

Is it possible to schedule notifications?
It will soon be possible to send a notification from a REST service, in addition to Push Notification Service web console. It will then be possible to use this API to schedule notifications from any system that will simply have to call it.
Is it possible to send notifications to a given set of users?
It will soon be possible to send a notification from a REST service, in addition to Push Notification Service web console. It will then be possible to use this API to schedule notifications from any system that will simply have to call it.
It will soon be possible to specify criteria to filter notification sending only to application instances matching such criteria. One of these criteria could be a set of end-users.
Is a license required to use PNS?
So as to use the PNS, you need to send a request to Streamezzo in order to be allowed to use Push Notification Service.




























