c# - How to capture unlock screen event in Window phone 7.1? -


how capture screen unlock event , fire event app when screen unlocked in window phone 7.1?

you can handle phoneapplicationframe.unobscured event. problem event fire when other types of chrome removed (such messagebox being closed).

however, keep track of variable checks if activated event has been fired event raised when phone unlocked.

so in unobscured event, check if flag in activated event set true , can assume, relatively high confidence, user has unlocked phone. (this untested seems work).

from msdn:

in ordinary app, following events occur.

  • when phone locked, first obscured event raised, , deactivated event raised. can check islocked property of obscuredeventargs determine whether lock screen caused deactivation.

  • when phone unlocked, activated event raised, , unobscured event raised.

in app use location services , specially configured run continuously in background, following events occur.

  • when phone locked, obscured event raised. can check islocked property of obscuredeventargs determine whether lock screen obscured app.

  • when phone unlocked, unobscured event raised.


Comments

Popular posts from this blog

c# - Operator '==' incompatible with operand types 'Guid' and 'Guid' using DynamicExpression.ParseLambda<T, bool> -