Upsight logo Back to top

Push

Prerequisites


For iOS Push prerequisites, please take a look at the iOS Push Prerequisites Section of the iOS Integration Guide

For Android Push prerequisites, please take a look at the Android Push Prerequisites Section of the Android Integration Guide

Integrate Push


Integrate Push

To integrate push notifications in your app, you must register for push notifications at app launch in order to correctly handle pending notifications received after your app has been killed. For Android, you must also set the GCM Project Number in the Project Configuration Wizard.

If at any point you would like to unregister or reregister a device for push notifications simply call Upsight.unregisterForPushNotifications() and Upsight.registerForPushNotifications() respectively.

Note for iOS When Unity creates an Xcode build of your project, please make sure to check Preprocessor.h and that #define UNITY_USES_REMOTE_NOTIFICATIONS 1 is present in the file. If this is equal to #define UNITY_USES_REMOTE_NOTIFICATIONS 0, Unity believes push is not active in your application and has disabled Push. To enable push, please change this flag to the value of 1.

Image Push


Upsight's Unity SDK version 4.3.2 and higher supports rich image push on both iOS and Android. On SDK versions 4.4 and later, image push is automatically set up when an application is built with Unity versions 5.4 and above.

Developers using Unity 4 or an older version of the Upsight SDK will have to manually import their project into Xcode 8 and follow the manual iOS steps to add support for image push.

Additionally, developers using Unity 5 versions prior to 5.4 will need to manually configure their development team in Xcode. This is a new requirement in Xcode 8, and older versions of Unity will not set this when making a build.

Manual Unity Instructions

Customizing Android Notifications


On Android, you can choose a custom push icon for your application. To do so, go to Upsight -> Project Configuration Wizard and scroll down to the Android notification icon section. Here, you can upload a 72x72 .png or .jpg that will be used as your push notification icon.

Android Push Icon