Service _create

barx

Well-Known Member
Licensed User
Longtime User
Is the service _create event only fired on the very first loading of the service.

I'm after detecting a device boot up, and wondered if it triggered when the service was re-created after a power cycle. If not I have another solution.

Thanks

Sent from my HTC Desire Z
 

barx

Well-Known Member
Licensed User
Longtime User
Service_create is fired on the first load from memory. This could be that the service was removed from memory due to low resources and then recreated.

Sent from my GT-I9000 using Tapatalk 2

Thanks tds, Not the action I was after, so........ plan B ;)
 
Upvote 0

barx

Well-Known Member
Licensed User
Longtime User
A query for Erel here.

When the 'Start at Boot' service property is checked, how does this work?

Is a broadcast listener injected to listen for 'ACTION_BOOT_COMPLETED'

If it is, is there a way to retrieve this info?

Could the service_create have been Service_Create (Boot as Boolean) or something to that effect.

It's no big problem as I have a workaround anyway. I was just curious.

Thanks.
 
Upvote 0

barx

Well-Known Member
Licensed User
Longtime User
ah very good, so would this be

B4X:
If StartingIntent.Action = "ACTION_BOOT_COMPLETED" Then

End If

ACTION_BOOT_COMPLETED isn't on the ACTION's list of the startingintents constants.

i.e. no StartingIntent.ACTION_BOOT_COMPLETED

Thank you
 
Upvote 0

barx

Well-Known Member
Licensed User
Longtime User
Thank You
 
Upvote 0

pcmagic

New Member
Licensed User
Longtime User
ah very good, so would this be

B4X:
If StartingIntent.Action = "ACTION_BOOT_COMPLETED" Then

End If

ACTION_BOOT_COMPLETED isn't on the ACTION's list of the startingintents constants.

i.e. no StartingIntent.ACTION_BOOT_COMPLETED

Thank you

how run a program at boot?
exam?
 
Upvote 0

rbsoft

Active Member
Licensed User
Longtime User
how run a program at boot?

Add a service module to your project.
Make the service module the active tab.
In the Ide goto <Project><Service Properties> and check <Start at Boot>.

Rolf
 
Upvote 0
Top