You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by GitBox <gi...@apache.org> on 2020/10/22 16:02:31 UTC

[GitHub] [cordova-android] AshleyScirra opened a new issue #1106: "backbutton" event no longer seems to work

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


   # Bug Report
   
   ## Problem
   The [backbutton](https://cordova.apache.org/docs/en/9.x/cordova/events/events.html#backbutton) event no longer seems to work.
   
   ### What is expected to happen?
   Adding the "backbutton" event should cause the event handler to run when pressing the back button.
   
   ### What does actually happen?
   The app quits (as if there was no back button handler at all).
   
   ## Information
   I'm pretty sure this used to work, so it seems like it's a regression in the latest version of Cordova, or may be related to the latest version of Android or API target.
   
   ### Command or Code
   A trivial back button test ought to demonstrate the problem.
   
   Here's a debug APK build that demonstrates the problem in a larger example: https://www.dropbox.com/s/nuxp0nq4lqm4uyw/back%20button%20test.android.debug.apk?dl=0
   
   Touch the orange square, then press back. It should go back to the first screen, but instead it quits the app.
   
   ### Environment, Platform, Device
   Tested on a Pixel 3 running Android 11
   
   ### Version information
   Tested using cordova-android@9.0.0, built via the CLI
   
   ## Checklist
   <!-- Please check the boxes by putting an x in the [ ] like so: [x] -->
   
   - [x] I searched for existing GitHub issues
   - [x] I updated all Cordova tooling to most recent version
   - [x] 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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-android] NiklasMerz commented on issue #1106: "backbutton" event no longer seems to work

Posted by GitBox <gi...@apache.org>.
NiklasMerz commented on issue #1106:
URL: https://github.com/apache/cordova-android/issues/1106#issuecomment-1086614537


   @erisu I just tested it with master. It's fixed there. Maybe we should consider releasing the plugin.


-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-android] C3GameDev commented on issue #1106: "backbutton" event no longer seems to work

Posted by GitBox <gi...@apache.org>.
C3GameDev commented on issue #1106:
URL: https://github.com/apache/cordova-android/issues/1106#issuecomment-777292064


   Hey,
   is there any plan to fix this issue?
   I guess it's a problem from Android 8+, tested it with Android 10 + 11 -> error. On Android 7 it's working fine.
   
   It's an important feature since it's required to comply with the "Android Core App Quality Guidelines"!
   
   Thanks for the help!


----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-android] C3GameDev commented on issue #1106: "backbutton" event no longer seems to work

Posted by GitBox <gi...@apache.org>.
C3GameDev commented on issue #1106:
URL: https://github.com/apache/cordova-android/issues/1106#issuecomment-1086613473


   I think it's a problem with cordova splashscreen plugin, the following fixed the issue for me:
   Open app->java->org.apache.cordova->splashscreen and delete line 103 ("getView().setVisibility(View.INVISIBLE);")
   After that everything works fine.


-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-android] NiklasMerz commented on issue #1106: "backbutton" event no longer seems to work

Posted by GitBox <gi...@apache.org>.
NiklasMerz commented on issue #1106:
URL: https://github.com/apache/cordova-android/issues/1106#issuecomment-1086609799


   I just did a quick test on my Android 11 device and it works just fine. Make sure you are adding the even listener in "deviceready". 
   
   Maybe another plugin is interfering with the event?


-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-android] th3hamm0r commented on issue #1106: "backbutton" event no longer seems to work

Posted by GitBox <gi...@apache.org>.
th3hamm0r commented on issue #1106:
URL: https://github.com/apache/cordova-android/issues/1106#issuecomment-819696251


   We currently also have this issue, but in our case, the "backbutton"-event works after the user touches the app screen.
   
   So if we register a listener for the event in "deviceready" and press the backbutton directly after the app start, on older devices (eg. Android 6), it gets fired, but on devices with Android 10 or 11 it doesn't (instead it closes the app). On those devices the user has to touch the app screen first. After that, if back is pressed, the backbutton-event fires.
   
   We've tried it with the latest Cordova Android 9.1.0.


-- 
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-android] erisu commented on issue #1106: "backbutton" event no longer seems to work

Posted by GitBox <gi...@apache.org>.
erisu commented on issue #1106:
URL: https://github.com/apache/cordova-android/issues/1106#issuecomment-1086614290


   Can you try the main branch of the splashscreen plugin to see if it was fixed?
   
   There was a commit that I believe that might have fixed the focus of the view.
   
   https://github.com/apache/cordova-plugin-splashscreen/commit/66d1e00e003fb2f935cdbb8a5b0e47b416836b68


-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org