Android Question After starting at startup, the application does not display the activity correctly.

rtek1000

Active Member
Licensed User
Longtime User
Hello,

After starting at startup, the application does not display the activity correctly.

But, After rotating the device, show the activity!

Did i do something wrong?

Note: This occurs on Android 4.4 and 6. My sdk is 19

Starter [Service Module]:
B4X:
#Region  Service Attributes
   #StartAtBoot: True
   #ExcludeFromLibrary: 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 Service_Create
   'This is the program entry point.
   'This is a good place to load resources that are not specific to a single activity.

End Sub

Sub Service_Start (StartingIntent As Intent)
   StartActivity(Main)
End Sub

Sub Service_TaskRemoved
   'This event will be raised when the user removes the app from the recent apps list.
End Sub

'Return true to allow the OS default exceptions handler to handle the uncaught exception.
Sub Application_Error (Error As Exception, StackTrace As String) As Boolean
   Return True
End Sub

Sub Service_Destroy

End Sub
 

Attachments

  • ServiceAtBoot.zip
    7.6 KB · Views: 254
  • Screenshot_2016-11-25-09-56-31.png
    Screenshot_2016-11-25-09-56-31.png
    13.7 KB · Views: 273
  • Screenshot_2016-11-25-09-56-41.png
    Screenshot_2016-11-25-09-56-41.png
    15.1 KB · Views: 254

rtek1000

Active Member
Licensed User
Longtime User
Very good!

Now it works, with another service,

But Starter can be used for what?

Is it just an ornament?

Sorry by my ignorance!
 

Attachments

  • ServiceAtBoot.zip
    8 KB · Views: 284
Upvote 0
Top