Pushwoosh not working in the release build of Unit

2019-03-06 19:36发布

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?

1条回答
Summer. ? 凉城
2楼-- · 2019-03-06 20:23

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.

查看更多
登录 后发表回答