Android Question Wifi intent?

D

Deleted member 103

Guest
Hi,

with the code I can check the Bluetooth status.
B4X:
Sub Service_Start (StartingIntent As Intent)
    If rv.HandleWidgetEvents(StartingIntent) Then Return

    If StartingIntent.Action="android.bluetooth.device.action.ACL_CONNECTED" Then
        Log("bluetooth.device CONNECTED")
    Else If StartingIntent.Action="android.bluetooth.device.action.ACL_DISCONNECTED" Then
        Log("bluetooth.device DISCONNECTED")
    End If
End Sub
Is something similar also for wifi?
 
D

Deleted member 103

Guest
Thank you,
I'll try it.

I have found in stackoverflow that.
android.net.wifi.WIFI_STATE_CHANGED is sent only when WiFi is enabled or disabled. You need to catch android.net.wifi.STATE_CHANGE too if you want to receive broadcast event when you are connected to or disconnected from a WiFi network.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…