barx Well-Known Member Licensed User Longtime User May 10, 2012 #1 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
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
thedesolatesoul Expert Licensed User Longtime User May 10, 2012 #2 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 Upvote 0
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
barx Well-Known Member Licensed User Longtime User May 10, 2012 #3 thedesolatesoul said: 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 Click to expand... Thanks tds, Not the action I was after, so........ plan B Upvote 0
thedesolatesoul said: 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 Click to expand... Thanks tds, Not the action I was after, so........ plan B
barx Well-Known Member Licensed User Longtime User May 11, 2012 #4 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
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.
Erel B4X founder Staff member Licensed User Longtime User May 13, 2012 #5 Is a broadcast listener injected to listen for 'ACTION_BOOT_COMPLETED' Click to expand... Yes. If it is, is there a way to retrieve this info? Click to expand... Yes. You can check the action of StartingIntent in Service_Start. Upvote 0
Is a broadcast listener injected to listen for 'ACTION_BOOT_COMPLETED' Click to expand... Yes. If it is, is there a way to retrieve this info? Click to expand... Yes. You can check the action of StartingIntent in Service_Start.
barx Well-Known Member Licensed User Longtime User May 13, 2012 #6 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
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
Erel B4X founder Staff member Licensed User Longtime User May 13, 2012 #7 The value is: "android.intent.action.BOOT_COMPLETED". Upvote 0
P pcmagic New Member Licensed User Longtime User Jun 28, 2012 #9 barx said: 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 Click to expand... how run a program at boot? exam? Upvote 0
barx said: 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 Click to expand... how run a program at boot? exam?
rbsoft Active Member Licensed User Longtime User Jun 28, 2012 #10 how run a program at boot? Click to expand... 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
how run a program at boot? Click to expand... 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