When I close my app, with the click on "Exit", this effect is created as if the layout "exits and re-enters" (you see the white for a moment) before disappearing completely. The code I use to terminate launches a routine (StopSophosClient) which uses an Intent to terminate a service (OpenVPN) which I start at the beginning of the program to join a VPN. The StartActivity (Intent) causes this annoying flicker. Any suggestions?
' in B4XMainPage Private Sub btnExit_Click StopSophosClient Sleep(2000) B4XPages.ClosePage(Me) ExitApplication End Sub Sub StopSophosClient Dim i As Intent i.Initialize(i.ACTION_MAIN, "") i.SetComponent("de.blinkt.openvpn/.api.DisconnectVPN") i.PutExtra("de.blinkt.openvpn.shortcutProfileName", "VPN_Telecontrollo") StartActivity(i) ' ---> This instruction causes the "undesirable effect" End Sub