faq how to write "observation" app or like alarm clock

I've written wf, df and time to app Slight smile

I need some quick help to not spend time on testing.

Short description, user:

-go to the app and choose form menu [start observation] (for example steps/hr etc or set alarm)

- go somewhere else (activity, wf)

- app should run in background an "observe" for some event from system or from app

question/answers

- when app is in foreground

-- is the same rules like in wf/df system call onUpdate/onPartialUpdate and burn in protection?

--is any system controls

--- like in std alarm clock app (list)

---time picker

---etc. or I should implement everything myself

- when in background

-- how to run code: should I start timer on app.onStop() to do something in background (quick tests show that app exits)

-- is it possible to show view/alarm/vibrate when event happens?

I don't have much time so If it big work I'd like to know before Slight smile

thx