handle when unlock the screen Windows Phone - windows-phone-8

I have to make an app that appears when you unlock the screen and then forces you to type Pin code you have set before for authentication exactly the same one that Windows Phone has in Settings.
I already made SetPin page and Pinlogin page, but the only way I can do to make it appear when you unlock the screen is to start the app and make it run under the lock screen and use unobscured event to call it.
But the Assignment requires to only setLock one time and no need to run the app again, it will appear when unlock the screen like the original one in WP, but I have no clue how to do it, how to start navigating to a page in your app when your app is not run and how to get the event when unlock the screen without running an app.
It makes no sense for this assignment because I think we can not stop the start button on device even when I am successful at it.

Not possible with the current API.

Related

How to write an app that does not open a window in Windows Phone

I want to write an app that just manipulates the content of it's own tile and then silently terminates.
How do I get rid of any default window and splash screen?
Thanks!
You cannot do this fully. Tapping the tile will always launch the app so there will always be a context switch even if it exits immediately.
The closest you can get is to write a Silverlight app and not include a SplashScreenImage.jpg file. When the app starts up immediately exit by calling Application.Terminate (Runtime apps always show their splash screens while loading, but splash screens are optional for Silverlight apps).
This isn't recommended and is likely to confuse your users. A better design would be to let the app launch and do something useful such as displaying more information about what is on the tile or letting the user know what changes are being made.
As Romasz says, this may not pass certification. See Windows and Windows Phone Store Policies for the certification requirements. I suspect an immediate exit with no reason given will appear as and be treated as an app crash.

Notification on Lock Screen triggered by (remote) Push Notification?

is it possible to display something on the Windows Phone Lock Screen triggered by a push notification?
According to this graphic, I understand that's it's only possible via local notifications, or am I getting something wrong? I would like my app to make notifications on the lock screen whenever something important happens, which is triggered via remote push notifications from my server - is this possible?
(image taken from here)
Actually, it is possible. The lock screen just reflects the information of the main pinned tile of your app. So, if you update the tile, for example sending a tile push notification, the lock screen will be updated too.
Note, that you cannot programatically set your app to show notifications in lock screen. User has to manually select it.
You may find this post useful:
http://www.silverlightshow.net/items/Windows-Phone-8-Live-Tiles-and-Lock-Screen.aspx

How to build a windows phone 8 application like kid's corner?

I need help on how to build an app for windows 8 phone which is exactly similar to Kid's Corner application which is available with NOKIA LUMIA 520.
I registered with the App Studio of Microsoft and tried to create a simple application like album but as a nubee I am not aware of all fundamentals and so need a simple guide.
Here is what I want my application should do:
Once you launch it, you can not go back until you lock phone and unlock it using password. same way as Kid's Corner.
I want that the app user should be able to see videos and photos only which the app is allowed to access.
User should be able to Zoom photos and play pause videos and using touch-slide can view the next one.
User should not be able to delete any files.
Thanks for pointing me to the exact resource where I can find some things which are easy to understand and simple to do :) .
Thanks a lot!
EDIT:
Is it possible to get the source code of Kid's Zone/Corner application?
1. Once you launch it, you can not go back until you lock phone and unlock it using password. same way as Kid's Corner.
This is impossible to lock user into your app. User always can exit or suspend your app using hardware buttons, you just can handle back button tab, but user also can touch to startmenu button or can hold to backbutton.
And you cant get kid zone's source code, its part of Windows Phone OS.

Suppress Reminder in Windows Phone and instead Simulate Navigation from within code

In Windows Phone, the reminder is usually used for scheduled notifications. The reminder when popped up, requires user to click the reminder pop up in order to navigate to specific page and do certain action.
Can we simulate or suppress this reminder programatically when occured and instead perform the action it was supposed to execute when actually clicked. This would be of great use to user.
Any help, suggestions or ideas on the same?.
Thanks In Advance.
It isn't possible. A Windows Phone application has very limited interaction with the system when it isn't running in the foreground.
If you're trying to bypass the reminder to display something (for instance, a page of your application) without user interaction, then you have no way of doing that.
If it's just about updating some data or calling a webservice without displaying anything, you should use a background agent instead of a reminder.
Windows Phone was built around the idea of letting the user in control at all time. That's why there is no way of forcing the user to navigate to a page of your application if it wasn't running in first place.

Prevent automatic screen lock on Windows Phone 8

I have written an app that performs some lengthy operations, such as web requests, in a background thread. My problem is that after a while the automatic screen lock turns the screen off and my operations are aborted.
Is there a way to prevent the screen to be automatically turned off during these operations? Or is it in some way possible to keep running while screen is turned off?
I know there are ways to prevent the screen to turn off while debugging, but i need this behavior in the hands of the end user. Therefore I can not rely on some setting being set on the phone, but rather some programmatic solution.
The screen can be forced to stay on using the UserIdleDetectionMode property of the current PhoneApplicationService.
To disable automatic screen lock:
PhoneApplicationService.Current.UserIdleDetectionMode = IdleDetectionMode.Disabled;
To enable it again:
PhoneApplicationService.Current.UserIdleDetectionMode = IdleDetectionMode.Enabled;
More information can be found on MSDN
I know this question is about Windows Phone 8, but I had a hard time figuring out the way for Windows Phone 8.1 (Universal XAML Apps).
Use:
var displayRequest = new Windows.System.Display.DisplayRequest();
displayRequest.RequestActive();
Apps that show video or run for extended periods without user input can request that the display remain on by calling DisplayRequest::RequestActive. When a display request is activated, the device's display remains on while the app is visible. When the user moves the app out of the foreground, the system deactivates the app's display requests and reactivates them when the app returns to the foreground.
See: http://msdn.microsoft.com/en-us/library/windows/apps/br241816.aspx