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 empty bottom right square

See original GitHub issue

On Android (tested on 4.x, 5.x and 6.x emulator as well as real device) I see an empty gray square in all received notifications (remote or local). It seems like an empty badge or something, however none of these settings are used.

screen shot 2016-10-24 at 13 51 12

By default the ic_launcher.png is used, this icon seems to be fine.

Versions: “react”: “15.3.2” “react-native”: “0.35.0” “react-native-push-notification”: “2.1.1”

Configuration:

PushNotification.configure({
  onRegister: (token) => {
    dispatch(actions.device.sendDeviceToken(token))
  },
  onNotification: (notification) => {
    console.log(notification)
  },
  senderID: Config.googleSenderId,
  permissions: {
    alert: true,
    badge: true,
    sound: true,
  },
  popInitialNotification: true,
  requestPermissions: false,
})

Log statement of received notification:

{
  foreground: false,
  userInteraction: true,
  id: "143778939",
  message: "Test local push notification"
}

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:7

github_iconTop GitHub Comments

4reactions
jawinncommented, May 17, 2017

To be clear on the solution found in the comment here https://github.com/zo0r/react-native-push-notification/issues/99#issuecomment-227123083, after some back and forth trying to get it to work:

A transparent PNG called ic_notification.png needs to be created at various sizes and included within the different mipmap-* folders in /android/app/src/main/res/.

  • /android/app/src/main/res/mipmap-mdpi/ic_notification.png - 24x24
  • /android/app/src/main/res/mipmap-hdpi/ic_notification.png - 36x36
  • /android/app/src/main/res/mipmap-xhdpi/ic_notification.png - 48x48
  • /android/app/src/main/res/mipmap-xxhdpi/ic_notification.png - 72x72
  • /android/app/src/main/res/mipmap-xxxhdpi/ic_notification.png - 96x96

Size guide ref: http://iconhandbook.co.uk/reference/chart/android/

If you don’t have a custom notification icon for you app, a good place to grab a generic one is from https://material.io/icons/

Read more comments on GitHub >

github_iconTop Results From Across the Web

A small square icon with 4 smaller squares in side it appears ...
FAQ for Samsung Mobile Device. Find more about 'A small square icon with 4 smaller squares in side it appears on the screen....
Read more >
Blank square in Google Maps - java - Stack Overflow
I'm writing application for Android 2.1. with Google Maps. Everything works fine except one detail: there is a white square box on the...
Read more >
Fix a screen that isn't working right on Android - Google Help
Try the solutions below if your phone screen: Doesn't respond Flickers Jumps Flashes Shows dead pixels Stays blank Step 1: Check your phone's...
Read more >
10 hidden tricks for making the most of Android gestures
Here's a smarter way to use that gesture: Instead of just swiping left or right on that bottom bar, swipe and move your...
Read more >
24 hidden Android settings you should know about
You don't have to squint and strain your eyes when viewing Android screens. Open Settings and choose Display, Advanced, followed by Font size, ......
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