navigator.app.exitApp() is not working

后端 未结 7 1029
予麋鹿
予麋鹿 2021-01-05 14:36

I am developing Windows phone 8 PhoneGap app. Using navigator.app.exitApp() I am quiting the app from home screen in Windows phone 7. But when I tried the same in Windows ph

相关标签:
7条回答
  • 2021-01-05 15:34

    Navigator.app.exit() will not exit the application it will crash the application.

    In Windows Phone 8, it is handled so it will just throw an exception.

    You will have to write the below code in page_BackKeyPress event in CordovaView.xaml.cs

    Application.Current.Terminate();
    

    It will exit your application on pressing hardware backbutton.

    0 讨论(0)
提交回复
热议问题