You are on page 1of 9

Guide to using Push Notifications

Contents
1.
2.
3.
4.
5.

History
Value of Push Notifications
Push Notification: Use-Cases
Good Push - Bad Push
Features of App42 Push Notifications

Cross-platform Push Notifications


User Segmentation
Scheduling
Geo-location based Push Notifications
Rich Push Notifications
Push Analytics
6. Basics on Using Push Notifications
7. How to Integrate Push Notifications through ShepHertz

Push Notifications in Android


Push Notifications in iOS
Push Notifications in Windows Phone
Push Notifications in Unity3D (Android, iOS and Windows)
Push Notification in Nokia-X
Push Notification in Corona
8. About ShepHertz

History
Top
Push notification was first conceptualized by Research in Motion, which they used to inform devices about
a new mail, one of the aims being to reduce battery consumption through its Network Operating Center.
Do you have a BlackBerry? was synonymous with do you have push email? Push Email did a great job
for Blackberry by increasing the efficiency and driving connectivity which was faster than internet
connected desktops. Thereafter Microsoft introduced the same concept in its Microsoft Exchange and
Windows Mobile to deliver the same experience. Apple used the foundation set by RIM to expand the
applications of Push Notifications. Apple introduced APNs (Apple Push Notification Services) which allowed
users to subscribe to third party application notifications.

Value of Push Notifications


Top
Push has been around now for over two decades. The importance of Push is augmented by the fact that
more and more users are on using smartphones and that too for most part of the day. And mobile users
belong to each and every demography, age and geography, thus making Push an effective medium of

communication.
The user allows you to send specific data to his or her device, thus allowing you to invade his or her
personal life. The data sent via push could be in the form of a product update, new features, discount
offers and so on. Its up to the products marketing team to decide. Push comes real handy, in an era where
a huge chunk of an organizations budget goes into marketing. Push is one of the best options today to
reach out to the customers. It is virtually cheap and has a better response (chance of action being taken)
than compared to an e-mail or even other marketing strategies. Research has shown that almost 60%-70%
of Push Notifications are opened and read by recipients.
Push is relatively quick and can be sent out in multiple forms. From messages to rich text/image based,
push has a multiple forms to cater different target audiences. Push can be scheduled, can be sent across
multiple platforms at a single click. You can also perform analytics on the push notifications sent out.
Highly simple to compose and send, Push is an effective means of engaging with your users again and
again. The best part of Push is that it is somehow cool compared to the conventional means of marketing.
Mails can be read later, messages will be deleted before they are read but its highly unlikely that a Push
notification goes unread.

Push Notification: Use-Cases


Top
Push Notification is a very popular feature among developers these days. Ranging from simple Utility Apps
to complex Multiplayer Games, Push Notification has hit the App market with its tremendous ability to
engage users.
Here are some innovative use-cases that have been brought to our notice by our developer community.
Might come in handy for you!
The following are some golden rules that need to be followed:
Multi-level Games: Use Analytics to see if a user is stuck on a level for a long time. Push him a
gem to cross that level, so that he does not churn out of your game.
Casual Puzzle Games: A user is stuck on a level, send hints to help him out
E-Commerce or Retail Apps: Use App42 Funnel Management to see where a user stands on
your conversion funnel and send Push Notifications to nurture him well.
For instance, a user checks out a particular brand/product every time he visits your App but
does not buy. Send a Push to notify him whenever there is a discount or a price slash on the
brand/product. Targeted Marketing!
Utility Apps: Some Utility Apps like a Reminder/Memo or a Calendar Event App can be made by
using Push as an integral part.
Alert Push: Traffic App - track location of users through Geo-Location, and send out a Push
Caution! Traffic on the road ahead, take the alternate route!
Instagram/Photo-sharing/Social Apps: Send Push when someone likes or comments on a
photo or a status update.

Turn-based Games: Create turn-based games by using Push Notifications. For instance, in a
game of chess, a simple Push like your opponent has played his move, its your turn now, can
keep the game going.
Travel Apps: Use Geo-Location to track user-location and nearby Geo-Points. Send Push
Notification, say to tell them about a deal going on or a coupon of the nearby restaurant.
News App: Send breaking news to all users or targeted news to particular users.
Business Apps: Inform users about account expiry, important events, pending payments,
reminders, recommendations, or provide real-time customer support.
Chat or Dating Apps: Inform users when a friend or an awaited contact is online.
MMO: Send cross-platform Push Messages to a massive number of users across devices in a
single-click.
Marketing of Apps: We all know that even after creating a brilliant App, user-acquisition is
what takes the toll of our lives. You can cross-promote your Apps using Push Notification. Inform
the user base of your ongoing Apps about the new launch.
Retail Apps: A use might have bought a product which he needs regularly. A push can be sent
out to remind the user of the same after a specific period. For example, if a user bought baby
wipes in the past, they might receive an offer for other baby-related gear.

Good Push - Bad Push


Top
By allowing push notifications, a user is giving you access to infringe on his or her personal time. It better
not be abused. Marketers especially seem to think Push is a better option compared to emails and SMS to
send out deals, offers and information. However this would steal away the real purpose of Push
Notifications.
Push should be used in a way, when the user would most likely need some kind of information, in a much
more intuitive manner. For example, if a user is out shopping, then Push can be sent with details of
discount offers rather than sending out a random Push notification at any time of the day.
Remember, it is all about relevancy. A number of Apps are fighting with each other just for an icons worth
space on your mobile. Consumers are highly fickly about such things. A single bad or irrelevant push and
your App is uninstalled in a swipe of the finger.
The following are some golden rules that need to be followed:
1. Give the user the authority to be able to receive push notifications: A step further
would be let them select the day or time slots when they would like to receive the push
notifications. Let your users select from an interest list, the ones for which they would like to
receive a Push Notification. Give them the ability to personalize things for themselves.
2. Personalized Push: Understand the behaviour of users and the purpose for which the user has
installed you App on his or her mobile. Personalize the Push by asking a users interests first.
3. Send relevant information: It is highly necessary to be able to consistently and diligently
deliver the right information through Push to your users. Users wont think twice to uninstall

your App the moment you start sending irrelevant information. This works exactly like Twitter. A
user will only follow you if you are talking about something of the users interest and liking.
4. Engage and entertain your users with rich content: You can achieve this by attaching
relevant videos, images or sounds with your Push Notifications. Remember, interactive push
speak louder than words.
5. Consistency and homework is must: Delivering the right content again and again will keep
your user engaged with you. Dont work on assumptions and send out Push blindly. Monitor you
user behaviour and activities performed, analyse the data and then send the relevant
information.
6. Always remember you are representing your brand: Customer is the king and you need
them, however that does not mean you deviate from what your brand stands for and what you
deliver for your clients with your products.

Features of App42 Push Notifications


Top
Cross-platform Push Notifications
A lot of Apps these days are made on multiple platforms. User and peers are on multiple
devices. Thus arises a need for a medium to send out cross-platform push to make uses aware
of each others activities. This can be used in games and productivity based applications. An
example of this can be an App based on daily Chores. Husband/wife or room-mates can be on
different devices. Using this cross-platform App, each partner can note down tasks for their
home, like grocery shopping, and once the task is completed by either of the partners, a Push
can be sent out to notify the same to the other partner.

User Segmentation
App42 Push Notification Service has introduced new APIs and methods to target users who have
specific profile/preference e.g. if an Educational Institute wants to target its different
departments like High School, Junior School and College Users they can use this new API and in
a single API call they can target these different users with different Push Notifications.
Push Service is already equipped with method of targeting a specific user or a group of users or
all app users for sending Push Notification. This newly introduced API requires user preference or
profile persistence in Storage Service as a prerequisite.
If you have a channel subscription model in your App for push notification, you can schedule the
message on that channel too. Channel scheduling can be useful in a business scenario where
you want to send a scheduled update only to a subscribed user on his topic of interest.

Scheduling

This facilitates developers to create push campaign which can be scheduled on a given date and
time. Scheduling messages can be done for the selected users or all users or on a particular
subscription channel.

Geo-location based Push Notifications


Marketing campaigns without defining a targeted region tend to fail. This is why, we have
initiated Geo based targeting for Push Notification. Now, the developers can select a specific
country/state/city for sending push notifications from AppHQ console. Along with this, they can
also pick a specific region on the map to target.

Rich Push Notifications


ush notifications can also be sent out in the form of Image based URLs, sound notifications,
badges, etc. This helps you in making your Push more interactive and appealing.

Push Analytics
Perform analytics on top of the Push Notifications you sent out. Analyse how many Push
Notifications were Sent, Delivered and Opened. This allows you to experiment with the content
of the Push Notifications, helping you to deliver more effective content.

Basics on Using Push Notifications


Top
Here are some guidelines which can help you while working with push notifications:
It is mandatory for an application to register in the server (e.g. APNS for iOS, GCM server for
Android, MPNS for Windows and so on) in order to receive the notifications. Then it can pass to
its provider a device token it gets from the operating system.
These notifications can be a message, an impending calendar event, or new data on a remote
server. They can display an alert message or they can badge the application icon. They can also
play a sound when the alert or badge number is shown. Select the type according to your
requirement.
Avoid the usage of multiple notifications for similar actions (e.g. in a chat room application, the
user might want the notification only when the conversation is initiated. It is not necessary to
provide the notification every time a message is received).

Be careful with the excessive usage of push notifications as repeated notifications will result in
spamming which might result in the user unsubscribing from your application.
Always choose a service provider who provides cross platform support for your applications
push notifications. This will reduce the effort in identifying the type of devices App users are
using e.g. if your app is running on two different platforms like android and windows, then the
provider will give you a way to send the messages to both the platforms in one API call.
A few limitations which you should keep in mind
Some service providers, devices are not capable to handle multiple push notifications within a
single App. In this event a lot of push messages sent by App will be queued, and only the recent
notification will be up on the screen.
Delivery of push notifications is not guaranteed. Push Notification Service includes a feedback
service that the server (APNs) continually updates with a per-application list of devices for which
there were failed-delivery attempts. So using push notification for real-time applications is not
feasible.

How to Integrate Push Notifications through


ShepHertz
Top
Push Notifications in Android
1. Register with App42 platform
2. Create an app once you are on Quick-start page after registration.
3. If you are already registered, login to AppHQ console and create an app from App Manager ->
App Create link.
4. Create a project and get your Project Id from google developer console. It would be available
inOverview section of your created project.
5. Select your created project and click on APIs option in Google developer console and enable
Google Cloud Messaging for Android service.
6. Click on Credentials from left menu -> Create New Key -> Server Key.
7. Keep Accept requests from these server IP addresses as blank and click on Create button
8. From AppHQ console click on Push Notification and select Android Settings in Settings option.
9. Upload your Server API Keys obtained from Google to App42 platform using AppHQ console as
shown in following screenshot
10.

You can also upload the Server API key using Push Notification API call uploadApiKey(String

apiKey).
11.

Following Permissions and entries are required to integrate Push Notification in your project.

Sample Android Manifest contains these entries already however if you are integrating in your
existing project put these lines in your Manifest too. You have to replace
<YOUR_APPLICATION_PACKAGE_NAME> with the value of your package name. Also, if you are
integrating in your project, GCMIntentService must be placed inside application package.

12.

In your app call the storeDeviceToken(String Username,String deviceToken) method by

passing userName and device registration id (Device Token) obtained from GCM service. This
call should be made only during the installation of the app.
13.

Once user name and his device id is registered with App42, you are ready to send the

message to target user/device using API call sendPushMessageToUser(String username,String


message)
14.

You can also send custom key value type message using API call

sendPushMessageToUser(String username,HashMap< String,String> keyValueMessage).


15.

Direct message can also be send using AppHQ Console by selecting target user from the

registered user list in Push Notification tab shown in below screen shot.
16.

You can also create channel using AppHQ console or using direct API for creating the

channel createChannelForApp(String channel,String description)


17.

User needs to subscribe to channel for receiving Push messages for channels. User

subscription can be done using API subscribeToChannel(String channel,String userName)


18.

Messages can be send for a particular channel using API call

sendPushMessageToChannel(String channel,String message)


19.

This can also be achieved using AppHQ console in Push Notification after selecting the

Channel section inside it.


20.

You can also send message to all your app users using API call

sendPushMessageToAll(String message), This API call will deliver the message to all your app
users irrespective to their target platform device. For example calling this method from Android
device will deliver message to all your app users having devices in either Android/ or OS or WP7.

Push Notifications in iOS


1. Create a new App ID and provisioning profile for each app that uses push, as well as an SSL
certificate for the server. To do this you should have an iOS Developer Program membership
on iOS Dev Center.
2. You should make .p12 file from the SSL certificate you downloaded from the iOS Dev Center.
3. Upload the .p12 file received from APNS to App42 platform using either AppHQ console or using
API call uploadFile(NSString*)password filePath:(NSString*)filePath environment:
(NSString*)environment
4. Environment value could be either development or production.
5. You can also upload .p12 file using AppHQ console as shown below
6. In your app call the storeDeviceToken:(NSString *)userName:(NSString *)deviceToken method by
passing the user name and device registration id received from APNS.
7. Once user device is registered, Push notification can be send to his device by calling the API
sendPushMessageToUser:(NSString *)userName message:(NSString *) message.
8. You can also send the message to user using AppHQ console as explained above in Android
section.

9. Message can also be send using key value format in dictionary by calling
sendPushMessageToUser:(NSString *)userName message:(NSString *)message
10.

Channel APIs can be used for creating channel, subscription to channel and sending

message to it. Please see the Android section above for detail explanation.
11.

You can also send message to all your app user using API sendPushMessageToAll:(NSString

*)message. This API call will deliver the message to all your app users irrespective to their target
platform device. For example calling this method from iOS device will deliver message to all
your app users having devices in either Android or OS or WP7.

Push Notifications in Windows Phone


1. On WP7, you can start with calling the API StoreDeviceToken(String username,String
deviceToken,App42Callback requestCallback) where deviceToken refers to notification URI
received from APNS after registering app for receiving Push messages.
2. Once user device is registered with above API call, you can use the API
SendPushToastMessageToUser(String userName, String title, String subTitle, String param,
App42Callback requestCallback) to send the toast message to windows devices.
3. You can also send message to your app users using AppHQ console as explained in Android
section above.
4. Channel APIs can be used for creating channel, subscription to channel and sending message to
it. Please see the Android section above for detail explanation.
5. You can also send message to all your app user using API SendPushMessageToAll(String
message, App42Callback requestCallback) message. This API call will deliver the message to all
your app users irrespective to their target platform device. For example calling this method from
WP7 device will deliver message to all your app users having devices in either Android or OS or
WP7.

Push Notifications in Unity3D (Android, iOS and Windows)


You can refer the below links for Push Integration in Unity3D

Unity3D with Android : http://api.shephertz.com/tutorial/Push-Notification-Unity-Android/?index=pn-unity_android


Unity3D with iOS : http://blogs.shephertz.com/2013/08/08/steps-to-integrate-push-notification-with-unity3d-on-ios/
Unity3D with Windows Phone: http://api.shephertz.com/tutorial/Push-Notification-Unity-WindowsPhone/?
index=pn-unity_wp

Push Notification in Nokia-X


You can refer the below links for Push Integration in Nokia-X

http://api.shephertz.com/tutorial/Push-Notification-on-NokiaX

Push Notification in Corona


You can refer the below links for Push Integration in Corona

http://api.shephertz.com/app42-docs/push-notification-service/

About ShepHertz
Top
ShepHertz is a Complete Cloud Ecosystem provider for Mobile, Web, Social, Gaming and TV
Apps. Our endeavor is to make App developers successful on the Cloud, irrespective of the technology or
platform on which they are developing. All our products focus on making App developers life easy and
augment their business. ShepHertz App42 Platform consists of App42 Cloud API - BaaS, AppWarp
Multiplayer Gaming Engine, AppWarpS2 On-premise Gaming Solution, Backend PaaS, App42 Gaming PaaS
and AppClay - Easy App Builder.

For more details visit:


ShepHertz: www.shephertz.com
App42 Cloud APIs: http://api.shephertz.com/
AppWarp Realtime Multiplayer Gaming Engine: http://appwarp.shephertz.com/
AppClay: http://appclay.shephertz.com/
App42 PaaS: http://app42paas.shephertz.com/

You might also like