tariq
Posts: 0
Joined: Wed Nov 13, 2013 5:23 pm

Device BackButton Work only on Appery.io Tester ??

Hi..

I Called this function at my home Screen Backbotton Event :

function getConfirmation(){
var retVal = confirm("Do you want to Exit the Program ?");
if( retVal == true ){
navigator.app.exitApp();
}else{
return false;
}
}

It worked perfectly on Appery.io Tester But not when i installed the program on my S4 Device.
Any Advice??

I really appreciate any help you can provide

Tariq

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

Device BackButton Work only on Appery.io Tester ??

The event should work when you install the app. Try a simple alert(..) to see if the event is fired when you install on the device.

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Device BackButton Work only on Appery.io Tester ??

This is a bug. Will be fixed.

Please try using Libraries version 1.1

tariq
Posts: 0
Joined: Wed Nov 13, 2013 5:23 pm

Device BackButton Work only on Appery.io Tester ??

Yaah, it WORKS with libraries version 1.1 :)

Thank you so much for your support katya and Max. I appreciate the assistance.

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

Device BackButton Work only on Appery.io Tester ??

Hello! We fixed this bug on our test environment. The workaround for 1.2 version:

Code: Select all

 Open "Source" tab; 
 Open "Android/%projectName%/res/xml/config.xml" 
 Add 

pre<feature name="App"><param name="android-package" value="org&#46;apache&#46;cordova&#46;App" &#47;><&#47;feature>/prebefore
pre<feature name="Device">/pre

Kieran Keene
Posts: 0
Joined: Sat Dec 21, 2013 6:09 pm

Device BackButton Work only on Appery.io Tester ??

Hello -

Where would the below code go? I can't seem to find a back button event?

function getConfirmation(){
var retVal = confirm("Do you want to Exit the Program ?");
if( retVal == true ){
navigator.app.exitApp();
}else{
return false;
}
}

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

Device BackButton Work only on Appery.io Tester ??

Hello Kieran,

We sent you email, but it should be better to continue our conversation here, so i'll repeat our reply. Please clarify, how did you add this handler? If through the UI builder then you should use this code on the event "backbutton":

codevar retVal = confirm("Do you want to Exit the Program ?");
if( retVal == true ){
navigator&#46;app&#46;exitApp();
}else{
return false;
}/code

as in the screenshot: Image

B510
Posts: 0
Joined: Wed Jun 04, 2014 2:17 pm

Device BackButton Work only on Appery.io Tester ??

Hello All,

navigator.app.exitApp()

does not work on iOS..

please help

thanks

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

Device BackButton Work only on Appery.io Tester ??

Hello!

Could you clarify where do you run this code?
Did you install app on device?

Shubham Kumar
Posts: 0
Joined: Mon Feb 09, 2015 5:33 am

Device BackButton Work only on Appery.io Tester ??

When I am running that App from Appery.Io tester the exit is working perfectly but after Installation it is just Minimizing.

Return to “Issues”