java inline code is it can call the service sub?
my service module name ="service1" and code:
i got the error
my service module name ="service1" and code:
B4X:
#Region Service Attributes
#StartAtBoot: False
#ExcludeFromLibrary: True
#End Region
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
Private NativeMe As JavaObject
End Sub
Sub Service_Create
'This is the program entry point.
'This is a good place to load resources that are not specific to a single activity.
NativeMe.InitializeContext
End Sub
Sub Service_Start (StartingIntent As Intent)
NativeMe.RunMethod("reset",Null)
End Sub
Sub Service_Destroy
End Sub
sub test()
log("test")
end sub
#if JAVA
public void reset(){
anywheresoftware.b4a.keywords.Common.CallSubNew(mostCurrent.activityBA,service1.getObject(),"test");
}
#end if
i got the error
B4X:
B4A version: 6.80
Parsing code. (0.08s)
Running custom action. (0.84s)
Running custom action. (1.67s)
Compiling code. (0.58s)
Compiling layouts code. (0.05s)
Organizing libraries. (0.00s)
Generating R file. (2.56s)
Compiling debugger engine code. (5.02s)
Compiling generated Java code. Error
javac 1.8.0_66
src\com\probitto\my\fnap\callsmsservice.java:1261: error: cannot find symbol
anywheresoftware.b4a.keywords.Common.CallSubNew(mostCurrent.activityBA,service1.getObject(),"test");
^
symbol: variable activityBA
location: variable mostCurrent of type callsmsservice
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 error