Android Question Close Android Intent

Declan

Well-Known Member
Licensed User
Longtime User
I am using the following to load "android.settings.WIFI_SETTINGS".
B4X:
Sub imgWiFiAvail_Click
Dim i As Intent
   i.Initialize("android.settings.WIFI_SETTINGS", "")
   StartActivity(i)
End Sub
In my "Starter" service, I do monitor the Connectivity Changed and write this to a variable: Main.WiFiIsConnected.

Once the user has set the WIFI_SETTINGS and device is connected and IP address has been obtained Main.WiFiIsConnected = True.
Is there a way that I can automatically CLOSE the "android.settings.WIFI_SETTINGS" activity?
I have found that if I close the activity too soon (with the "Back" button), the app bombs.
 

DonManfred

Expert
Licensed User
Longtime User
Upvote 0
Top