In this article we are going to see how to Simulate the Lock screen behavior while testing the application in Windows Phone Emulator. With this feature check we can test how our apps restores its state while activating and deactivating the Lock screen when the application is in working stage. The application instead of going to terminated state it should go to dormant stage unless we have enabled tombstoning on debugging the application. While the phone is unlocked the app will basically be activated and restores the state of the application. [more]
Let us see how we can use this feature in Windows Phone Emulator while locking and unlocking the application. Open Visual Studio 2012 IDE in administrator mode and open an existing application which we developed in our previous articles as shown in the screen below.
Now let us see how we can simulate the lock screen scenarios in Windows Phone Emulator, first run the application in emulator or the device without debugging mode as shown in the screen below.
In Visual Studio 2012 IDE, under tools menu we have an option Simulation Dashboard which will be the primary tool to test the scenarios. Click on the Simulation Dashboard will show a popup window as shown in the screen below.
In the simulation dashboard we can see the option Lock Screen with 2 radio buttons Locked and Unlocked. So we can change between these 2 options to test the application in the Lock Scenario and in the Unlock scenario. From the coding perspective when the phone is locked first the Obscured event happens and followed by the Deactivate event will be raised and when the phone is unlocked first the Activated event will be raised and then the UnObscured event will be raised.
No Comments
Having read this I thought it was extremely enlightening. I appreciate you taking the time and effort to put this short article together. I once again find myself personally spending a significant amount of time both reading and commenting. But so what, it was still worth it!|
Hello there! I know this is kinda off topic but I was wondering which blog platform are you using for this website? I'm getting sick and tired of WordPress because I've had problems with hackers and I'm looking at alternatives for another platform. I would be fantastic if you could point me in the direction of a good platform.|
Hello There. I found your blog using msn. This is a really well written article. I will be sure to bookmark it and come back to read more of your useful information. Thanks for the post. I will certainly return.|