question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

android notification icon is a white circle?

See original GitHub issue

So this is weird but when I send a notification using Mixpanel (without any customizations, only a title and body) the notification icon is simply a white circle. When I send to the same token but using firebase console the icon I’ve defined in AndroidManifest.xml shows correctly.

What is the cause of this?

<!-- AndroidManifest.xml -->

<service android:name="com.mixpanel.android.mpmetrics.MixpanelFCMMessagingService" android:enabled="true" android:exported="false">
  <intent-filter>
    <action android:name="com.google.firebase.MESSAGING_EVENT"/>
  </intent-filter>
</service>

<meta-data android:name="com.google.firebase.messaging.default_notification_icon" android:resource="@drawable/ic_stat_notification" />
<meta-data android:name="com.google.firebase.messaging.default_notification_color" android:resource="@color/colorPrimary" />

0

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
oussamaraboijacommented, Sep 22, 2020

I created a notification icon from Android studio image asset too named it '" ic_notification ", and in Mixpanel I specify ic_notification I still get notification as app icon by default, I also tried @drawable/ic_notification and it didn’t work, how exactly do you specify a resource name? Am I missing a step?

1reaction
anjalsaneencommented, Dec 2, 2020

@oussamakenzup I’m facing the same issue. I have tried to understand mixpanel code. the implementation can break due to multiple reasons

@patedit I have a couple of questions?

  1. How could mixpanel able to read resource id from another package? it can break apps which are having proguard, right?
  2. it can break due to applicationId isn’t the same as the package. right?
  3. When I check mDrawableIds.knownIdName(iconName) inside mixpanel SDK it always returning false even though the resources inside mixpanel sdk module?

@aforty

I agree with you. setting icon explicitly is a very bad idea considering the chances of failures here and no proper details on the developer docs. there has to be a default icon option.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Android notification icon is a white circle - Stack Overflow
If your compileSDKversion is above 20 then notification icon should be a white-on-transparent background image. Otherwise the image will be rendered as a...
Read more >
Why the notification icon turn into a white circle after update?
An easy workaround is to go into Theme Park, Quick Panel, edit your current "theme" and change the color of that white circle...
Read more >
Fixed Push Notification Icon showing White Android - Medium
Fixed Push Notification Icon showing White Android ... notification icon is showing the white icon when we run this in android 6.0 and...
Read more >
Certain app icons showing as white circle in notification tray
When receiving notifications from certain apps the app icon appears as a white circle. Is anyone else experiencing this or does anyone know...
Read more >
Notification Icons in some apps being a white circle.
Some apps, shows a weird circular white icon, and when we focus on the notification bubble it appears using the color of the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found