Android Question Main activity not starting correctly after reboot

rossco_pb

Member
Licensed User
Longtime User
Ok, been messing with this for a while and getting nowhere...

App based around Google Maps V2 that after reboot/power on of device the app just opens with title bar and the application label and thats all. Close it and re-open and it is fine. Kill it through application manager and open it and its fine. Reboot the phone and just get the blank screen. Add StartActivity(Main) into Starter service (Service_Start sub) and it opens after reboot but screen blank. App is set with startatboot true and that works fine. Not sure if Google Maps a factor or not.

Next step is to build a dummy minimal app and see if also a problem but wondering if anyone come across this before or have any suggestions?

Cheers
 

rossco_pb

Member
Licensed User
Longtime User
A little bit more info: Inserted some bum code to force program exception at beginning of Activity_Create and when the dead after reboot condition occurs the code does not get executed so not even getting as far as loading the layout etc, ie it appears as though the Main activity just does not start?? Very strange and do not know what I can do to debug it as it is in effect not running :-(
 
Upvote 0

rossco_pb

Member
Licensed User
Longtime User
Which service is started after boot? Make sure that it is not the starter service.

Yes it is the starter actually. When I wrote the original code there was no starter so I just had a service managing things and then starter appeared I just switched to that. Are you advising not to use starter but another service and perhaps ditch starter all together?
 
Upvote 0

rossco_pb

Member
Licensed User
Longtime User
Check the starter service tutorial: https://www.b4x.com/android/forum/t...-consistent-single-entry-point.57599/#content

You can keep it as it is very useful. However you should use a different service as the service that starts after boot (the starter service will also be started).

OK Cheers, I see the statement in the tutorial about not starting starter explicitly at boot. Looks like my bad, as usual lol. Will add another service and see how I get on.

Really appreciate your help, it is a fantastic product and your support second to none ☺
 
Upvote 0
Top