75341704 opened a new issue #1146:
URL: https://github.com/apache/cordova-android/issues/1146


   <!--
   Please have a look at the issue templates you get when you click "New issue" 
in the GitHub UI.
   We very much prefer issues created by using one of these templates.
   -->
   
   ### Issue Type
   <!-- Please check the boxes by putting an x in the [ ] like so: [x] -->
   
   - [ ] Bug Report
   - [ ] Feature Request
   - [x ] Support Question
   
   ## Description
   I use the code about 'backbutton' hereunder
   https://cordova.apache.org/docs/en/latest/cordova/events/events.html
   
   Hereunder is operation sequence.
   The app is loaded and there is no further interaction in the app.
   And then the backbutton is pressed at first. 
   The 'backbutton' event is not fired and the app is exited.
   
   But after the app is loaded and some interaction is done , the 'backbutton' 
event is fired and listener is working.
   
   Please kindly check whether it is ok or not.
   
   ## Information
   <!-- Include all relevant information that might help understand and 
reproduce the problem -->
   <!DOCTYPE html>
   <html>
       <head>
       <title>Device Ready Example</title>
       <script type="text/javascript" charset="utf-8" src="cordova.js"></script>
       <script type="text/javascript" charset="utf-8" src="example.js"></script>
       </head>
       <body onload="onLoad()">
       </body>
   </html>
   // example.js file
   // Wait for device API libraries to load
   //
   function onLoad() {
       document.addEventListener("deviceready", onDeviceReady, false);
   }
   
   // device APIs are available
   function onDeviceReady() {
       document.addEventListener("backbutton",onBackButton, false);
       // Add similar listeners for other events
   }
   
   function onBackButton() {
       // Handle the pause event
   }
   ### Command or Code
   <!-- What command or code is needed to reproduce the problem? -->
   
   ### Environment, Platform, Device
   <!-- In what environment, on what platform or on which device are you 
experiencing the issue? -->
   
   
   
   ### Version information
   <!--
   What are relevant versions you are using?
   For example:
   Cordova: Cordova CLI, Cordova Platforms, Cordova Plugins
   Other Frameworks: Ionic Framework and CLI version
   Operating System, Android Studio, Xcode etc.
   -->
   
   
   
   ## Checklist
   <!-- Please check the boxes by putting an `x` in the `[ ]` like so: `[x]` -->
   
   - [ ] I searched for already existing GitHub issues about this
   - [ ] I updated all Cordova tooling to their most recent version
   - [ ] I included all the necessary information above
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to