This is the code in the Main:
#Region Project Attributes
#ApplicationLabel: B4A Example
#VersionCode: 1
#VersionName:
'SupportedOrientations possible values: unspecified, landscape or portrait.
#SupportedOrientations: unspecified
#CanInstallToExternalStorage: False
#End Region
#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 Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
Log("OK_1")
StartService(Trova)
Activity.Finish
'Activity.LoadLayout("Main")
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
If I put in the manifest AddReplacement(android.intent.action.MAIN, unused_action) the code simply doesn't start. (Or so I think because I can't see OK_1 in the log).
If I remove AddReplacement(android.intent.action.MAIN, unused_action) from the manifest, everything works perfectly but I see an empty activity when I press the button of the tasks.
Where do you think that my mistake is ?
Thank you