M madSac Active Member Licensed User Longtime User Feb 6, 2013 #1 I have made a service that is started in boot. I did it using manifest. But there are some essential things which can be done only using activity.So for that i want to know the method to determine that whether the service has been started by bootmanager or something like that or using my application ? I should tell you that i am using StartServiceAt with 5min interval to keep service alive so may be that can interrupt if i use variables.
I have made a service that is started in boot. I did it using manifest. But there are some essential things which can be done only using activity.So for that i want to know the method to determine that whether the service has been started by bootmanager or something like that or using my application ? I should tell you that i am using StartServiceAt with 5min interval to keep service alive so may be that can interrupt if i use variables.
Erel B4X founder Staff member Licensed User Longtime User Feb 6, 2013 #2 The Action parameter of StartingIntent object will be: android.intent.action.BOOT_COMPLETED when the service is started after boot. Upvote 0
The Action parameter of StartingIntent object will be: android.intent.action.BOOT_COMPLETED when the service is started after boot.
M madSac Active Member Licensed User Longtime User Feb 6, 2013 #3 i have used in service Code: Sub Process_Globals Dim actVisible As Boolean End Sub Sub Service_Start (StartingIntent As Intent) Select StartingIntent.Action Case "android.intent.action.BOOT_COMPLETED" actVisible=True StartActivity(Main) End Select End Sub in activity i have used Code: Sub Activity_Create(FirstTime As Boolean) 'some code If(client.actVisible==True)Then ExitApplication 'some other code end sub is it fine ? Last edited: Feb 6, 2013 Upvote 0
i have used in service Code: Sub Process_Globals Dim actVisible As Boolean End Sub Sub Service_Start (StartingIntent As Intent) Select StartingIntent.Action Case "android.intent.action.BOOT_COMPLETED" actVisible=True StartActivity(Main) End Select End Sub in activity i have used Code: Sub Activity_Create(FirstTime As Boolean) 'some code If(client.actVisible==True)Then ExitApplication 'some other code end sub is it fine ?