-
Notifications
You must be signed in to change notification settings - Fork 22
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
Push notification not working with firebase_messaging plugin #20
Comments
Hi, Please sent App_ID, Application key - You'll get from https://dashboard.kommunicate.io/settings/install and the User_ID of the receiver to [email protected] with the issue details. We can test and update you. |
Hi,
I sent all the info to [email protected] already.
Thanks,
Thang
|
Okay. We'll check and update you via email. |
Hi,
package io.pushnotification;
import com.applozic.mobicommons.commons.core.utils.Utils;
import com.google.firebase.messaging.RemoteMessage;
import io.flutter.plugins.firebasemessaging.FlutterFirebaseMessagingService;
import io.kommunicate.Kommunicate;
public class KmFirebaseMessagingService extends FlutterFirebaseMessagingService {
private static final String TAG = "KmFCMService";
@Override
public void onNewToken(String s) {
Utils.printLog(this, TAG, "Found deviceToken in KM : " + s);
super.onNewToken(s);
Kommunicate.updateDeviceToken(this, s);
}
@Override
public void onMessageReceived(RemoteMessage remoteMessage) {
Utils.printLog(this, TAG, "Kommunicate notification processing...");
if (Kommunicate.isKmNotification(this, remoteMessage.getData())) {
return;
}
super.onMessageReceived(remoteMessage);
}
}
<application
android:icon="@mipmap/launcher_icon"
android:label="SDO"
tools:replace="android:label">
<meta-data
android:name="com.facebook.sdk.ApplicationId"
android:value="@string/facebook_app_id" />
<activity
android:name="com.my.company.MainActivity"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true"
android:launchMode="singleTop"
android:theme="@style/LaunchTheme"
android:windowSoftInputMode="adjustResize">
<!-- Specifies an Android theme to apply to this Activity as soon as
the Android process has started. This theme is visible to the user
while the Flutter UI initializes. After that, this theme continues
to determine the Window background behind the Flutter UI. -->
<meta-data
android:name="io.flutter.embedding.android.NormalTheme"
android:resource="@style/NormalTheme" />
<!-- Displays an Android View that continues showing the launch screen
Drawable until Flutter paints its first frame, then this splash
screen fades out. A splash screen is useful to avoid any visual
gap between the end of Android's launch screen and the painting of
Flutter's first frame. -->
<meta-data
android:name="io.flutter.embedding.android.SplashScreenDrawable"
android:resource="@drawable/launch_background" />
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="FLUTTER_NOTIFICATION_CLICK" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<!-- Don't delete the meta-data below.
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
<meta-data
android:name="flutterEmbedding"
android:value="2" />
<service
android:name="io.pushnotification.KmFirebaseMessagingService"
android:exported="true"
android:stopWithTask="false"
tools:node="replace">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>
</service>
<service
android:name="io.flutter.plugins.firebasemessaging.FlutterFirebaseMessagingService"
tools:node="remove" />
</application> Flutter version:
firebase_messaging: 7.0.3
kommunicate_flutter: 1.1.6 |
Hi, |
Hi,
I'm using firebase_messaging 7.0.3 version.
I'm following the documents for push notification: https://docs.kommunicate.io/docs/flutter-pushnotification. (Added the FCM key to dashboard already). But seem like kommunicate plugin doesn't work with firebase_messaging.
Best,
The text was updated successfully, but these errors were encountered: