Titanium Mobile
  1. Titanium Mobile
  2. TIMOB-11851

Android: hardware back key event not fired

    Details

      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

        Issue Links

          Activity

          Hide
          Max Stepanov added a comment -

          Caused by https://github.com/appcelerator/titanium_mobile/commit/c4acb990669de48d0dd19906b3e3f20c9fa13ffa

          Reverting activityProxy.hasListeners("android:back") to window.hasListeners("android:back") solves the regression.

          Show
          Max Stepanov added a comment - Caused by https://github.com/appcelerator/titanium_mobile/commit/c4acb990669de48d0dd19906b3e3f20c9fa13ffa Reverting activityProxy.hasListeners("android:back") to window.hasListeners("android:back") solves the regression.
          Show
          Ping Wang added a comment - PR https://github.com/appcelerator/titanium_mobile/pull/3473
          Hide
          Tamila Smolich (Inactive) added a comment -

          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)

          Show
          Tamila Smolich (Inactive) added a comment - 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)

            People

            • Assignee:
              Hieu Pham
              Reporter:
              Soumya Kanti Kar
            • Watchers:
              7 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development