I suggest you provide the full description when opening a thread, since it will be easierto provide a solution, for other members
An easy way I can think of, is to declare a variable at your service module, and set it to 'true' when starting the activity. Then in the activity you can check for this variable and determine if it was opened from the service. And don't forget to set it back to 'false', once read.