My app doesn't close using the back button

vargai

New member
Sep 18, 2014
8
0
0
Hi,
I have written my very first application to Windows Phone 8.1 in Visual Studio 2013. If I run the application on my phone or in emulator through Visual Studio, it does not close pressing the back button (when I hold the back button it shows up), only by pressing long and X it. Should I resolve it from code or is it only because I deploy it and it will disappear when I upload it to the store?

Sorry for my English :orly:
 
Is there any solution to kill it? Other apps I use close by back button. I would like this on my app too.
 
Is there any solution to kill it? Other apps I use close by back button. I would like this on my app too.
All 8.1 apps must behave like this. You can swipe the app down in the multitask screen to close it. Similar to windows 8
 
I think you are writing your app via Visual Basic right?
does your code contains
Public NotInheritable Class MainPage

Public Sub New()
InitializeComponent()
AddHandler Application.Current.Suspending, AddressOf App_Suspending
End Sub

End Class
 
Last edited:
oops sorry
using System;
using Windows.ApplicationModel;
using Windows.ApplicationModel.Activation;
using Windows.UI.Xaml;

partial class MainPage
{
public MainPage()
{
InitializeComponent();
Application.Current.Suspending += new SuspendingEventHandler(App_Suspending);
}
}
this is the module for app suspending
 
you can also target windows phone 8 while building the app it's more better for you.
I still don't get it why do you want to eliminate it. It just suspends the app instead of closing it.
 
Last edited:
I've got this message: The name 'App_Suspending' does not exist in the current context. I used required namespaces.
I don't have any app which suspends instead of closing and I want my app to react like other popular ones. It is a ticket buying app, nobody uses more than two times a day.
 
I've got this message: The name 'App_Suspending' does not exist in the current context. I used required namespaces.
I don't have any app which suspends instead of closing and I want my app to react like other popular ones. It is a ticket buying app, nobody uses more than two times a day.

I think it's by default you have add app exit. I can't help anymore cause I don't know much about c# you should go to wpcentral developer forum and ask them
I still suggest you to don't worry as apps like Facebook,Wunderlist and 6cret uses the same feature i.e. They suspends instead of closing when back button is pressed.
 
Last edited:

Members online

Forum statistics

Threads
338,365
Messages
2,261,376
Members
428,749
Latest member
jaleya2