Note that there are some explanatory texts on larger screens.

plurals
  1. POOverride Android Backbutton behavior only works on the first page with PhoneGap
    primarykey
    data
    text
    <p>I am using PhoneGap 1.5.0, jQuery 1.7.1 and jQuery mobile 1.0.1 and trying to override the backbutton in Android as stated <a href="http://wiki.phonegap.com/w/page/29494136/Android%20Back%20Button%20Handler" rel="nofollow noreferrer">here</a> or <a href="https://stackoverflow.com/questions/8602722/phonegap-android-back-button-close-app-with-back-button-on-homepage">here</a>. </p> <pre><code>document.addEventListener("deviceready", onDeviceReady, false); // PhoneGap loaded function onDeviceReady() { console.log("PhoneGap Ready!"); // waiting for button document.addEventListener("backbutton", handleBackButton, false); } // handle the back button function handleBackButton() { console.log("Back Button Pressed!"); navigator.app.exitApp(); } </code></pre> <p>But it only works on the first page of my app. After changing to a different page the backbutton does nothing at all. The app consists of a tabview like this:</p> <pre><code>&lt;body&gt; &lt;div data-role="page" id="pilotTab"&gt; &lt;div data-role="header"&gt; &lt;h1&gt;Pilot&lt;/h1&gt; &lt;/div&gt; &lt;div data-role="content" id="pilotContent"&gt; content be here ;) &lt;/div&gt; &lt;div data-role="footer" data-position="fixed"&gt; &lt;div data-role="navbar"&gt; &lt;ul&gt; &lt;li&gt;&lt;a href="pilotTab.html" data-transition="none"&gt;Lotse&lt;/a&gt; &lt;/li&gt; &lt;li&gt;&lt;a href="bookingTab.html" data-transition="none"&gt;Verkehr&lt;/a&gt; &lt;/li&gt; &lt;li&gt;&lt;a href="mainListTab.html" data-transition="none"&gt;B&amp;ouml;rt&lt;/a&gt; &lt;/li&gt; &lt;/ul&gt; &lt;/div&gt; &lt;!-- /navbar --&gt; &lt;/div&gt; &lt;!-- /footer --&gt; &lt;/div&gt; </code></pre> <p></p> <p>Is it a stupid mistake or is there something special I have to consider to make it work properly? Thanks in advance.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload