I am trying to test the Feature modules confirmation dialogue prompt. So as per Android docs, when the install request is made, we would get the REQUIRES_USER_CONFIRMATION state in the state listener, and then we have to invoke startConfirmationDialogForResult API.
But when I make an install request for the feature module, the feature module is downloaded without the REQUIRES_USER_CONFIRMATION state. How can we simulate this?
I am using Google Internal App sharing mode to test my App and also size of my feature module is greater than 50MB.
Below weird way helped me to simulate the REQUIRES_USER_CONFIRMATION state.
While the feature module is being downloaded, stopped the download from the play store and then again I initiated the feature module download from my Application. Then at this step, I am getting REQUIRES_USER_CONFIRMATION state.
The above approach worked only in low-end Samsung device which I have, but not in the Pixel device. Initially, I thought device low storage might be a factor, so I made my pixel device a low storage one, but this doesnt help.
Note : Below Google bug has more info related to the Confirmation dialogue. As per below link, there are discrepancies if we are on WIFI or Mobile Data. Good to go through below link