Pushwoosh not working in the release build of Unity

╄→гoц情女王★ 提交于 2019-12-31 07:32:45

问题


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:


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.



来源:https://stackoverflow.com/questions/51220008/pushwoosh-not-working-in-the-release-build-of-unity

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!