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 image looks pixelated

See original GitHub issue

The problem is that when the image is loaded, it is resized, I assume to avoid an error due to the Intent created in being too big (TransactionTooLargeException / !!! FAILED BINDER TRANSACTION !!! exception/error).

To fix this, the image cropping should be removed and the notification probably should not be created until it’s going to be displayed. If it’s going to be scheduled, then the intent should only contain the JSON of the options, which we would later use to create when it’s time to display it.

This would simplify the cancellation as well.

Working on the fix.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

EddyVerbruggencommented, Sep 17, 2018

@Danziger It looks really good! I’d love to merge and test that. Please open the PR when you’re happy and I’ll assist testing it as well.

EddyVerbruggencommented, Sep 7, 2018

Indeed, the image is resized to avoid that error, but I didn’t think it was resized too aggressively to become pixelated. Can you show an example of how bad it becomes, along ith the original image source?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Android MediaStyle Notification image (largeIcon) is pixilated
I'm creating the bitmap for the notification using ImageDecoder.decodeBitmap, providing it a source using ImageDecoder.createSource (I've tried ...
Read more >
Blurry status bar notification icons - XDA Forums
The icons are only blurry on the home screen. ... It looks to me like the far left icons (notifications) are pretty much...
Read more >
Android: Notification Icons - OneSignal Documentation
Adding custom icons to some or all of your notifications. Works with Android (and derivatives like Amazon).
Read more >
Can I / How to Disable Images in my Notifications
Go to Settings>Apps, select the app in question, then Notifications. Click on the word for the notification category (not the toggle switch), ...
Read more >
Support different pixel densities - Android Developers
You can disable pre-scaling dimensions and images by setting android:anyDensity to "false" in the manifest or programmatically for a Bitmap by ...
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 Post

No results found

github_iconTop Related Hashnode Post

No results found