How can I use an int variable, defined on main process globals, from an inline java routine?
Thanks,
Abilio
Thanks,
Abilio
Thanks, I need to do include code on _On_Create, on a second activity, depending from a main Process Global variable "terminal_present".Simplest way is to pass it as a method parameter.
Dim terminal_present as int
#If JAVA
public void _onCreate() {
requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
if(mostCurrent._main._terminal_present) {
// try to reconnect
mostCurrent._main._terminal_present++;
}
}
#End If
It seems that obfuscation does not convert inline Java variable names if I reference a variable that is obfuscated during the compilation process.Yes, however mostCurrent is not needed.
Dear Erel,The compiler doesn't know anything about your Java code.
The variable was not obfuscated because it has an underscore in its name. It is good that it wasn't obfuscated as your Java code would have failed if it was obfuscated.
public void _onCreate() {
if(this._main._terminal_mypos_presente==1) {
requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
B4A Version: 9.30
Java Version: 8
Parsing code. (4.93s)
Building folders structure. (0.31s)
Compiling code. (4.39s)
ObfuscatorMap.txt file created in Objects folder.
Compiling layouts code. (0.02s)
Organizing libraries. (0.13s)
(AndroidX SDK)
Generating R file. (0.03s)
Compiling generated Java code. Error
javac 1.8.0_181
src\com\invoice\activity_faturar.java:11022: error: cannot find symbol
if(this._main._terminal_mypos_presente==1) {
^
symbol: variable _main
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
1 error
if(_modulo_main._terminal_mypos_presente==1) {