Notifications look different when app is closed and open.
Notifications look different when app is closed and open. When App is open they come like this: https://i.imgur.com/BwfNRRO.png When App is closed they come like this: https://i.imgur.com/MKUKI5O.png
Is there a service I can activate/make ?
This is because when the app is closed, the notifications are received as push notifications. When the app is open, they are displayed programatically. This causes some difference in the styling. I can look at making them the same.
Clicking on incoming notification (when in app) , crashes the app.
12-18 14:36:04.867 10135-10135/.app E/UncaughtException: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean .core.dao.Thread.typeIs(int)' on a null object reference
at .ui.chat.ChatActivity.onCreateOptionsMenu(ChatActivity.java:555)
at android.app.Activity.onCreatePanelMenu(Activity.java:2881)
at android.support.v4.app.FragmentActivity.onCreatePanelMenu(FragmentActivity.java:362)
at android.support.v7.view.WindowCallbackWrapper.onCreatePanelMenu(WindowCallbackWrapper.java:98)
at android.support.v7.app.AppCompatDelegateImplBase$AppCompatWindowCallbackBase.onCreatePanelMenu(AppCompatDelegateImplBase.java:335)
at android.support.v7.app.AppCompatDelegateImplV9.preparePanel(AppCompatDelegateImplV9.java:1368)
at android.support.v7.app.AppCompatDelegateImplV9.doInvalidatePanelMenu(AppCompatDelegateImplV9.java:1648)
at android.support.v7.app.AppCompatDelegateImplV9$1.run(AppCompatDelegateImplV9.java:140)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5525)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:730)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:620)
@dreimanis The above crash has been fixed in build 4.0.8.
This is because when the app is closed, the notifications are received as push notifications. When the app is open, they are displayed programatically. This causes some difference in the styling. I can look at making them the same.
@bensmiley Did you check this?
@bensmiley @KAPLANDROID @paakjis adding this you can customize it when app is killed.
<meta-data
android:name="com.google.firebase.messaging.default_notification_icon"
android:resource="@drawable/your_icon"
tools:replace="android:resource"/>
<meta-data
android:name="com.google.firebase.messaging.default_notification_color"
android:resource="@color/your_color"
tools:replace="android:resource"/>
This has been resolved in the latest version - all push notifications are handled programatically.
@bensmiley it's not possible to handle push notification locally if app is killed. What do you mean? I still can see different notifications when I clear the app from history stack and send message to that device