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

FcmTokenListenerService & InAppNotificationActivity in AndroidManifest.xml shows linter error when migrated to AndroidX #68

Closed
mochadwi opened this issue Apr 26, 2020 · 3 comments

Comments

@mochadwi
Copy link

mochadwi commented Apr 26, 2020

My setup:

CleverTap: 3.7.2
Firebase Messaging: 19.0.0

please mention me if you need more setup configuration or provide more error/output logs

Linter error:
Registered class is not instantiatable correctly
Screen Shot 2020-04-26 at 2 32 04 PM

My Approach:

[suggested]
An open function to extends the InAppNotificationActivity so we can use correct androidx imports & place it in our AndroidManifest.xml

or any workaround/alternative currently to solve this issue?

P.S: But if the milestone for androidx migration still far away, maybe I just have to add locally the clevertap then T_T

@mochadwi mochadwi changed the title FcmTokenListenerService & InAppNotificationActivity in AndroidManifest.xml shows linter error when migrated to AndroidX FcmTokenListenerService & InAppNotificationActivity in AndroidManifest.xml shows linter error when migrated to AndroidX Apr 26, 2020
@darshanclevertap
Copy link
Collaborator

There are two separate issues here -

  1. The InAppNotificationActivity is now a part of the CleverTap SDK's AndroidManifest.xml and you don't need to add it in your AndroidManifest.xml file. That should solve the lint issue.

  2. As for the FCMMessageListener class, you can follow Didn't find class "com.clevertap.android.sdk.FcmTokenListenerService" crash on Coolpad devices #43 and easily avoid any issues.

You don't need to add the AAR file manually if you follow the above 2 steps.

@mochadwi
Copy link
Author

mochadwi commented Apr 27, 2020

Now that's great, so it is safe to remove the InAppNotification activity? Did you guys already mentioned this feature in official docs somewhere (the others might not found it too)

I assume, because AppsFlyer SDK manifest will be merged to our apps manifest (that is safe to remove InAppNotification activity from apps manifest) @darshanclevertap

@darshanclevertap
Copy link
Collaborator

Yes, @mochadwi CleverTap's manifest gets merged with your app's manifest file at compile time. So you don't need to add it in your manifest separately. I'll check our official documentation as well, and update it if its not. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants