Unity SDK doesn't work on device

Hi,

I recently integrated the countly SDK in my Unity project. When I use it in editor everything is working fine.

If I try to build for an Android device, the countly_notifications.jar contained in Plugins/Android/Notifications/, tries to include a different version of a library which is already included by my ads system, resulting in a build error.

I can remove the Notifications folder entirely (I don't need notifications) but if I do so I can build the project but I get a NullPointerException in the CheckInputEvent method in Countly.cs. I'm afraid that this is caused by the removal of the Notifications folder. 

Can somebody help me?

0

Comments

1 comment
  • Official comment

    Hello,
    After the removal of the notification folder, it is throwing exceptions because of our protection mechanism that would validate if everything is set up correctly for the push. In this case, the resulting situation is a bug because that check should not have happened if no push notifications are required.

    As a temporary fix, you could set the notification mode in the SDK configuration to "None" and add the following if statement to the at the top of 'ProxyNotificationsService' class constructor.

    if (config.NotificationMode == TestMode.None)
    {
      return;
    }

    That file can be found at 'Assets/Plugins/Notifications/Impls/'.
    This workaround should help you in your current circumstance. A more permanent solution will be added to the next release. Let us know if you still have any issues.

    Comment actions Permalink

Please sign in to leave a comment.