-
Notifications
You must be signed in to change notification settings - Fork 86
bring back firebase, fix android push notifications #124
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
base: master
Are you sure you want to change the base?
Conversation
|
These changes look good to me. Unfortunately, I'm unable to test Android. Are you cool with these @jcesarmobile ? |
This comment was marked as abuse.
This comment was marked as abuse.
|
The plugin never had firebase notifications implemented, it had a dependency to firebase messaging, but no code. Anyway, I don't have experience with intercom, so it's up to you what you merge and what not. |
|
why you can't use jcesar is right, we should not pin firebase messaging dependencies here. |
|
I do use I didn't just make this PR for fun, I made it because this repo does not work. My fix makes it work. Up to you guys but I have no reason to move back to main repo when it's literally broken for me. |
stewones
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't want to force external dependencies in plugins unless strictly necessary. Additionally, adding Firebase Messaging for Android only would break interoperability with iOS.
I hope my comments help you implement your app in a balanced way, where it fixes your issues while still using this plugin.
| androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion" | ||
| androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion" | ||
| implementation "io.intercom.android:intercom-sdk:$intercomSdkVersion" | ||
| implementation "com.google.firebase:firebase-messaging:$firebaseMessagingVersion" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jpike88 have you tried defining the firebase-messaging dep in your app's build.gradle instead ?
| @@ -1,5 +1,12 @@ | |||
| <manifest xmlns:android="http://schemas.android.com/apk/res/android" | |||
| > | |||
| <application> | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here, you should be able to define this in your app layer, not in the plugin.
| @@ -0,0 +1,29 @@ | |||
| package com.getcapacitor.community.intercom.intercom; | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this MessagingService could be implemented in the MainActivity if using the app's AndroidManifest
| String apiKey = config.getPluginConfiguration("Intercom").getString("androidApiKey"); | ||
| String appId = config.getPluginConfiguration("Intercom").getString("androidAppId"); | ||
|
|
||
| switch (IntercomPushManager.getInstalledModuleType()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure about this part as I can't test. but do we really need to tell Intercom to cache a sender id? if so, something to investigate and move to the app layer as well.
fixes #87