Pushwoosh在Unity的发行版本中不起作用

Pushwoosh在Unity的发行版本中不起作用

本文介绍了Pushwoosh在Unity的发行版本中不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图将Pushwoosh与Unity集成在一起.最新版本需要我实际使用gradle的proguard,因为存在multidex错误.之后,由于proguard出现了重复的文件错误,我通过创建proguard user.txt文件并添加以下几行来解决此问题.

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.**

现在,当我固定所有设备并在所有设备上正常运行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?

推荐答案

我找到了答案,似乎这个问题仅发生在三星手机上.我四处搜索并尝试将其添加到清单文件中. (在应用程序"标签中查找那些想知道的内容.)

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>

似乎三星可能在后台使用Firebase服务,这与使用FCM服务的pushwoosh冲突.无论如何..看起来像这样对我有用.

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.

在哪里找到它,以供进一步研究.

这篇关于Pushwoosh在Unity的发行版本中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-20 14:22