Hi all,
(added unfiltered logs in comments)
The first run after a fresh installation on a phone don't work. But all runs and updates following that works fine.
I have following code, in Main Activity_Create:
First run of app (in debugmode but this happens in Release also) gives the Dialog about permission, click OK and it closes.
Then nothing happens... Either it's the Main-layout visible, but it's frozen, or just a dark screen.
I have to manually kill the app through Settings.
Next (and following) time I run the app in debug-mode everything is normal and it works without freezing.
When run in Release the app flashes for a second and then dies. Next run (and the following) it works fine again.
This happens every time I start it after I have terminated it; short flash - nothing, second run - normal
This is the log from Android 6.0.1 (Sony Xperia):
And then nothing happens...
Log from Android 9 (Samsung G8), here I can terminate the app through the app, not by killing it but nothing happens after "** Activity (main) Resume **"
The same run in Release mode:
This is the code I terminate the app with:
So... First run after installation or termination of app, doesn't work. All following works.
Any suggestions what's wrong?
(added unfiltered logs in comments)
The first run after a fresh installation on a phone don't work. But all runs and updates following that works fine.
I have following code, in Main Activity_Create:
B4X:
rp.CheckAndRequest(rp.PERMISSION_ACCESS_FINE_LOCATION)
Wait For Activity_PermissionResult (Permission As String, Result As Boolean)
StartService(GPSservice) 'Start GPS
If MapFragment1.IsGooglePlayServicesAvailable = False Then
ToastMessageShow("Please install Google Play Services.", True)
End If
First run of app (in debugmode but this happens in Release also) gives the Dialog about permission, click OK and it closes.
Then nothing happens... Either it's the Main-layout visible, but it's frozen, or just a dark screen.
I have to manually kill the app through Settings.
Next (and following) time I run the app in debug-mode everything is normal and it works without freezing.
When run in Release the app flashes for a second and then dies. Next run (and the following) it works fine again.
This happens every time I start it after I have terminated it; short flash - nothing, second run - normal
This is the log from Android 6.0.1 (Sony Xperia):
B4X:
** Service (starter) Start **
Starter.Service_Start
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = false **
Main paused. User closed=false
sending message to waiting queue (mapfragment1_ready)
sending message to waiting queue (activity_permissionresult)
running waiting messages (2)
** Activity (main) Resume **
Log from Android 9 (Samsung G8), here I can terminate the app through the app, not by killing it but nothing happens after "** Activity (main) Resume **"
B4X:
** Service (starter) Start **
Starter.Service_Start
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = false **
Main paused. User closed=false
sending message to waiting queue (mapfragment1_ready)
sending message to waiting queue (activity_permissionresult)
running waiting messages (2)
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = true **
User closed: App will terminate
Service destroyed
--------- beginning of crash
Copying updated assets files (19)
*** Service (starter) Create ***
The same run in Release mode:
B4X:
Logger connected to: samsung SM-G950F
--------- beginning of system
--------- beginning of main
sending message to waiting queue (activity_permissionresult)
running waiting messages (2)
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = true **
Main paused. User closed=true
Main Paused. App will terminate
Service destroyed
This is the code I terminate the app with:
B4X:
Starter.GPS1.Stop
CancelScheduledService(GPSservice)
Starter.InBackground = False
CallSub(GPSservice,"Service_Destroy")
CallSub(Starter,"Service_Destroy")
Activity.Finish
So... First run after installation or termination of app, doesn't work. All following works.
Any suggestions what's wrong?
Last edited: