Hey guys do you know why i can't compile after added this code?
I've added the "Reachability" libraries to the external libraries folder
I've added the "Reachability" libraries to the external libraries folder
B4X:
#Region "Check WIFI"
#If OBJC
#import "Reachability.h"
-(void)ReachabilityStatus
{
if([[Reachability reachabilityForLocalWifi] curentReachabilityStatus] != ReachableViaWiFi)
{
[self.bi raiseEvent:nil event:@"Reachability_Result:" params:@"0"];
}
else
{
[self.bi raiseEvent:nil event:@"Reachability_Result:" params:@"1"];
}
}
#End if
Sub Reachability_Result(text As String)
If text = "0" Then
'NoWifi
Msgbox("No wifi connection", " Wifi")
Else
'3G and others
Msgbox("Wifi connection enable", "Wifi")
End If
End Sub
Sub WifiConnection
Dim no As NativeObject
no.RunMethod("ReachabilityStatus:", Array(""))
End Sub
#End Region