Close Windows Phone 8 App Programmatically - windows-phone-8

I've a Windows Phone 8 Application and with a button click, I want to ask user something like "Are you sure?" and if answer is yes(ok) then application will be closed.
I've searched a lot but couldn't find anything except "Application.Terminate()" but seems this is not the right way how to do it.

Though it is possible to do this using System.Windows.Application.Current.Terminate() as Nikita says it is not recommended to offer such a functionality. Here's an excerpt from the Windows Phone Guidelines on MSDN:
Don't include Close buttons or offer users other ways to terminate
your app in its UI. Users should feel confident that the system is
managing their apps for them. The system can terminate apps
automatically to ensure the best system performance and reliability,
and users can choose to close apps using gestures on Windows or
through the Task Switcher on Windows Phone.
The user should only be able to Close an app using the home or back-button.

Related

How to highly recommend a user to launch an app when the app is not up?

I have the need to have an application always active in windows phone 8. All users have to use this application. More precisely, all users will have a background agent inside this application which will receive and send informations.
Note : I'm talking here about a private application use by a limited number of users.
During my research, I became aware that i couldn't paramater my application in order to launch it at startup. This isn't possible with Windows phone 8. So, i start looking for others options.
In my understanding, the only way to do that in the Microsoft way is to use the notifications. If the phone don't have the application launched, a notification is send periodically to invite the user to launch the application.
My question, did I miss some functionnalites in Windows Phone 8 whiches propose the same functionnality in a better way ?
Thank you very much

Prevent WinRT App from entering suspend state in a Line-of-Business app

I'm developing a line of business app for Windows 8.1, that is, I am not deploying through the Windows Store and will be able to control all of the features of both the OS and hardware this app is being deployed on.
Because this app is working as the UI in a real-time situation I would prefer if I could ignore the life-cycle events and not have the app suspend or terminate at the whim of Windows 8. Does anyone know of a way to do this?
I have seen some older answers, such as this one and this other one indicating otherwise, but I haven't yet found anything more recently and specifically dealing with the case of a line of business app. I have found the Embedded Lockdown Manager which would prevent the app losing focus and addresses some of the needs I have, but I still would like a way to simple disable Lifecycle events.
Have you tried Assigned Access Mode? Basically use PC Settings -> Accounts to lock an account to a single app. You have to reboot the device and log-in again in order to run anything else.

user interaction windows phone 8

I have to do my university project. We suppose to develop windows phone application that should track the user behavior and interaction with phone while driving.
At the moment we just trying to understand what we able to do and track.
we thought about monitoring maybe
incoming call, incoming sms and afcourse if the user answered to those,
maybe outgoing call
headset plugged in/out
click on any hardware button
screen touching..
and all the interrupts made by the user.
What our options? Can someone refer me to relevant reading?
for the purpose of your app, I suggest you implement something with voice control so that the driver can interact with his windows phone without having to touch it.
Visit these links for more info:
Here's the first link
Here's the second link

Windows Phone User Login

I am wanting to start programming games on the Windows Phone and wondering what the best way is to log a user in a session on the Windows Phone. Is it possible to do it with XBOX LIVE? Or do I have to hand-craft my own Login system?
You can have a look at Windows Azure Mobile Services (http://www.windowsazure.com/en-us/develop/mobile/) to help you out in authentication mechanisms, enabling you to have out-of-the-box support for Microsoft accounts, facebook, google and twitter (it's currently free and you can also use it for more things than just this).
If you don't want to use any external support, then you'll have to have your own hand-crafted login system and somewhere to hold it in (you could also use Mobile Services for that).
If you need any sample code, just drop me a line and I'll try to gather something up. :)

Windows Phone 8 SDK Voice Commands and Fast App Resume

I'm having a problem integrating Fast App Resume into my Windows Phone 8 app. When I hold the start button and enter a voice command, the command won't fire a Navigate event if the app is already loaded. I've tried intercepting every event I can when the app loads.... nothing.
Does anyone have any insight on how this should be handled in code?
Thanks!
I have confirmed with Microsoft that this behavior is indeed the case, and it is the way they intended it. They have left feedback to Engineering to take a look, but we can help it along by voting for it on UserVoice here.