Our android app has blue color as colorPrimaryDark in resources which is responsible for status bar color. We are using a third party sdk for payment. Whenever we initiate that sdk it changes the color to red. And after completion of payment the status bar remains red. It might be caused by the changes in value of colorPrimaryDark.
Is there any way so that i can ovrride that colorPrimaryDark key whenever sdk stop doing it's work.
I tried to change in theme file.
I guess the SDK which you use, are changing status bar color programmatically using your activity's
windowso the changed color remains even after the SDK stops. you can use this code (in kotlin) to change the status bar color after the SDK is finished.Place the above code where you are sure the SDK is finished. (based on SDK's documents)