I am launching an Settings.Panel.ACTION_INTERNET_CONNECTIVITY Intent from the app's MainActivity when the internet gets disconnected. When the user minimize the app without closing the Intent, the app's state is cleared and opens again from login when launched from packageManager.getLaunchIntentForPackage
. But if the user close the opened Intent before minimizing the app, then the app can be opened from package manager with the current state as it is minimized.
I used the following code to launch the quick settings panel.
val panelIntent = Intent(Settings.Panel.ACTION_INTERNET_CONNECTIVITY)
startActivityForResult(panelIntent,101)
Could someone show a way to close the Settings.Panel.ACTION_INTERNET_CONNECTIVITY Intent manually?