I am getting some crazy Errors when trying to start timers or start one service. I was not able to replicate the Errors on my devices.
Problems occur here:
main.java
gps.java - on the second line
Corresponding B4a Code:
Here i had to rebuild click animations because i needed an resizable imageview on a button - crashes are happening on the clicktimer.enabled lines
and at the other part i have only an animation timer that is being activated.
Every timer and this gps service is ONLY started when the application is running in foreground.
All timers are initialized in Activity_Create (every time, not only on FirstTime) after initializing the layout but before everything else
Service is started from a Code Module Sub which is called in Main at some point
IllegalState means Problems between threads and services. Is there any possibility for me to fix this or is it b4a internally?
targetsdk is 28 - i can't remember having these errors before putting it to 26+
thanks for answers
Problems occur here:
main.java
B4X:
//BA.debugLineNum = 1252;BA.debugLine="waitingtimer.Enabled = True";
_vvvvvvvvvvvv4.setEnabled(anywheresoftware.b4a.keywords.Common.True);
//BA.debugLineNum = 852;BA.debugLine="clicktimer.Enabled = True";
_vvvvvvvvvvvv3.setEnabled(anywheresoftware.b4a.keywords.Common.True);
gps.java - on the second line
B4X:
public int onStartCommand(final android.content.Intent intent, int flags, int startId) {
if (ServiceHelper.StarterHelper.onStartCommand(processBA, new Runnable() {
public void run() {
handleStart(intent);
Corresponding B4a Code:
B4X:
Sub Panel4_Touch (Action As Int, X As Float, Y As Float)
Select Action
Case Activity.ACTION_DOWN
Panel4.Color = Colors.RGB(213,51,0)
Panel4.Elevation = 4dip
longclicked = False
clicktimer.Enabled = True
Case Activity.ACTION_MOVE
'Log("move")
Case Activity.ACTION_UP
clicktimer.Enabled = False
If longclicked = False Then
Panel4_Click
End If
Panel4.Color = Colors.RGB(255, 87, 34)
Panel4.Elevation = 4dip
End Select
End Sub
and at the other part i have only an animation timer that is being activated.
Every timer and this gps service is ONLY started when the application is running in foreground.
All timers are initialized in Activity_Create (every time, not only on FirstTime) after initializing the layout but before everything else
Service is started from a Code Module Sub which is called in Main at some point
IllegalState means Problems between threads and services. Is there any possibility for me to fix this or is it b4a internally?
targetsdk is 28 - i can't remember having these errors before putting it to 26+
thanks for answers