No Icon or Title in Android Notification

#1

I have a standalone app both on iOS and Android. For the iOS app, the notification shows up with the notification icon I specify in exp.json (notification.icon) and with the right title.

When I send the same exact HTTP request to the Expo push service for an Android device (i.e. change the to field to an Android device), I get a notification whose title is my app name, not the specified title, and icon is a tinted square-in-circle icon, not the icon I specify in exp.json. This is on Android 6.0.

How can I get that icon and title in there for Android?

Thanks!

#2

Any chance I could get a quick brain dump from someone at Expo on how push notifications work for Android / why they think this might not be working?

Some of this does seem to be expected (?) behavior given that notification.color is an option in exp.json — but why can’t Android remote notifications use notification.icon instead and why do they ignore the title?

Thanks,
Will

#3

Hey @wfisher. I’ll test this out before we do the next Android release next week. Will make sure it’s fixed in that release if I can’t get it working.

2 Likes
#4

I did config icon in app.json but Android displays just as an empty rectangle:

"notification": {
      "icon": "./assets/images/notif-icon.png"
    }

Anyone, please help!

#5

@jesse My issue looks ike this a bit. On Android, I get my title, but with MY_APP_NAME - before it. What if I don’t want the app name in front?

#6

@trungtrungkang I have the same problem. Did u solve this?

#7

@trungtrungkang @gugamm Do you guys have transparent backgrounds with a white icon 48x48? I had the same issue until I made another icon with only white and transparent.

#8

After look in the android documentation, this solved my problem

#9

Can you please, share the documentation link?

#10

Hey arivest, did you figure out how to remove MY_APP_NAME?

#11

I only have this problem when I’m using my app in Expo. For standalone app, I can put the title I want. So this is not an issue for me.

#12

I followed this instructions and made the icon 48x48px with only with and transparent pixels, but still get just a white square in as a notification icon.

Using a standalone build. The title works fine though.

Android docs: https://developer.android.com/guide/practices/ui_guidelines/icon_design_status_bar