This is a valid (and usually ignored) attack vector. This is not strictly a man-in-the-middle attack, as it will not redirect the URL to your application (it cannot). This is almost worse, because an attacking application can actually crash, and it looks like your application ...
Another application can be installed at any time when your application is in the background. It is technically possible that an update has been released and installed for an existing application while your application is running (it’s hard to know if this will happen). Thus, it is not safe to check only when your application is open.
source share