Re: [android-developers] How to get a service to either return a string or start a function in main activity?

2011-07-22 Thread Fred Niggle
Thanks for your reply. I guess my initial question can therefore be reduced to: How can an activity know when a service has performed a task? On 21/07/2011, Mark Murphy mmur...@commonsware.com wrote: On Thu, Jul 21, 2011 at 6:33 PM, Fred Niggle fred.nig...@googlemail.com wrote: What I am

Re: [android-developers] How to get a service to either return a string or start a function in main activity?

2011-07-22 Thread Mark Murphy
On Fri, Jul 22, 2011 at 9:05 AM, Fred Niggle fred.nig...@googlemail.com wrote: Thanks for your reply. I guess my initial question can therefore be reduced to: How can an activity know when a service has performed a task? You have no activity. That's the point. Most medication dosing is on a

Re: [android-developers] How to get a service to either return a string or start a function in main activity?

2011-07-22 Thread Fred Niggle
Thanks for your reply. I found the information about setting flags with startActivity() to be extremely useful. However my original question remains unanswered: How can an activity know when a service has performed a task? Regards, Fred On 22/07/2011, Mark Murphy mmur...@commonsware.com wrote:

Re: [android-developers] How to get a service to either return a string or start a function in main activity?

2011-07-22 Thread Mark Murphy
On Fri, Jul 22, 2011 at 10:24 AM, Fred Niggle fred.nig...@googlemail.com wrote: However my original question remains unanswered: How can an activity know when a service has performed a task? Use a broadcast Intent. -- Mark Murphy (a Commons Guy) http://commonsware.com |

Re: [android-developers] How to get a service to either return a string or start a function in main activity?

2011-07-22 Thread Fred Niggle
Thank you, thats just the tip I needed. On 22/07/2011, Mark Murphy mmur...@commonsware.com wrote: On Fri, Jul 22, 2011 at 10:24 AM, Fred Niggle fred.nig...@googlemail.com wrote: However my original question remains unanswered: How can an activity know when a service has performed a task?

[android-developers] How to get a service to either return a string or start a function in main activity?

2011-07-21 Thread Fred Niggle
Hello, Thanks for taking the time to read this. I've been on this for some time and have only recently mastered service... or so I thought. I found a tutorial about services at http://marakana.com/forums/android/examples/60.html and

Re: [android-developers] How to get a service to either return a string or start a function in main activity?

2011-07-21 Thread Mark Murphy
On Thu, Jul 21, 2011 at 4:25 PM, Fred Niggle fred.nig...@googlemail.com wrote: however, my goal is to start a service which sets an alarm, and when the alarm fires the onStart() event I wish to display another screen (e.g. anothermain.xml) That's a trifle unusual. It would make sense, as a

Re: [android-developers] How to get a service to either return a string or start a function in main activity?

2011-07-21 Thread Fred Niggle
Thank you for your prompt reply, What I am writing is a meds reminder app, which has the option of letting a career know if the app is not acknowledged and responded to. The idea is that when the alarm event fires it triggered a sound (alert) to be played (notify user to take meds), and if the

Re: [android-developers] How to get a service to either return a string or start a function in main activity?

2011-07-21 Thread Mark Murphy
On Thu, Jul 21, 2011 at 6:33 PM, Fred Niggle fred.nig...@googlemail.com wrote: What I am writing is a meds reminder app, which has the option of letting a career know if the app is not acknowledged and responded to. The idea is that when the alarm event fires it triggered a sound (alert) to