mobile-messaging-sdk-android icon indicating copy to clipboard operation
mobile-messaging-sdk-android copied to clipboard

In-App-Notification Modal UI changes

Open Faiz882 opened this issue 1 year ago • 12 comments

Hey How I can update In-app-notification Popup UI? e.g Background, text color, button color ?

Faiz882 avatar Nov 02 '23 07:11 Faiz882

Hello @Faiz882 all the documentation for In-app Notifications can be found here https://github.com/infobip/mobile-messaging-sdk-android/wiki/In-app-notifications#basic-in-app-notifications

riskpp avatar Nov 02 '23 07:11 riskpp

Hi @riskpp I have checked it but didn't find anything related to modal UI updates

Faiz882 avatar Nov 02 '23 07:11 Faiz882

So, for Basic In-app notification it's possible to change button text color as written in the doc like this:

<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
    <item name="colorAccent">@color/colorAccent</item>
</style>

But since 9.0.0 version of the SDK we've introduced Full-featured In-app notifications, for this type more customizations are possible. You could ask your account manager about other details for this feature enablement.

riskpp avatar Nov 02 '23 09:11 riskpp

I have added Full-featured In-app notifications but unable to find popup UI customization method.

Faiz882 avatar Nov 02 '23 11:11 Faiz882

@riskpp Kindly have a look on attached screen shot. I am getting greyish in-app-popup. I want white BG for this popup.. How I can do this? Screenshot_20231108-123001_Twist TV

Faiz882 avatar Nov 08 '23 08:11 Faiz882

Hello @Faiz882 are you may be overriding "Theme.AppCompat.Light" style parameters such as background?

Our SDK uses InAppDialog style for managing in-app dialog colors: https://github.com/infobip/mobile-messaging-sdk-android/blob/c1bec8910f22802a1ffcdf149aa10fe40e44f798/infobip-mobile-messaging-android-sdk/src/main/res/values/styles.xml#L3-L5. As a parent style we use Theme.AppCompat.Light and changes on that style could affect displaying of our in-app modal.

Or may be you can share your AndroidManifest.xml, it could happen that you setup "android:theme" to something different from "@style/Theme.AppCompat.Light"

riskpp avatar Nov 08 '23 08:11 riskpp

Hi @riskpp I am using this theme in AndroidManifest.xml file android:theme="@style/AppTheme"

Faiz882 avatar Nov 08 '23 08:11 Faiz882

try to change to "@style/Theme.AppCompat.Light.NoActionBar"

riskpp avatar Nov 08 '23 08:11 riskpp

Hi @riskpp Thanks for the help I have changed "@style/Theme.AppCompat.Light.NoActionBar" and it's working but now I facing issue with button text color because Infobip style picking text color from colorAccent but I don't want to change the colorAccent from my app theme because It will change the whole color scheme of my app. Is there any way to change the button text color?

Faiz882 avatar Nov 08 '23 10:11 Faiz882

We'll need to check is it possible to not change colorAccent, but just to notify you that you are using Basic In-app notifications, not Full-featured in-apps (to send it you just need to create a Flow in Infobip Customer Portal, choose "Send Push or In-App notification" element and select "In-App notification", In-app notification Editor will be opened, where you can create In-app notification according to your preferences). If you aren't able to see In-app notification Editor on the portal, you need to contact your account manager to enable this feature.

riskpp avatar Nov 08 '23 10:11 riskpp

I have added this setting but it's also not picking black color for button. image

Faiz882 avatar Nov 08 '23 10:11 Faiz882

Hello @Faiz882, regarding this method https://github.com/infobip/mobile-messaging-sdk-android/wiki/Notification-settings#notification-accent-color, it'll set the color for notification which is displayed when application is on the background.

We checked and seems it's not possible right now to change the In-app button color without changing SDK, so we'll create the task in our backlog and will inform you about further updates.

Just to notify you one more time that you are not using Full-featured in-apps right now, you need to contact your account manager for more information about how to enable it on the Infobip Portal

riskpp avatar Nov 09 '23 14:11 riskpp