Cordova Android application won't allow single tap until Push Notification permission granted!?!?

I’ve spent some time getting my cordova app to work perfectly for iOS. So now I’m testing with Android, and seeing some very strange behavior.

My application makes use of a webview which displays html input elements along with buttons that utilize “onclick” events in the html like this:

<input type="text" id="fldTest" name="fldTest" />
<button type="button" onclick="doSomething();">Do Something</button>

The first major problem I encountered in my Android app is that my taps on the various form elements have no effect. I CANNOT tap into the text field to start typing, nor can I tap the button to fire the onclick event.

After a lot of trial and error with the Android app, I stumbled onto the fact that I CAN enter the text field and get the button to fire the onclick event, but only if I quickly double-tap the text box or button. I don’t know why it requires double-tapping, as it makes absolutely no sense to me, but bear with me, there’s more…(I should also mention that if I access the mobile website version of my app from Chrome on my Android phone, everything works correctly and I can happily single tap textboxes/buttons, etc. the mobile website version of my app uses the same codebase, minus the use of plug-ins).

When I go into my Android phone’s settings for the app, it shows “No permissions allowed”. This was strange to me at first because in the past it was all determined by the entries in the Android manifest file. However, I have learned that starting in Android 6.0 the app needs to request permissions at run-time. So I shrug and manually grant my app the “Push Notification” permission.

And to my surprise, after granting the “Push Notification” permission, suddenly my text boxes and buttons are all working correctly via single tap!!?? I verified this by going to the settings again, removing the “Push Notification” permission, and once again am forced to quickly double-tap to click buttons/text-boxes. Adding the permission again enables the single-tap to work correctly. So this permission seems to be the key to allowing my application to work properly and I have no idea why.

Can anyone explain what’s going on here?

FYI, I’m using the following Ionic AppFlow “Linux - 2023.10” Build stack:

Cordova CLI 12.0.0
Ionic CLI 7.1.1
Node.js 18.18.2 / 20.9.0
npm 10.1.1
Yarn 1.22.19
Debian 11.6
Gradle 8.4
OpenJDK 1.8.0_332 / 11.0.18 / 17.0.6
Android SDK 27-34

And setting the following environment variables:

ANDROID_HOME /opt/android-sdk
OVERRIDE_JAVA_VERSION 17

My application’s config.xml uses the following settings as well:

<preference name="android-minSdkVersion" value="24" />
<preference name="android-targetSdkVersion" value="33" />
<preference name="android-compileSdkVersion" value="33" />

FYI, I’ve gone back and changed the app to request permissions at run-time for things like location, contacts, and camera. But here again I see some odd behavior, as the prompt to grant permission isn’t displayed until I manually grant the “Push Notification” permission via the app settings. Once I enable “Push Notification”, the run-time prompts display without a problem. It’s like the app is installed in a weird state until that permission is granted. But once it’s granted, everything works perfect.

Anyone see anything like this before?

After a ton of trial an error I was finally able to narrow the problem down to my use of the “cordova-plugin-push” plug-in, which was incompatible with android-targetSdkVersion I had configured in my config.xml. Once I corrected that, everything works as it should.