Asif
Posts: 0
Joined: Tue Aug 13, 2013 12:56 pm

navigator.app.exitApp() not working from apk file

Hi,
I have written navigator.app.exitApp(); on the click of logout button in my app.
Its working fine from appery.io tester but not working from the apk on the phone.
Is it a issue with the library version of appery.

I am using library version 2.0

Please help!!

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

navigator.app.exitApp() not working from apk file

Hello!

What device you use to test? What is Android version?

Asif
Posts: 0
Joined: Tue Aug 13, 2013 12:56 pm

navigator.app.exitApp() not working from apk file

Samsung galaxy S advance (android version 4.1)

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

navigator.app.exitApp() not working from apk file

Add the following lines
pre<feature name="App">
<param name="android-package" value="org&#46;apache&#46;cordova&#46;App"/>
</feature>/pre
in ANDROID--Project name--res--xml--config.xml

invade dev
Posts: 0
Joined: Mon Aug 25, 2014 1:12 pm

navigator.app.exitApp() not working from apk file

Adding feature app it doesnt work specially if you are using this

<category android:name="android.intent.category.HOME" />
<category android:name="android.intent.category.DEFAULT" />

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

navigator.app.exitApp() not working from apk file

Hello invade dev,

Could you please specify, did you add the lines from Marina's comment in
ANDROID--Project name--res--xml--config.xml ? Also please detail what device and OS version do you use, do you install the application on the device or not, what libraries version do you have?

invade dev
Posts: 0
Joined: Mon Aug 25, 2014 1:12 pm

navigator.app.exitApp() not working from apk file

Maryna is right this plugin org.apache.cordova.App has to be in config.xml

<plugins>
<plugin name="App" value="org.apache.cordova.App"/>
......
</plugins>

I am having issue on how to disable the navigation bar on the tablet, specially notifications located on top of the screen.

Any brilliant ideas would be highly appreciated.

Sayan Nandy
Posts: 0
Joined: Sat Mar 07, 2015 5:28 am

navigator.app.exitApp() not working from apk file

Hi,

I have added the following code for exiting the App:

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

Also in the config.xml
Image
But still in my ASUS phone the exit is not working. I am kind of new to this. Can you please let me know if I am missing something!

Alena Prykhodko
Posts: 0
Joined: Tue Apr 09, 2013 7:36 am

navigator.app.exitApp() not working from apk file

Hello Sayan,

Sorry for delayed reply.
Please clarify do you test app as native?
What OS version do you use?
Please provide us with a public app link (http://devcenter.appery.io/documentat...) and steps to reproduce.

Return to “Issues”