Appboy / appboy-android-sdk

Public repo for the Braze Android SDK
https://www.braze.com
Other
152 stars 102 forks source link

Background color is not reflecting in braze push notification small icon #251

Closed Ankit-Kr-Verma closed 1 year ago

Ankit-Kr-Verma commented 1 year ago

Braze Android SDK Version

18.0.0

Steps To Reproduce

Added drawable svg format for small icon

Added braze.xml in res/values folder and defined push notification small icon and color in braze.xml as below

@drawable/ic_notification_icon 0xf78d00

Initialised the BrazeConfig in application class onCreate() as: val brazeConfig = BrazeConfig.Builder() .setApiKey(BuildConfig.BRAVE_API_KEY) .setSmallNotificationIcon(applicationContext.resources.getResourceEntryName(R.drawable.ic_notification_icon)) .setPushDeepLinkBackStackActivityEnabled(true) .setIsFirebaseCloudMessagingRegistrationEnabled(true) .setFirebaseCloudMessagingSenderIdKey(BuildConfig.FIREBASE_TOKEN) .build() Braze.configure(applicationContext, brazeConfig) registerActivityLifecycleCallbacks(BrazeActivityLifecycleCallbackListener())

Expected Behavior

The push notification small icon should come with background color

Actual Incorrect Behavior

small icon is coming as expected but the background color is not reflecting. Tested in emulator: Pixel 3 XL Android 9, Nexus 5X Android 10, Pixel 2 Android 11, Pixel 3a XL Android 12

Verbose Logs

No response

Additional Information

Can you please look into this issue. As all steps have been done as per the documentation still the background color is not reflecting for the braze push notification small icon.

radixdev commented 1 year ago
  1. Can you provide the original png for the icon you're trying to use?
  2. Please go over https://www.braze.com/docs/developer_guide/platform_integration_guides/android/push_notifications/android/integration/standard_integration/#step-2-ensure-small-icons-conform-to-design-guidelines and ensure your icon follows the OS guidelines. What you're seeing is likely to be OS behavior and not something the SDK can override.
Ankit-Kr-Verma commented 1 year ago

Hi @radixdev, I'm using the svg for the small icon not png format and it is as per the android design guidelines. Due to company policy not able to share the original svg icon now, will check if I can do that. If possible can you please confirm in the emulator, the background color for the svg icon will reflect as expected for braze push notification small icon or not.

radixdev commented 1 year ago

Hi @Ankit-Kr-Verma ,

Without the exact SVG file, we cannot reproduce your issue. If you can provide another SVG that reproduces the issue (e.g. not one from your company or violates your company policies) then we can proceed with the investigation.