1

I have been using Unity and firebase messaging for push notification it is working fine with iOS but for android the certain phones are having white box instead of the application icon for phone that is using android 10 but works for android 11. I have tried using custom image also by using transparent png image the same result with all RGB removed


    <?xml version="1.0" encoding="utf-8"?>
    <manifest xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" package="PACKAGE NAME" android:versionCode="1" android:versionName="1.0">
      <application android:label="@string/app_name" android:icon="@drawable/app_icon">
        <meta-data
            android:name="com.google.firebase.messaging.default_notification_icon"
            android:resource="@drawable/small_icon" />
        <!-- The MessagingUnityPlayerActivity is a class that extends
             UnityPlayerActivity to work around a known issue when receiving
             notification data payloads in the background. -->
        <activity android:name="com.google.firebase.MessagingUnityPlayerActivity" android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen">
          <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
          </intent-filter>
          <meta-data android:name="unityplayer.UnityActivity" android:value="true" />
        </activity>
        <service android:name="com.google.firebase.messaging.MessageForwardingService" android:permission="android.permission.BIND_JOB_SERVICE" android:exported="false"></service>
      </application>
    </manifest>

1 Answers1

0

Where did you put the icon? Should be under res/drawable/small_icon.png

Also you can change the color if you add

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

after that just create a colors.xml inside res/values and add the color you want

<resources>
  <color name="colorNotif">#FECD20</color>
</resources>
Kaktus
  • 1