nbruley opened a new issue, #1725:
URL: https://github.com/apache/cordova-android/issues/1725

   # Bug Report
   
   ## Problem
   
   ### What is expected to happen?
   onDeviceReady function should fire
   
   
   ### What does actually happen?
   For at least some Android devices, the onDeviceReady function does not 
initiate, although it works fine in Android Studio.
   
   
   ## Information
   <!-- Include all relevant information that might help understand and 
reproduce the problem -->
   
   This may relate to this reported unresolved issue: 
https://github.com/apache/cordova-android/issues/604
   
   
   ### Command or Code
   <!-- What command or code is needed to reproduce the problem? -->
   I tested with this index.html file, without plugins.
   ```
   <!DOCTYPE html>
   <html>
   <head>
        <script type="text/javascript" charset="utf-8" 
src="resources/jquery.js"></script>
        <script type="text/javascript" src="cordova.js"></script><!--load 
phonegap script -->
        <!--
        Gradle 8.7
        Android Gradle Plugin 8.5.1
        Jetbrains Runtime 17.0.11
        Target version 34
        Using minify/proguard
        -->
        <script>
        $(document).ready(function(){
                        alert('before onDeviceReady');
                        document.addEventListener("deviceready", onDeviceReady, 
false);
                        function onDeviceReady() {
                                alert('onDeviceReady fired.'); //this doesn't 
fire for some devices
                        }
        });
        </script>
   </head>
   <body>
   <p>This is a test of onDeviceReady.</p>
   </body>
   </html>
   ```
   
   
   ### Environment, Platform, Device
   <!-- In what environment, on what platform or on which device are you 
experiencing the issue? -->
   
   Cordova 12.0.0
   Gradle 8.7
   Android Gradle Plugin 8.5.1
   Jetbrains Runtime 17.0.11
   Target version 34
   Using minify/proguard
   
   Testing with browserstack due to reported issues from actual users. Pixel 6 
Pro, Pixel 8, Pixel 5, etc. from Android versions (at least) 11 to 14. My 
device is a Galaxy Tab A7 SM-T500 and everything works fine on it, so it seems 
this issue is either device specific or else it happens after going through 
Google Play Store. (I cannot reproduce the problem in Android Studio so that 
may be the case.)
   * This was not a problem until after I upgraded Android Studio (2021.3.1?), 
Cordova (11.0.0), Java (11), Gradle (7.6), and Gradle Plugin (7.5.1).
   
   ### 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.
   -->
   
   See above.
   Not using Ionic
   Windows 11
   Android Studio Koala 2024.1.1 Patch 1
   
   ## 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.

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

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


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

Reply via email to