Push Notification Service
Push Notifications

Message
Pop-Up

Increase User
Engagement
Latest
Updates

Calendar Events
Benefits of Push Notification
Increases user-engagement
e.g. In a turn-based game like Tic-Tac-Toe, it can notify a user o...
App42 Push Notification supports

Coming Soon!!

&
Why App42 Push Notification?
Our Push Notification API can be used to send crossplatform push messages to devices running ...
Creating a channel & scheduling
Push messages through AppHQ
Push Analytics
A very useful feature that can track:


How many Push Notifications were sent from your side



How many ...
Integrating with Unity
on Android
A few easy steps
Download the sample code from here.
To use Push Notification Service in your App, go to Google console, c...
Contd..
Open the PushSample.unity from your assets folder, it contains PushSample.cs &
Constants.cs.
Open Constants.cs fil...
Testing
Sending messages using AppHQ console
•

After registering for Push Notification, go to AppHQ console, click on Pus...
Sending a message
through AppHQ console
Changing Default Package Name
Default package name of App42 push unity sample project is
com.shephertz.app42.android.pushs...
Contd..
• Cross check AndroidManifest.xml file for changes in package name; If not done, do it
manually.
• Build your libr...
IT IS THAT SIMPLE!!!
Some useful links
Getting Started:

Downloads:

Quick Start Guide

App42 Cloud SDKs

Sign-up for Free

App 42 Modules

Gam...
Links for Reference :
http://www.shephertz.com
http://api.shephertz.com
http://appwarp.shephertz.com
http://app42paas.shep...
Upcoming SlideShare
Loading in …5
×

How to integrate Push Notification with Unity in Android

5,682 views

Published on

Enabling push notification on the Android platform while building on Unity is not straightforward. This presentation will help you learn how to use App42 Push Notification service in Unity Android App. Check out our website http://api.shephertz.com

Published in: Technology

How to integrate Push Notification with Unity in Android

  1. 1. Push Notification Service
  2. 2. Push Notifications Message Pop-Up Increase User Engagement Latest Updates Calendar Events
  3. 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. 4. App42 Push Notification supports Coming Soon!! &
  5. 5. 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. 6. Creating a channel & scheduling Push messages through AppHQ
  7. 7. 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.
  8. 8. Integrating with Unity on Android
  9. 9. A few easy steps Download the sample code from here. 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(Click here)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.
  10. 10. Contd.. Open the PushSample.unity from your assets folder, it contains PushSample.cs & Constants.cs. Open Constants.cs file in Sample App and make these changes: • Change API-Key and Secret-Key that you have received. • Change Project-no. with your Google Project Number. • Change Game Object Name with your Game Object on which you have to receive Notification Call-Back from Android. • Change Call-Back Method with your method name on which you have to receive Notification Call-Back from Android e.g. Success.
  11. 11. 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. • Now you will get same message on your android device and your Call-Back Method of Unity3D. Sending messages using App42 API • Pass the User Id and Message in below method: 1 PushNotificationService pushService=App42API.buildPushNotificationService(); 2 pushService.sendPushMessageToUser(userId,message);
  12. 12. Sending a message through AppHQ console
  13. 13. Changing Default Package Name Default package name of App42 push unity sample project is com.shephertz.app42.android.pushservice. To change this package name you have to modify the library project and rebuild it for your own package name. Here are the steps to perform it: • Download the library project from here. • Import this project in your eclipse. • Change/refactor the package name of the android library project source with your desired game package name. • While refactoring, select Update fully qualified names in non-Java text files (Forces Preview) option. This will modify AndroidManifest.xml file too with new package name.
  14. 14. Contd.. • Cross check AndroidManifest.xml file for changes in package name; If not done, do it manually. • Build your library project. • Copy App42PushService.jar and AndroidManifest.xml file from your bin folder of library Project folder and replace/paste it into AssetspluginsAndroid of your Unity project. • In Unity Project, select File option from menu and than select Build settings. Click on Player Settings-->Other Settings—Identifie-->BundleIdentifier modify default package name (com.shephertz.app42.android.pushservice) with your package name that you have used while building the library project.
  15. 15. IT IS THAT SIMPLE!!!
  16. 16. 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
  17. 17. 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:

×