We have a process for allowing our users to manually update the application, because our devices do not have any app store. We download the apk from our servers and run:
updateIntent = new Intent(Intent.ACTION_INSTALL_PACKAGE);
updateIntent.setData(contentUri);
updateIntent.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
with the contentUri pointing to the location of our stored APK. As the installation is running, the app closes. Then, the following screen appears on completion:
We restart our app immediately when we receive a MY_PACKAGE_REPLACED intent. The issue is that this screen remains in the background.
How can I programmatically dismiss it?
I have tried:
// Dismiss all system ui messages
Intent closeDialog = new Intent(Intent.ACTION_CLOSE_SYSTEM_DIALOGS);
sendBroadcast(closeDialog);
but it does not work for this type of dialog