Im having an issue with jave code in a class module, which works fine in an activity module.
B4A version: 6.50
Parsing code. (0.03s)
Compiling code. (0.16s)
Compiling layouts code. (0.02s)
Organizing libraries. (0.00s)
Generating R file. (0.06s)
Compiling generated Java code. Error
B4A line: 49
End Sub
javac 1.8.0_111
src\b4a\RELEASE\startcar.java:361: error: cannot find symbol
WifiManager mw = (WifiManager) getSystemService(Context.WIFI_SERVICE);
^
symbol: method getSystemService(String)
location: class startcar
here's the code:
Thanks
B4A version: 6.50
Parsing code. (0.03s)
Compiling code. (0.16s)
Compiling layouts code. (0.02s)
Organizing libraries. (0.00s)
Generating R file. (0.06s)
Compiling generated Java code. Error
B4A line: 49
End Sub
javac 1.8.0_111
src\b4a\RELEASE\startcar.java:361: error: cannot find symbol
WifiManager mw = (WifiManager) getSystemService(Context.WIFI_SERVICE);
^
symbol: method getSystemService(String)
location: class startcar
here's the code:
B4X:
#If JAVA
import android.net.wifi.*;
import android.content.Context;
import java.util.List;
import java.lang.Object.*;
import android.widget.Toast;
public boolean ison ()
{
WifiManager mw = (WifiManager) getSystemService(Context.WIFI_SERVICE);
return mw.isWifiEnabled();
}
Thanks