Hi, I am trying to test start on boot. but not working for me. read all the post I can find.
here my code. the application works fine. I did not find any change for me to do in the manifest
or something.
Starter service
Main module
here my code. the application works fine. I did not find any change for me to do in the manifest
or something.
Starter service
B4X:
#Region Service Attributes
#StartAtBoot: True
#End Region
Sub Process_Globals
Dim timer1 As Timer
End Sub
Sub Service_Create
DateTime.DateFormat = "MM-dd-yyyy hh:mm:ss"
timer1.Initialize("timer1",1000)
End Sub
Sub Service_Start (StartingIntent As Intent)
timer1.Enabled = True
End Sub
Sub Service_Destroy
End Sub
Private Sub Timer1_Tick
CallSub(Main, "start_up")
End Sub
Main module
B4X:
#Region Project Attributes
#ApplicationLabel: Boot Example
#VersionCode: 1
#VersionName: ppola!
#SupportedOrientations: unspecified
#CanInstallToExternalStorage: true
#End Region
#Region Activity Attributes
#FullScreen: True
#IncludeTitle: False
#End Region
Sub Process_Globals
End Sub
Sub Globals
Dim label1 As Label
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("main")
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub start_up
label1.Visible= True
label1.TextColor=Colors.Black
label1.Gravity = Gravity.CENTER
label1.Text = DateTime.Now
End Sub