I am a windows phone developer.
I have to open my windows phone 7.1 application every time the phone is unlocked.
When we unlock the windows phone, it first shows the wallpaper
and then ask the password (if set). At that time I want to show my application
along with the set password screen or just my application when no password required.

So how can we identify in our code if the phone is unlocked?

Is it means that my application need to run all the time in background?

Is there any event which can tell us that the phone is unlocked in Windows Phone.