Click here to Skip to main content
15,887,214 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
Hello, I'm building an android app with HTML5 and Javascript, and I want to add a close button to end my application. I read that I can do by using Phonegap API, I installed phonegap and I cannot find the phonegap.js on my hard drive.

Is there another way to end my application? Where can I find phonegap.js?

Thank you
Posted
Comments
Richard MacCutchan 10-Dec-15 11:20am    
Where did you install it?
elshorbagy 10-Dec-15 18:14pm    
I installed node.js and then installed the phonegap

1 solution

Thats 2 separate questions. First you need to configure PhoneGap properly with your IDE. Check your Downloads folder.. then config with your IDE by checking these documentation properly:
Getting started with PhoneGap in Eclipse for Android[^]
http://phonegap.com/developer/[^]

To exit from your app do code like:
JavaScript
exitApp:function() {   
app.exitApp();
}


More:
PhoneGap - android exit on backbutton[^]
Exit from app when click button in android phonegap?[^]
 
Share this answer
 
Comments
elshorbagy 10-Dec-15 15:43pm    
thank you, but how will I add the phonegap.js file to my current project?
ridoy 11-Dec-15 12:31pm    
Add the phonegap.js file to the <head></head> section. More details you can find from here: https://www.howtoforge.com/setting-up-an-android-app-build-environment-with-eclipse-android-sdk-phonegap-fedora-14-p5

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900