android push notification using app42 mobile backend as a service
DESCRIPTION
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.comTRANSCRIPT
Push Notification Service
Increase User
Engagement
Calendar Events
Message
Pop-Up
Latest
Updates
Push Notifications
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
Our Push Notification API can be used to send cross-
platform push messages to devices running on iOS,
Android and Windows Phone with a single API call
• Send Image/Text/URLs text-based Push Notifications
• Send messages in Channel Subscription Mode
• Send Scheduled Push as per Time-Zone
No infrastructure & scalability worries
Push Analytics
• Analyze your Push Campaign with App42 Analytics
• Evaluate the number of Push messages sent, delivered
and opened.
Why App42 Push Notification?
Integrating With Android
To use Push Notification Service in your App, go to Google console, click on services option
and enable Google Cloud Messaging for Android service.
Tutorial videoA few easy steps
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.
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
Download the zip file (sample app) from here and import it in eclipse.
Open MainActivty.java file in sample app and make these changes:
•
•
•
Contd..
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
Pass the User Id and Message in below method:
Sending messages using AppHQ console
Sending messages using App42 API
•
•
•
•
Testing
1 PushNotificationService pushService=App42API.buildPushNotificationService();
2 pushService.sendPushMessageToUser(userId,message);
Sending a message
through AppHQ console
Creating a channel & scheduling
Push messages through AppHQ
A very useful feature that can track:
These analytics can be viewed from our AppHQ console.
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.
Thus, Analytics gives you a better insight of your Push Notification campaign.
Push Analytics
• 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
How many Push Notifications were sent from your side
How many were delivered, and
How many users opened the message
100%
74%
31%
Push Notification Campaign
Sent
Delivered
Opened
Some useful linksGetting Started:
Quick Start Guide
Sign-up for Free
Game Development Center
Concepts:
Backend as a Service
Massive Multiplayer Gaming Engine
App Analytics
Products:
App42 Cloud APIs - BaaS
AppWarp – Multiplayer Gaming Engine
AppHQ – Management Console
AppHawk – Project Management Tool
AppClay – Custom App Builder
Downloads:
App42 Cloud SDKs
App 42 Modules
Blogs:
Why BaaS?
Push Notification for iOS
Push Notification for Android
Real-time Multiplayer Games using Unity3D
Integrating Facebook in your Android App
Making a Turn-based Game
Using Query Interface
When to use NoSQL?
Add ‘Social’ to your Game
Links for Reference :http://www.shephertz.com
http://api.shephertz.com
http://appwarp.shephertz.com
http://app42paas.shephertz.com
Follow us on:
Contact: [email protected]
Skype: ShepHertz