Android additional platforms
By Technical Support
#22 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”.

Code: Select all<meta-data android:name="BP_APPID" android:value="R0GG9ICFLM">
<meta-data android:name="BP_PROJECT_ID" android:value="A515998511673">
</meta-data></meta-data>


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:

Code: Select all<meta-data android:name="BP_BROADCAST_PUSH" android:value="true"><meta-data android:name="BP_APPID" android:value="R0GG9ICFLM"><meta-data android:name="BP_PROJECT_ID" android:value="A515998511673"><meta-data android:name="BP_APPID" android:value="R0GG9ICFLM"><meta-data android:name="BP_PROJECT_ID" android:value="A515998511673"><meta-data android:name="BP_APPID" android:value="R0GG9ICFLM"><meta-data android:name="BP_PROJECT_ID" android:value="A515998511673"><meta-data android:name="BP_APPID" android:value="R0GG9ICFLM"><meta-data android:name="BP_PROJECT_ID" android:value="A515998511673"><meta-data android:name="BP_APPID" android:value="R0GG9ICFLM"><meta-data android:name="BP_PROJECT_ID" android:value="A515998511673"><meta-data android:name="BP_APPID" android:value="R0GG9ICFLM"><meta-data android:name="BP_PROJECT_ID" android:value="A515998511673">
<meta-data android:name="BP_APPID" android:value="R0GG9ICFLM">
<meta-data android:name="BP_PROJECT_ID" android:value="A515998511673">
</meta-data></meta-data></meta-data></meta-data></meta-data></meta-data></meta-data></meta-data></meta-data></meta-data></meta-data></meta-data></meta-data></meta-data></meta-data>


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!