B4X:
Hi all,
I use java Inline code to check for Mock Location Enable or Not but receive the error below
B4A version: 6.30
Parsing code. (0.00s)
Compiling code. (0.02s)
Compiling layouts code. (0.00s)
Organizing libraries. (0.00s)
Generating R file. (0.03s)
Compiling debugger engine code. (0.65s)
Compiling generated Java code. Error
B4A line: 75
End Sub
javac 1.7.0_79
src\b4a\example\main.java:412: error: cannot find symbol
public static boolean areThereMockPermissionApps(Context context) {
^
symbol: class Context
location: class main
Thanks for any help
Jonh
Sub Activity_Create(FirstTime As Boolean)
If FirstTime Then
NativeMe.InitializeContext
End If
Dim s As Boolean= NativeMe.RunMethod("isMockLocationOn", Null)
Msgbox(s,"")
End Sub
#If JAVA
public boolean isMockLocationOn(Context context) {
if (Settings.Secure.getString(context.getContentResolver(), Settings.Secure.ALLOW_MOCK_LOCATION).equals("0"))
return false;
else
return true;
}
#End If
Last edited: