I am working on google instant app development. In my app there are image buttons and set to default grey scaled images in each button. When user open the app, user input some numeric value. Base on that, one of button's image is replaced with color one.
//after user's input, we know userChoiceInput and which button we need to touch
var userButtonId: String = "btn" + userChoiceInput
val imgBtnId: Int = resources.getIdentifier(userButtonId, "id", packageName)
I need to get the imgBtnId.
If I run it in installed app version, I get what I want.
However, if I run in instant app version, I get 0...which is not intended.
Additional information I can say is that I got following exception.
kotlin.TypeCastException: null cannot be cast to non-null type android.widget.ImageButton
Is this known bug?
Thanks.