flurry / unity-flurry-sdk

Unity plugin for Flurry SDK
Apache License 2.0
25 stars 5 forks source link

Unity : Issue with enable Flurry Messaging in Android #2

Closed emaadgh closed 4 years ago

emaadgh commented 5 years ago

Hi, I want to use Flurry Messaging in my Unity project, I already added Flurry analytics to my project and It works correctly. As it said in Readme we need to set up a Firebase Cloud Messaging client app for our project that I already have it in my project because I'm using Firebase Cloud Messaging for sending messages to users from Firebase Panel. I also updated my AndroidManifest file with required elements, I uploaded in a gist: https://gist.github.com/emaadgh/30292ff3e58634af9b85d03ecd69ee1b

Now when I build my project and run it on an Android device I get this in Log :

I/Unity: To enable Flurry Messaging for Android, please remember to update your AndroidManifest.xml to setup the Messaging. D/FlurryAgent: isInstantApps dependency is not added W/FlurryAgent: Flurry session started for context:com.google.firebase.MessagingUnityPlayerActivity@5919a90 W/FlurryAgent: Flurry session resumed for context:com.google.firebase.MessagingUnityPlayerActivity@5919a90 I/Unity: To enable Flurry Messaging for Android, please remember to update your AndroidManifest.xml to setup the Messaging. I/FlurryAgent: New main file also not found. returning.. D/FlurryAgent: Referrer file contents: null I/FlurryAgent: Agent report type: main device D/FlurryAgent: Flushing deferred events queues. W/FlurryAgent: Analytics report sent.

That tells me to update the AndroidManifest.xml file that I already had. I created a Push Campaign in Flurry panel and tried to send a message to the client, but the client didn't receive it. What am I doing wrong here? Thanks.

poting-oath commented 5 years ago

@emaadgh Thanks for your feedback! From your AndroidManifest.xml, you need to specify the Application class in the section like,

    <application
        android:name="com.flurry.android.FlurryUnityApplication"
        ...

If you don't have your own Application. If you do, you will need to merge it with FlurryUnityApplication.java.

poting-oath commented 5 years ago

@emaadgh Does adding android:name="com.flurry.android.FlurryUnityApplication" work for you? Thanks!

poting-oath commented 5 years ago

@emaadgh Does the suggested fix work for you? We may close this issue if not received further issue. Thanks!