1

I want to update an android app with android in app update but I have some problem if the phone is connected to a WIFI provided by a cell phone (sharing its cellular network).

In app Update seems to works like this:

  1. When update is found and suggested to the user (firstScreen)

    • If you are not connected to wifi, you can choose to update the app when wifi will be found or choose to download the update with your cellular data.
    • if you are already connected to wifi, you don't have this choice (like picture)
  2. When you click on update

If you are connected to wifi coming from cellular network, it's acting like your are waiting for wifi. It's not a problem in IMMEDIATE update because you could choose to update anyway. But if you have a FLEXIBLE update, it freezes in PENDING status because the phone is waiting for wifi (wifi not from cellular network).

The real problem is that the first screen seems to analyze wifi or and second screen seems to analyze network source. Maybe because first screen uses NetworkInfo and the second uses NetworkCapability or something.

Does anyone have this problem too?

To prevent user to be blocked when he chose a Flexible update on cellular wifi I will need to found the network source.

  • Interesting use case. I'm guessing that you are going to have to check for cellular wifi after you have verified that an update is available and allowed, and before you startUpdateFlowForResult, and disallow it if cellular wifi. The whole FLEXIBLE flow doesn't seem to work very well, in my experience. IMMEDIATE is very quick and clean. – Michael Dougan Jun 04 '19 at 18:41
  • Is there an update on this? Seems like issue is still there. – a.toropov Mar 04 '20 at 13:40

0 Answers0