Integrating App42 Push Notification Service with Android App. App42 uses GCM (Google Cloud Messaging) to send Push Notifications on Android devices. This presentation will help you learn how to use Push Notification feature with App42 Backend as a Service APIs. Check out our website http://www.shephertz.com
3. Benefits of Push Notification
Increases user-engagement
e.g. In a turn-based game like Tic-Tac-Toe, it can notify a user of his turn (suppose
he gets a phone call in between and forgets that he was playing!!)
Allows to send messages to users even when the app is not running; thus helps in
reminding them of your App
Helps to build a fan community around your game by pushing to a targeted
audience – like your regular gamers
Allows an App to notify its users of new events without needing to actually open it,
i.e. by a sound or a screen pop up
4. Why App42 Push Notification?
Our Push Notification API can be used to send crossplatform push messages to devices running on iOS,
Android and Windows Phone with a single API call
No infrastructure & scalability worries
• Send Image/Text/URLs text-based Push Notifications
• Send messages in Channel Subscription Mode
• Send Scheduled Push as per Time-Zone
Push Analytics
• Analyze your Push Campaign with App42 Analytics
• Evaluate the number of Push messages sent, delivered
and opened.
6. A few easy steps
Tutorial video
To use Push Notification Service in your App, go to Google console, click on services option
and enable Google Cloud Messaging for Android service.
Click on API Access tab and create a
new server key for your application
with blank server information.
Go to AppHQ console and click on
Push Notification and select Android
setting in Settings option.
Select your App and copy server key
that is generated by using Google
API console, and submit it.
7. Contd..
Download the zip file (sample app) from here and import it in eclipse.
Open MainActivty.java file in sample app and make these changes:
•
Replace API-Key and Secret-Key at line no. 18 and 19
•
Replace your user-id by which you want to register your application for Push Notification at line no.
20
•
Replace Project-no. with your Google Project Number at line no. 21
8. Testing
Sending messages using AppHQ console
•
After registering for Push Notification, go to AppHQ console, click on Push Notification and select
application after selecting User tab
•
Select desired user from registered User List and click on Send Message Button
•
Send appropriate message to user by clicking Send Button
Sending messages using App42 API
•
Pass the User Id and Message in below method:
1 PushNotificationService pushService=App42API.buildPushNotificationService();
2 pushService.sendPushMessageToUser(userId,message);
11. Push Analytics
A very useful feature that can track:
How many Push Notifications were sent from your side
How many were delivered, and
Push Notification Campaign
How many users opened the message
31%
100%
Sent
Delivered
Opened
These analytics can be viewed from our AppHQ console.
74%
Why Push Analytics?
When you use our Push Notification Service, each Push goes from the App42 server to
GCM/APNS/MPNS and then to the user device.
• Delivery of Push Notification is not guaranteed even from the service provider
• Once delivered, there might be a chance that user just clears it without opening the message
Thus, Analytics gives you a better insight of your Push Notification campaign.
12. Some useful links
Getting Started:
Downloads:
Quick Start Guide
App42 Cloud SDKs
Sign-up for Free
App 42 Modules
Game Development Center
Blogs:
Concepts:
Why BaaS?
Backend as a Service
Push Notification for iOS
Massive Multiplayer Gaming Engine
Push Notification for Android
App Analytics
Real-time Multiplayer Games using Unity3D
Integrating Facebook in your Android App
Products:
Making a Turn-based Game
App42 Cloud APIs - BaaS
Using Query Interface
AppWarp – Multiplayer Gaming Engine
When to use NoSQL?
AppHQ – Management Console
Add ‘Social’ to your Game
AppHawk – Project Management Tool
AppClay – Custom App Builder
13. Links for Reference :
http://www.shephertz.com
http://api.shephertz.com
http://appwarp.shephertz.com
http://app42paas.shephertz.com
Contact: sales@shephertz.com
Skype: ShepHertz
Follow us on: