joaoclobocar
Member
I have this simple Activity Module for testing onCreate and onNewIntent events and respective hooks.
The intent filter for the activity is correct. The activity open up, but the events are not called. Unfortunately, I could not figure out why.
I have opened the generated java files and confirmed that they are being called on respective events.
What could be the reason for hooks not being reached?
TIA
B4X:
#Region Activity Attributes
#FullScreen: False
#IncludeTitle: 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.
End Sub
Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
End Sub
Sub Class_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
End Sub
Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
'Activity.LoadLayout("Layout1")
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
#if java
import android.content.Context;
import android.content.Intent;
import android.util.Log;
public void oncreate() {
Log.d("X", "oncreate");
}
public void onnewintent(Intent intent) {
Log.d("X", "onnewintent");
}
#End if
The intent filter for the activity is correct. The activity open up, but the events are not called. Unfortunately, I could not figure out why.
I have opened the generated java files and confirmed that they are being called on respective events.
Java:
processBA.runHook("oncreate", this, null);
What could be the reason for hooks not being reached?
TIA