Can't register to push notifications (Unity3d - Android)

Answered

Comments

4 comments

  • Avatar
    Gayview Mahat

    Hey Milos, indeed you should have the "A" prefix in front of your Google Project Number on Unity, please disregard this error of Manifest Validator (the prefix is not used in most of the frameworks).

    Also, I can see that you have already contacted or support team, and I am sure they will be able to help you with the issue you encountered. The solution will be posted here as well.

  • Avatar
    Milos Rovcanin

    I have noticed this in the device console log:

    05-15 09:20:46.164: I/System.out(22111): Tried to get instance of PushManager with no Pushwoosh App ID or Project Id set 05-15 09:20:46.164: W/System.err(22111): java.lang.NullPointerException 05-15 09:20:46.164: W/System.err(22111): at com.arellomobile.android.push.PushwooshProxy.<init>(Unknown Source) 05-15 09:20:46.164: W/System.err(22111): at com.arellomobile.android.push.PushwooshProxy.instance(Unknown Source) 05-15 09:20:46.164: W/System.err(22111): at com.unity3d.player.UnityPlayer.nativeRender(Native Method) 05-15 09:20:46.164: W/System.err(22111): at com.unity3d.player.UnityPlayer.a(Unknown Source) 05-15 09:20:46.164: W/System.err(22111): at com.unity3d.player.UnityPlayer$b.run(Unknown Source) 05-15 09:20:46.164: I/System.out(22111): Tried to get instance of PushManager with no Pushwoosh App ID or Project Id set 05-15 09:20:46.250: I/Unity(22111): AndroidJavaException: java.lang.NullPointerException 05-15 09:20:46.250: I/Unity(22111): at UnityEngine.AndroidJNISafe.CheckException () [0x00000] in <filename unknown="">:0 05-15 09:20:46.250: I/Unity(22111): at UnityEngine.AndroidJNISafe.CallVoidMethod (IntPtr obj, IntPtr methodID, UnityEngine.jvalue[] args) [0x00000] in <filename unknown="">:0 05-15 09:20:46.250: I/Unity(22111): at UnityEngine.AndroidJavaObject._Call (System.String methodName, System.Object[] args) [0x00000] in <filename unknown="">:0 05-15 09:20:46.250: I/Unity(22111): at UnityEngine.AndroidJavaObject.Call (System.String methodName, System.Object[] args) [0x00000] in <filename unknown="">:0 05-15 09:20:46.250: I/Unity(22111): at PushNotificationsAndroid.registerForPushNotifications () [0x00000] in <filename unknown="">:0 05-15 09:20:46.250: I/Unity(22111): at PushNotificationsAndroid.Start () [0x00000] in <filename unknown="">:0

    My android manifest is set uo according to the guide. What can be wrong here?

  • Avatar
    Gayview Mahat

    Have you specified Pushwoosh App ID and Google Project Number in your manifest as per our guide? In case you have multiple manifests, please make sure they merge correctly.

  • Avatar
    Gayview Mahat

    There were several manifest files in the project. The issue was resolved by implementing everything in a single AndroidManifest.xml

Please sign in to leave a comment.