Page 1 of 2

Device BackButton Work only on Appery.io Tester ??

Posted: Wed Nov 13, 2013 5:23 pm
by tariq

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


Device BackButton Work only on Appery.io Tester ??

Posted: Wed Nov 13, 2013 6:10 pm
by maxkatz

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.


Device BackButton Work only on Appery.io Tester ??

Posted: Wed Nov 13, 2013 7:09 pm
by Kateryna Grynko

This is a bug. Will be fixed.

Please try using Libraries version 1.1


Device BackButton Work only on Appery.io Tester ??

Posted: Wed Nov 13, 2013 8:09 pm
by tariq

Yaah, it WORKS with libraries version 1.1 :)

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


Device BackButton Work only on Appery.io Tester ??

Posted: Thu Jan 09, 2014 10:23 am
by Maryna Brodina

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


Device BackButton Work only on Appery.io Tester ??

Posted: Fri Jun 27, 2014 12:44 pm
by Kieran Keene

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;
}
}


Device BackButton Work only on Appery.io Tester ??

Posted: Fri Jun 27, 2014 3:59 pm
by Evgene Karachevtsev

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


Device BackButton Work only on Appery.io Tester ??

Posted: Fri Sep 05, 2014 8:17 am
by B510

Hello All,

navigator.app.exitApp()

does not work on iOS..

please help

thanks


Device BackButton Work only on Appery.io Tester ??

Posted: Fri Sep 05, 2014 10:44 am
by Maryna Brodina

Hello!

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


Device BackButton Work only on Appery.io Tester ??

Posted: Mon Feb 09, 2015 5:33 am
by Shubham Kumar

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