I´m using B4A Version 5.80 registered version and try to get a timer running.
Timer initialization works fine. Period set is to 5000 ms. But for 1000 or 100 it´s the same.
Running the app displays first message box and after clicking Ok it takes 5 seconds until app ends without displaying specific error information.
Running the app and not clicking OK at first message box does not end the app until OK is pressed and then app is stopped after one more second. Using FirstTime flag statement makes no difference.
Error occurs on Android 5.0 and 4.4.4 .
My simple code:
code >>>
#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.
Dim Timer1 As Timer
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:
Activity.LoadLayout("hello")
Timer1.Initialize("Timer1_Tick",5000)
Timer1.Enabled=True
Msgbox("past Timer1 init","")
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub Timer1_Tick
Msgbox("Timer1_Tick","")
End Sub
<<< code
Any idea?
Timer initialization works fine. Period set is to 5000 ms. But for 1000 or 100 it´s the same.
Running the app displays first message box and after clicking Ok it takes 5 seconds until app ends without displaying specific error information.
Running the app and not clicking OK at first message box does not end the app until OK is pressed and then app is stopped after one more second. Using FirstTime flag statement makes no difference.
Error occurs on Android 5.0 and 4.4.4 .
My simple code:
code >>>
#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.
Dim Timer1 As Timer
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:
Activity.LoadLayout("hello")
Timer1.Initialize("Timer1_Tick",5000)
Timer1.Enabled=True
Msgbox("past Timer1 init","")
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub Timer1_Tick
Msgbox("Timer1_Tick","")
End Sub
<<< code
Any idea?