unity-game-enginepushwoosh

Pushwoosh not working in the release build of Unity


I was trying to integrate Pushwoosh with Unity. The latest version needed me to actually use pro guard with gradle as there was multidex error. After that there were duplicate file errors because of proguard, which I fixed by creating a pro guard user.txt file and adding the following lines.

-keep com.pushwoosh.** {*;}
-dontwarn com.pushwoosh.** 

Now when I have everything fixed and pushwoosh running properly in all devices, there comes certain devices which do not get notifications in the release build. (There are no problems with the debug build.)

Can anyone help me with this? What reason could there be?


Solution

  • I found the answer, seems like this issue was only occurring with Samsung phones. I searched around and tried adding this to the Manifest file. (In the "application" tag for those wondering.)

    <service
        android:name=".FirebaseInstanceIdRouterService">
        <intent-filter>
            <action android:name="com.google.firebase.INSTANCE_ID_EVENT"/>
        </intent-filter>
    </service>
    
    <service
        android:name=".FirebaseMessagingRouterService">
        <intent-filter>
            <action android:name="com.google.firebase.MESSAGING_EVENT"/>
        </intent-filter>
    </service>
    

    Seems like Samsung might have been using Firebase services in the background which conflicts with the pushwoosh using FCM services. Anyway..seems like this works for me.

    Where I found it, for further study purposes.