Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question] Cannot find symbol import com.google.firebase.messaging.MessageForwardingService after updating firebase-messaging-unity #1138

Open
JiekeZhu opened this issue Nov 5, 2024 · 3 comments
Assignees
Labels
api: messaging needs-attention Need Googler's attention

Comments

@JiekeZhu
Copy link

JiekeZhu commented Nov 5, 2024

What is your question?

Cannot find symbol import com.google.firebase.messaging.MessageForwardingService after updating firebase-messaging-unity.

In my jar module, add the MessagingUnityPlayerActivity.java file and the packages needed.
There is an error at import com.google.firebase.messaging.MessageForwardingService;
Just can't find MessageForwardingService.

Firebase Unity SDK Version

12.4.0

Unity editor version

2022.3.43f1

Installation Method

.unitypackage

Problematic Firebase Component(s)

No response

Other Firebase Component(s) in use

No response

Additional SDKs you are using

Facebook.

Targeted Platform(s)

Apple Platforms, Android

Unity editor platform

Windows

Scripting Runtime

IL2CPP

Release Distribution Type

Pre-built SDK from https://firebase.google.com/download/unity

@google-oss-bot
Copy link

I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.

@argzdev
Copy link

argzdev commented Nov 5, 2024

Hey @JiekeZhu, thanks for reaching out. I tried reproducing this behavior but so far I've encountered no issues. Here's what I did:

  1. Open our Firebase Unity Quickstart for Firebase Cloud Messaging
  2. Import Firebase Cloud Messaging version 12.3.0 via Assets > Import Package > Custom Package...
  3. Run app in Android platform (Builds and runs successfully)
  4. Delete Firebase Cloud Messaging via Assets > External Dependency Manager > Version Handler > Uninstall Managed Packages (choose Firebase Cloud Messaging 12.3.0)
  5. Import Firebase Cloud Messaging version 12.4.0 via Assets > Import Package > Custom Package...
  6. Run app in Android platform (Builds and runs successfully)

Not sure if I'm missing anything. Could you specify the steps you took to reproduce this behavior? Thanks!

@argzdev argzdev added the needs-info Need information for the developer label Nov 5, 2024
@argzdev argzdev self-assigned this Nov 5, 2024
@JiekeZhu
Copy link
Author

JiekeZhu commented Nov 6, 2024

I follow the steps in this doc, https://firebase.google.com/docs/cloud-messaging/unity/client.
At the step, Configuring a custom entry point Activity,
I need to modify my CustomActivity.java to extend from com.google.firebase.MessagingUnityPlayerActivity, which will be produced into a sdk.aar package, an Android Studio module.
And then I get this error, MessageForwardingService can't be found.
I stopped here.

I guess it's because I'm trying to do the work in an aar module and I failed to configure the correct gradle file.

Here's the dependencies.
implementation 'com.google.firebase:firebase-analytics:22.1.2'
implementation 'com.google.firebase:firebase-app-unity:12.4.0'
implementation 'com.google.firebase:firebase-common:21.0.0'
implementation 'com.google.firebase:firebase-iid:21.1.0'
implementation 'com.google.firebase:firebase-messaging:24.0.3'
implementation 'com.google.firebase:firebase-messaging-unity:12.4.0'
implementation 'com.google.flatbuffers:flatbuffers-java:1.12.0'

The result is an error in my java file, MessageForwardingService can't be imported.

@google-oss-bot google-oss-bot added needs-attention Need Googler's attention and removed needs-info Need information for the developer labels Nov 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: messaging needs-attention Need Googler's attention
Projects
None yet
Development

No branches or pull requests

3 participants