Firebase Cloud Messaging - onMessageReceived not working

firebase onmessagereceived not called when app in foreground
onmessagereceived not called when app is killed
onmessagereceived not called android oreo
firebase cloud messaging android
handle notification messages in a backgrounded app android
onmessagereceived not called when app is killed android
how to handle notification when app in background in firebase android
firebase cloud messaging credentials

I want to make a simple notification feature in my app. I followed this YouTube video and both of these Firebase documentation URLs 1 and 2 plus the Firebase tool assistant in Android Studio (which says I'm connected to Firebase). For some reason, following these steps and documents on my older app (which code is posted below), it won't allow me to receive notifications. However, if I follow the same steps on a brand new app it works perfectly. I tested both apps on the same physical device and environment in the background, active and terminated states. Every time the new demo app I created works with no issue but my older app which I want notifications in does not work. Both tested without getting the device ID. I do not even get any error logs or any TAG log. I think one of my compiled projects is interfering, not sure exactly what but I might have to look there.

I also checked out all these SO posts already: 123 and more

PS. I removed my package name below, I checked multiple times on FireBase and they match so I know that is not the issue. However, my new demo app's FireBase shows that my app connected but my older app's FireBase did not. Also, I've set a bounty before and still running into the same issue.

Here's my problematic code:

Notification.java (its a service like the documentation asks)

public class Notification extends FirebaseMessagingService {
public Notification() {
}
@Override
public void onMessageReceived(RemoteMessage remoteMessage) {
    showNotification(remoteMessage.getData().get("message"));

    Log.d("FMC", "Message Notification Body: " + remoteMessage.getNotification().getBody());
}

private void showNotification(String message) {
    Intent i=new Intent(this, SplashScreen.class);
    i.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);

    PendingIntent pendingIntent=PendingIntent.getActivity(this,0,i,PendingIntent.FLAG_UPDATE_CURRENT);
    NotificationCompat.Builder builder=new NotificationCompat.Builder(this)
            .setAutoCancel(true)
            .setContentTitle("FCM TITLE").setContentText(message)
            .setSmallIcon(R.drawable.pt_icon)
            .setDefaults(android.app.Notification.DEFAULT_ALL)
            .setContentIntent(pendingIntent);

    NotificationManager notificationManager= (NotificationManager) getSystemService(NOTIFICATION_SERVICE);
    notificationManager.notify(0,builder.build());
}
}

Notice I do not even get a log in the notification.java above.

Project.gradle

buildscript {
repositories {
    jcenter()
    maven {
        url 'https://maven.google.com/'
        name 'Google'
    }
}
dependencies {
    classpath 'com.android.tools.build:gradle:3.0.1'
    classpath 'com.google.gms:google-services:3.2.0'

    // NOTE: Do not place your application dependencies here; they belong
    // in the individual module build.gradle files
}
}

allprojects {
repositories {
    jcenter()

    maven { url "https://jitpack.io" }
    maven { url 'https://maven.google.com' }
    google()
}
}

task clean(type: Delete) {
delete rootProject.buildDir
}

app.gradle

apply plugin: 'com.android.application'

android {
compileSdkVersion 26

defaultConfig {

    minSdkVersion 16
    targetSdkVersion 26
    versionCode 16
    versionName "2.6"
}
dexOptions {
    jumboMode = true
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}
//Code below is added to fix random error ("Fix the issues identified by lint")
lintOptions {
    abortOnError false
}
productFlavors {
}
}

dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
//compile project(path: ':backend', configuration: 'android-endpoints')
//Removed the 0.2.+
compile 'com.daprlabs.aaron:cardstack:0.3.1-beta0'
//noinspection GradleCompatible
compile 'com.android.support:appcompat-v7:25.4.0'
compile "com.android.support:appcompat-v7:19.0.+"
compile 'com.android.support:design:23.4.0'
compile 'com.android.support:recyclerview-v7:23.4.0'
compile 'com.android.support:cardview-v7:23.4.0'

compile 'com.github.danylovolokh:video-player-manager:0.2.0'
compile 'com.github.danylovolokh:list-visibility-utils:0.2.0'



implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.google.firebase:firebase-messaging:11.8.0'
compile 'com.google.firebase:firebase-core:11.8.0'


compile 'com.orhanobut:dialogplus:1.11@aar'


compile 'com.nineoldandroids:library:2.4.0'
compile files('libs/sinch-android-rtc-3.9.14.jar')
compile 'com.amazonaws:aws-android-sdk-s3:2.4.4'
compile 'com.github.chrisbanes:PhotoView:1.2.6'
compile 'com.davemorrissey.labs:subsampling-scale-image-view:3.5.0'
compile 'com.github.amlcurran.showcaseview:library:5.4.3'
compile 'com.github.d-max:spots-dialog:0.7@aar'
compile 'com.victor:lib:1.0.4'
compile 'com.github.bumptech.glide:glide:3.5.2'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.android.support:recyclerview-v7:23.0.0'
compile 'me.grantland:autofittextview:0.2.0'
compile 'com.wang.avi:library:1.0.5'
compile 'com.nineoldandroids:library:2.4.0'
compile 'com.braintreepayments.api:drop-in:2.3.8'
compile 'com.braintreepayments.api:braintree:2.3.9'
compile 'com.loopj.android:android-async-http:1.4.9'
compile 'com.getbase:floatingactionbutton:1.10.1'
compile 'com.mxn.soul:flowingdrawer-core:1.2.2'
compile 'com.github.rengwuxian:MaterialEditText:2.1.4'
compile 'com.github.PhilJay:MPAndroidChart:v3.0.1'
compile 'net.gotev:uploadservice:3.2.5'
compile 'in.srain.cube:ultra-ptr:1.0.11'
compile 'com.android.support.constraint:constraint-layout:1.0.0-alpha9'
testCompile 'junit:junit:4.12'
//implementation 'com.android.support:appcompat-v4:23.+'
}


apply plugin: 'com.google.gms.google-services'

AndroidManifest.xml

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">

<uses-feature
    android:name="android.hardware.microphone"
    android:required="false" />

<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.INTERNET" />
<!--
so the app can be found on tablets Google Play

<uses-permission android:name="android.permission.CALL_PHONE" />
-->
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
<!-- <uses-permission android:name="com.google.android.c2dm.permission.RECEIVE"/> -->
<!-- <uses-permission android:name="android.permission.WAKE_LOCK" /> -->
<!-- <uses-permission android:name="android.permission.READ_PHONE_STATE" /> -->

<grant-uri-permission
    android:path="string"
    android:pathPattern="string"
    android:pathPrefix="string" />

<application
    android:allowBackup="true"
    android:icon="@mipmap/_icon"
    android:label=""
    android:supportsRtl="true"
    android:theme="@style/Theme.AppCompat.Light.NoActionBar"
    tools:node="replace">
    <activity android:name=".SplashScreen">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>

    <service android:name=".Notification">
        <intent-filter>
            <action android:name="com.google.firebase.MESSAGING_EVENT" />
        </intent-filter>
    </service>

    <!-- &lt;!&ndash; -->
    <!-- Set custom default icon. This is used when no icon is set for incoming notification messages. -->
    <!-- See README() for more. -->
    <!-- &ndash;&gt; -->
    <!-- <meta-data -->
    <!-- android:name="com.google.firebase.messaging.default_notification_icon" -->
    <!-- android:resource="@drawable/pt_icon" /> -->
    <!-- &lt;!&ndash; -->
    <!-- Set color used with incoming notification messages. This is used when no color is set for the incoming -->
    <!-- notification message. See README() for more. -->
    <!-- &ndash;&gt; -->
    <!-- <meta-data -->
    <!-- android:name="com.google.firebase.messaging.default_notification_color" -->
    <!-- android:resource="@color/colorAccent" /> -->

    <activity android:name=".SignInForm" />
    <activity android:name=".SignUpPage" />
    <activity android:name=".SellerFillOutForm" />
    <activity android:name=".BuyerFillOutForm" />
    <activity
        android:name=".BuyerHomePage"
        android:label="@string/title_activity_buyer_home_page" />

    <action android:name="android.intent.action.VIEW" />

    <category android:name="android.intent.category.BROWSABLE" />

    <data android:scheme="http" />

    <activity android:name=".VideoPlayerActivity" />
    <activity android:name=".BackgroundTask" />

    <service
        android:name="com.amazonaws.mobileconnectors.s3.transferutility.TransferService"
        android:enabled="true" />

    <activity android:name=".EnterCreditCard" />
    <activity android:name=".PickMeeting" />
    <activity android:name=".HowBillingWorks" />
    <activity android:name=".ReBillingPlan" />
    <activity android:name=".PayBill" />
    <activity
        android:name=".Buyer_Home_Page"
        android:configChanges="locale|orientation" />
    <activity android:name=".Seller_Home_Page" />
    <activity android:name=".ProductList" />
    <activity android:name=".EditProduct" />
    <activity android:name=".EditSellerAccount" />
    <activity android:name=".EditBuyerAccount" />
    <activity android:name=".Video_Calling.incomingVideoCall" />
    <activity android:name=".Video_Calling.CallScreenActivity" />
    <activity android:name=".SellerAnalytics" />
    <activity android:name=".Swipe_Layout.SwipeLayout" />
    <activity android:name=".Swipe_Layout.PopUpActivity" />
</application>

</manifest>

Working code below (the app I made just to test my steps and works 100%):

Notifaction.java

import android.app.Notification;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.app.Service;
import android.content.Intent;
import android.os.IBinder;
import android.support.v4.app.NotificationCompat;
import android.util.Log;

import com.google.firebase.messaging.FirebaseMessagingService;
import com.google.firebase.messaging.RemoteMessage;

import static android.content.ContentValues.TAG;

public class Notifaction extends FirebaseMessagingService {
public Notifaction() {
}
@Override
public void onMessageReceived(RemoteMessage remoteMessage) {
    showNotification(remoteMessage.getData().get("message"));
}

private void showNotification(String message) {
    Intent i=new Intent(this,MainActivity.class);
    i.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);

    PendingIntent pendingIntent=PendingIntent.getActivity(this,0,i,PendingIntent.FLAG_UPDATE_CURRENT);
    NotificationCompat.Builder builder=new NotificationCompat.Builder(this)
            .setAutoCancel(true)
            .setContentTitle("FCM TITLE").setContentText(message)
            .setSmallIcon(R.drawable.ic_launcher_background)
            .setDefaults(Notification.DEFAULT_ALL)
            .setContentIntent(pendingIntent);

    NotificationManager notificationManager= (NotificationManager) getSystemService(NOTIFICATION_SERVICE);
    notificationManager.notify(0,builder.build());
}
}

AndroidManiest.xml

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="">
<application
    android:allowBackup="true"
    android:icon="@mipmap/ic_launcher"
    android:label="@string/app_name"
    android:roundIcon="@mipmap/ic_launcher_round"
    android:supportsRtl="true"
    android:theme="@style/AppTheme">
    <activity android:name=".MainActivity">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>

    <service
        android:name=".Notifaction">
        <intent-filter>
            <action 
android:name="com.google.firebase.MESSAGING_EVENT"/>
        </intent-filter>
    </service>

</application>

</manifest>

app.gradle

apply plugin: 'com.android.application'

android {
compileSdkVersion 26
defaultConfig {
    applicationId ""
    minSdkVersion 14
    targetSdkVersion 26
    versionCode 1
    versionName "1.0"
    testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}
}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.google.firebase:firebase-messaging:11.8.0'
compile 'com.google.firebase:firebase-core:11.8.0'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
}


apply plugin: 'com.google.gms.google-services'

Project.grdle

    // Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {

repositories {
    google()
    jcenter()
}
dependencies {
    classpath 'com.android.tools.build:gradle:3.0.1'
    classpath 'com.google.gms:google-services:3.2.0'

    // NOTE: Do not place your application dependencies here; they 
belong
    // in the individual module build.gradle files
}
}

allprojects {
repositories {
    google()
    jcenter()
}
}

task clean(type: Delete) {
delete rootProject.buildDir
}

Also, I added the .json file to both projects. Here is a screenshot: .

If you are receiving device token and you have server api key then check your code working properly or not using pushtry . it will give error like Invalid Registration, 404 Error etc if you have done any mistake in your code. and for implementation of FCM, you can follow this tutorial- FCM Tutorial

One more thing i have notice in your build.gradlefile there is no any applicationId "Package Name" in defaultConfig. I am not sure but this is package name and used when we create project on firebase console (Project name with package)

The code is not executed at onMessageReceived () · Issue #28 , This method onMessageReceived () is not called when the app in the Note that the FCM implementation is exactly the same is the GCM  I'm using Firebase Cloud Messaging to send notifications and ShortcutBadger to update the unread messages count on our app badge. I've extended the FirebaseMessagingService class and implemented the override method onMessageReceived , which seems to be working fine since I get notifications when my app is in the background or killed.

Most likely your notifications are not showing due to Android Oreo new notifications model which requires to specify channels definitions in order to build and show notifications. Also in your app.gradle, you are targeting android version 26 which is Android Oreo, so you will have to implement the code below either way.

It is easy to adopt. all you need to do is:

1. define a notification channel in your YourApplicationClass.onCreate()

    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {

            NotificationChannel chan1 = new NotificationChannel(
                YOUR_DESIRED_CHANNEL_ID_STRING,
                YOUR_DESIRED_CHANNEL_LABEL_STRING, 
                NotificationManager.IMPORTANCE_DEFAULT);

            chan1.setDescription(YOUR_DESIRED_CHANNEL_DESC_STRING);//OPTIONAL
            chan1.setLightColor(Color.BLUE);//OPTIONAL     
            chan1.setLockscreenVisibility(Notification.VISIBILITY_PUBLIC);//OPTIONAL
            chan1.setShowBadge(true);//OPTIONAL

            getManager().createNotificationChannel(chan1);
        }

2. replace you notification builder with this constructor

    NotificationCompat.Builder builder=
new NotificationCompat.Builder(this, YOUR_DESIRED_CHANNEL_ID_STRING);

Good to know that you can define more than one channel with different properties targeting Android Oreo and higher

OnMessageReceived not called when app in background · Issue , OnMessageReceived not called when app in background #316. Closed https://​firebase.google.com/docs/cloud-messaging/cpp/client#  just doesn't work - the onMessageReceived method is never called. The same code works when using WebView instead of TWA. Steps to reproduce: Create a TWA project; Pair with Firebase, add cloud messaging component; Create a class extending FirebaseMessagingService and onMessageReceived method; Delcare the service in AndroidManifest

If you take a look at this doc You don't seem to have a service that extends FirebaseInstanceIdService to manage the token creation/rotation. Here is a example code. The token you need to send the push notifications to a specific device is received by this class.

<service
    android:name=".MyFirebaseInstanceIDService">
    <intent-filter>
        <action android:name="com.google.firebase.INSTANCE_ID_EVENT"/>
    </intent-filter>
</service>

EDIT:

Okay, this error is bugging me now. I looked at your dependency tree and I see you're repeating some of them. For example you have three version of:

compile 'com.android.support:appcompat-v7:25.4.0'

Maybe you should clear that out to the newest version, or match it with the working version. Also you're using the new gradle plugin, but you haven't updated your depedencies to use implementation instead of compile in most cases, maybe try that as well? Here's why you should do it.

dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
//compile project(path: ':backend', configuration: 'android-endpoints')
//Removed the 0.2.+
compile 'com.daprlabs.aaron:cardstack:0.3.1-beta0'
//noinspection GradleCompatible
compile 'com.android.support:appcompat-v7:25.4.0'
compile "com.android.support:appcompat-v7:19.0.+"
compile 'com.android.support:design:23.4.0'
compile 'com.android.support:recyclerview-v7:23.4.0'
compile 'com.android.support:cardview-v7:23.4.0'

compile 'com.github.danylovolokh:video-player-manager:0.2.0'
compile 'com.github.danylovolokh:list-visibility-utils:0.2.0'



implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.google.firebase:firebase-messaging:11.8.0'
compile 'com.google.firebase:firebase-core:11.8.0'


compile 'com.orhanobut:dialogplus:1.11@aar'


compile 'com.nineoldandroids:library:2.4.0'
compile files('libs/sinch-android-rtc-3.9.14.jar')
compile 'com.amazonaws:aws-android-sdk-s3:2.4.4'
compile 'com.github.chrisbanes:PhotoView:1.2.6'
compile 'com.davemorrissey.labs:subsampling-scale-image-view:3.5.0'
compile 'com.github.amlcurran.showcaseview:library:5.4.3'
compile 'com.github.d-max:spots-dialog:0.7@aar'
compile 'com.victor:lib:1.0.4'
compile 'com.github.bumptech.glide:glide:3.5.2'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.android.support:recyclerview-v7:23.0.0'
compile 'me.grantland:autofittextview:0.2.0'
compile 'com.wang.avi:library:1.0.5'
compile 'com.nineoldandroids:library:2.4.0'
compile 'com.braintreepayments.api:drop-in:2.3.8'
compile 'com.braintreepayments.api:braintree:2.3.9'
compile 'com.loopj.android:android-async-http:1.4.9'
compile 'com.getbase:floatingactionbutton:1.10.1'
compile 'com.mxn.soul:flowingdrawer-core:1.2.2'
compile 'com.github.rengwuxian:MaterialEditText:2.1.4'
compile 'com.github.PhilJay:MPAndroidChart:v3.0.1'
compile 'net.gotev:uploadservice:3.2.5'
compile 'in.srain.cube:ultra-ptr:1.0.11'
compile 'com.android.support.constraint:constraint-layout:1.0.0-alpha9'
testCompile 'junit:junit:4.12'
//implementation 'com.android.support:appcompat-v4:23.+'
}

Also, update your dependencies and use implementation instead of compile:

implementation 'com.google.firebase:firebase-messaging:15.0.2'
implementation 'com.google.firebase:firebase-core:15.0.2'

Receive messages in an Android app, Automated Backups · Extend with Cloud Functions · Video series: Firebase for SQL For all messages where onMessageReceived is provided, your service execution limits may interfere with your ability to complete your work. Any notification message that does not explicitly set the icon in the notification payload. Firebase notifications behave differently depending on the foreground/background state of the receiving app. If you want foregrounded apps to receive notification messages or data messages, you’ll need to write code to handle the onMessageReceived callback.

// this help to start FCM service in background when phone restart.

Add receiver in Manifest.xml

<uses-permission android:name="android.permission.WAKE_LOCK" />
<receiver android:name=".OnBootBroadcastReceiver">
            <intent-filter>
                <action android:name="android.intent.action.BOOT_COMPLETED" />
            </intent-filter>
</receiver>

OnBootBroadcastReceiver.class

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;

public class OnBootBroadcastReceiver extends BroadcastReceiver {
    @Override
    public void onReceive(Context context, Intent intent) {
        Intent i = new Intent("com.examle.FirebaseMessagingReceiveService");
        i.setClass(context, FirebaseMessagingReceiveService.class);
        context.startService(i);
    }
}

Firebase onMessageReceived not called when app in , This is working as intended, notification messages are delivered to your onMessageReceived callback only when your app is in the foreground. Add Firebase Cloud Messaging to your Android, iOS, or Web app. Set up your trusted environment where you'll build and send message requests. You can write sending logic using the Admin SDK, and readily deploy that code on Cloud Functions for

Remove the notification payload from your FCM messages in order to have the data payload delivered to the onMessageReceived method.

Read link carefully given below.

When your app is in the background, data payload delivered to the onMessageReceived method only if there is no notification payload. (Mark the words)

In case both payloads exist then system automatically handles the notification part (system tray) and your app gets the data payload in the extras of the intent of launcher Activity (after the user tap on the notification).

In order to be able to serve both platforms successfully, Android and iOS, you may have to send different FCM messages according to client's OS.

Firebase onMessageReceived not called when app in foreground , I have read much documents regarding firebase push notification behaviour clearly. when my app is in background but not triggering onMessageReceived call back when app MyFirebaseMessagingService"> <intent-filter> <action in https://firebase.google.com/docs/cloud-messaging/android/receive. In easy words, after I read how to work with Firebase Cloud Messaging’ push notifications in Android, I felt that I needed more clarification, more specific scenarios, how to test its

Firebase onMessageReceived not called when , Firebase onMessageReceived not called when app in background Answers: As per Firebase Cloud Messaging documentation-If Activity is in  shomronh changed the title Firebase Cloud Messaging for android not working when the app is closed Google Cloud Messaging for android not working when the app is closed Aug 13, 2017 samtstern commented Aug 14, 2017 •

Firebase Notifications in Background & Foreground in Android, But when they integrate, there are few common issues which they stuck into. apps, the first thing comes in mind is Firebase Notifications or Firebase Messaging. onMessageReceived(remoteMessage); Notification notification = new https://firebase.google.com/docs/cloud-messaging/android/receive  Remote Notifications with Firebase Cloud Messaging. 07/31/2018; 23 minutes to read +4; In this article. This walkthrough provides a step-by-step explanation of how to use Firebase Cloud Messaging to implement remote notifications (also called push notifications) in a Xamarin.Android application.

Working easily with FCM push notifications in Android, In easy words, after I read how to work with Firebase Cloud Messaging' push Do not send the “notification” entry, because in this way onMessageReceived  In order to receive the onMessage event, your app must define the Firebase messaging service worker in firebase-messaging-sw.js. Alternatively, you can specify an existing service worker with useServiceWorker. // Give the service worker access to Firebase Messaging.

Comments
  • Could it be one of the compile libraries I use not let me interact with Firebase?*
  • do you receive any default notifications when sending from firebase console?
  • and when you run the App you receive log msg that "Firebase initialized successfully"?
  • I do not receive any notification whatsoever and not even a "Firebase initialized successfully" log :/
  • Can you show screenshot of your folder structure where you put the json file?
  • I removed the package name it has private info but I connected it with the Firebase Assistant Tool in Android Studio and on the Firebase website. Everything says its connected. Also, I did add the .json file.
  • this answer was auto-selected for the +25. This answer did not solve my issue.
  • @aj0822ArpitJoshi May I have another question for you? I have a project which testing from Firebase console works fine on debug but release version with proguard rules set not working. I test it using pushtry and it works fine. any opinion what whould be the problem?
  • If that's the case shouldn't my new app not work because it also targets Android Oreo and it doesn't follow the new notifications model?
  • you might be facing a different kind of problem or bug, but I am 100% sure that without specifying channels, your app will fail to show notifications on devices running android O (26)... are you testing both of your apps on the same device/android version? also do both apps have the same code implementation? (maybe I could help further)
  • I do test both apps on the same device and both apps have all there respected code above
  • 2 silly questions but helps debugging: - did you place the same json file in both projects? - how are you sending your notifications to devices? firebase console? after a second look.. your code looks fine
  • I have their .json file for each project and I'm sending a notification via firebase console. Exactly that's why I am super stuck :/
  • I dont have it in my quick app that i made and it works