- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I'm new to this and I try to build an app.
This is in my index.html header:
<script src="intelxdk.js"></script> <script src="cordova.js"></script> <script src="xhr.js"></script> <script src="xdk/init-dev.js"></script> <script src="js/app.js"></script> <script src="js/init-dev.js"></script> <script src="js/init-app.js"></script>
And this in my init-app.js:
app.initEvents = function () { "use strict"; var fName = "app.initEvents():"; app.consoleLog(fName, "entry"); app.initDebug(); // just for debug, not required; keep it if you want it or get rid of it app.hideSplashScreen(); // after init is good time to remove splash screen; using a splash screen is optional $(".quitApp").bind("click", exitFromApp); //Click on exit button $("#refreshWeather").bind("click", getWeatherData); //Click on "refresh weather" document.addEventListener("intel.xdk.device.remote.data", getRemoteDataEvent, false); //refresh the data document.addEventListener("backbutton", exitFromApp, false); //also quit app when pressing back button app.consoleLog(fName, "exit"); };
So and a part of the app.js:
function exitFromApp() { navigator.app.exitApp(); }
Everything else is just standard setting. My problem is, that when testing in Emulator or Testing onnmy real device, nothing happens on Back Button or when clicking the Exit Button. Did I forget something? I'm really confused.
Thanks for help.
- Tags:
- HTML5
- Intel® XDK
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You're using jQuery but have not included the jQuery library in your app. You need to download and add it to your app and then make sure to include it in the list of JS libs you include in your index.html file.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page