[
https://issues.apache.org/jira/browse/CB-283?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13225874#comment-13225874
]
Kevin Scott commented on CB-283:
--------------------------------
The following code has not worked correctly since v1.3.1
document.addEventListener("backbutton", backButtonTouch, true);
function backButtonTouch(){
alert("back button");
if(MobileApp.stack.index>0){
MobileApp.stack.pop();
}else{
//device.exitApp();
navigator.device.exitApp();
}
}
The above code should fire the alert when the hardware back button is pressed.
> Disabling the back button handler doesn't give control back to the main
> Activity
> --------------------------------------------------------------------------------
>
> Key: CB-283
> URL: https://issues.apache.org/jira/browse/CB-283
> Project: Apache Callback
> Issue Type: Bug
> Components: Android
> Affects Versions: Master
> Reporter: Simon MacDonald
> Assignee: Filip Maj
> Priority: Blocker
> Fix For: 1.5.0
>
>
> Go into the mobile spec tests, tap "Events", tap "Intercept backbutton",
> click the hardware back button. You should see an line printed in the results
> section "Back button intercepted". Now tap "Stop intercept of backbutton" and
> then click the hardware back button. You'll notice the app does not go back
> to the previous page.
> Looking at the logs you will see:
> I/InputDispatcher( 129): Delivering key to current input target: action: 1,
> channel '40c840b0 com.phonegap.mobilespec/com.phonegap.mobilespec.MobileSpec
> (server)'
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira