Android BackButton issues

You mean in my app? It’s in a page.ts

Yeah, it doesn’t work :frowning: It won’t listen to the registerbackbuttonaction at all :frowning:

Mmmmh I’m sorry I don’t know what to say, are you testing on a real android device?

Yes, testing on a real device. This is so weird man. Trying the nom package ionic hardwarebuttons now to see if that helps.

Nope, that didn’t work either, this is soooooo weird. WHYYYY, GAAAH :stuck_out_tongue:

to be honest I’m out of idea, sorry

Totally understand. I will try to replica the whole project step by step to see what is going on.

1 Like

Good luck! Looking forward hearing what will be the results

Already have the results! I created a new project and one by one tried to add my stuff from the original project. I have a custom plugin that I import into my project, as soon as I did that, platform.registerBackButtonAction() didn’t work anymore.

Do you have any idea with colliding custom plugins?

Unfortunately no idea, never tried to write a custom plugin from scratch

Alright, cool. Thanks for all the help man or woman! I will look into the code and see if I have some code there that overrides it for some reason. Or wait, could be that I changed the minSDK version as well. Will try that.

Nope, wasn’t the minSDK, then it’s the plugin. Really interesting issue :stuck_out_tongue:

Good to see the issue as challenging :wink:

Good luck, let me know how it went

Will let you know. To my surprise it’s not just my custom plugin, it’s coming from other native plugins as well. I searched and I saw some people also having issues with e.g CameraPlugin. Must be a way to override it.

Managed to solve it. Info in this thread.

https://forum.ionicframework.com/t/cordova-plugins-colliding-with-hardware-backbutton/139959/12