Android Question Push notifications icons

Tomas Petrus

Active Member
Licensed User
Longtime User
I followed https://www.b4x.com/android/forum/threads/adaptive-icons-simple-instructions-and-tips.123843/
and implemented adaptive icons - that is working

Foreground notification
In this thread there was also question about n2.Icon = "notification" icon. So I followed instructions and put notification.png into folder icon/drawable.
But when I recieved notification and app was on foreground There was crash that icon cannot be found.
When I moved icon info res/drawable/ and made it read only it started working ... - What am I doing wrong ?

Background or app not started notification
There is no icon at all - just white square inside blue icon object. What am I doing wrong ?

Thank you
 

Tomas Petrus

Active Member
Licensed User
Longtime User
Upvote 0

Tomas Petrus

Active Member
Licensed User
Longtime User
Found this:
B4X:
<!-- Set custom default icon. This is used when no icon is set for incoming notification messages.
     See README(https://goo.gl/l4GJaQ) for more. -->
<meta-data
    android:name="com.google.firebase.messaging.default_notification_icon"
    android:resource="@drawable/ic_stat_ic_notification" />

when I add i to the manifest like this:
B4X:
AddApplicationText(
<meta-data
android:name = "com.google.firebase.messaging.default_notification_icon"
    android:icon = "@drawable/notification_icon" />
)

The app is builded but fail to install on device


here:
 
Upvote 0
Top