Cordova android app not able to click buttons or textboxes somehow related to Push notification permission?
I use cordova in combination with Ionic AppFlow to build iOS and Android versions of my application. I've spent some time getting it all to build and 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: Do Something 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. 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). 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... When I go into my Android phone's settings for app, it shows "No permissions allowed". This was strange to me because in the past it was all determined by the entries in the Android manifest file. However, I have since 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 (I'll deal with the run-time permission requests later). 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:
I use cordova in combination with Ionic AppFlow to build iOS and Android versions of my application.
I've spent some time getting it all to build and 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:
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.
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).
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...
When I go into my Android phone's settings for app, it shows "No permissions allowed". This was strange to me because in the past it was all determined by the entries in the Android manifest file. However, I have since 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 (I'll deal with the run-time permission requests later).
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: