»  ANDROID »  Android Additional Platforms »  Unity

Unity

Unity has never been so easy! Our extensive guides for all platforms currently available on the market show how to integrate push notifications within several minutes and with several lines of code. You can choose between native programming tools and a diverse set of cross-platform solutions. We are working hard on extending the list of supported SDKs, plugins and modules, so we advise coming back once in a while to see what's new. If you believe that some great tools should be added here, please let us know, and we will do our best to get them up and running!

 

To integrate BulkPush into your Unity application you need to do simple following steps:

 

1. Import Unity Android plugin into your assets folder in Unity.

2. Replace PACKAGE_NAME in Plugins/Android/AndroidManifest.xml with your project package. Please note that in Unity it is called ‘Bundle Identifier’

3.In the same manifest change the value of the “BP_APPID” property to your BulkPush Application ID Also change the value of the BP_PROJECT_ID to your GCM Project Number. The GCM Project Number is a number, but make sure you prefix it with the letter “A”.

 



 

4.To receive push notifications on Android when the application is active without posting the notification to the status bar, set the following line to true:

 




 

5.Attach PushNotificationsAndroid.cs to any GameObject in the scene, for example, to the Camera object.

 

That’s it! How easy is that?

 

See Android Configuration Guide for more information on getting your GCM Project Number.

IMPORTANT! Make sure you leave the first letter (“A”) when entering your Project Number.

 

Expert Mode On!

 

In step 5 you’ve attached the PushNotificationsAndroid.cs to some GameObject in the scene. Thus, BulkPush plugin doesn’t inherit from Unity Activities, so it won’t conflict with other third-party plugins that replace these activities with their own.

 

Want to have more control? Note that PushNotificationsAndroid.cs is the C# class. The interface is very simple and describes itself pretty much. You can get push token, handle push registration and push notification events, and set tags!

 

 

© 2015 BulkPush.com By Broadnet Technologies Ltd.