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
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.