Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-11851] Android: hardware back key event not fired

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2012-11-28T23:53:59.000+0000
Affected Version/s2012 Sprint 24, 2012 Sprint 24 API
Fix Version/sRelease 3.0.0, Release 3.1.0, 2012 Sprint 24, 2012 Sprint 24 API
ComponentsAndroid
LabelsSupportTeam, module_alertdialog, qe-review, qe-testadded, regression, triage
ReporterSoumya Kanti Kar
AssigneeHieu Pham
Created2012-11-25T10:59:07.000+0000
Updated2013-06-11T21:34:42.000+0000

Description

Problem description

The android:back event is not fired anymore in v3.0

Steps to reproduce

Use the following code to reproduce the issue:
var self = Ti.UI.createWindow({
    backgroundColor:'#ffffff',
    navBarHidden:true,
    exitOnClose:true
});

self.addEventListener('android:back', function(e) {
    alert('Back button pressed');
});

self.open();
When clicking back, nothing happens. Works fine on 2.1.x

Attachments

FileDateSize
test.zip2012-11-25T10:59:07.000+0000754861

Comments

  1. Max Stepanov 2012-11-26

    Caused by https://github.com/appcelerator/titanium_mobile/commit/c4acb990669de48d0dd19906b3e3f20c9fa13ffa Reverting activityProxy.hasListeners("android:back") to window.hasListeners("android:back") solves the regression.
  2. Ping Wang 2012-11-28

    PR https://github.com/appcelerator/titanium_mobile/pull/3473
  3. Tamila Smolich 2012-12-04

    Closing as fixed. Tested on: Titanium Studio, build: 3.0.0.201211301903 Titanium SDK, builds: 3.0.0.v20121130200208; 3.1.0.v20121203181001 Devices: Samsung Galaxy S III (4.0.4)

JSON Source