Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8859499
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T15:04:40+00:00 2026-06-14T15:04:40+00:00

I created an application with the create.bat on windows and compiled it with ADT

  • 0

I created an application with the create.bat on windows and compiled it with ADT and the latest SDK.

It launches and displays the cordova display but it doesnt fire the deviceready event as it keeps saying “connecting to device”. The same applies for the emulator. It works when I change the OS to 4.0 for the emulator though.

Is this normal because 4.2 has just been released and I have to wait for an update ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T15:04:41+00:00Added an answer on June 14, 2026 at 3:04 pm

    It’s 1 am and I finally have my app running again. Android 4.2 includes some apparently security related changes to webView.addJavascriptInterface, which stops the default bridge mode from working.

    I expect there will be a better fix in the next version, but if you need a quick fix, try this update to CordovaWebView.exposeJsInterface

    private void exposeJsInterface() {
        int SDK_INT = Build.VERSION.SDK_INT;
        boolean isHoneycomb = (SDK_INT >= Build.VERSION_CODES.HONEYCOMB && SDK_INT <= Build.VERSION_CODES.HONEYCOMB_MR2);
        if (isHoneycomb || (SDK_INT < Build.VERSION_CODES.GINGERBREAD)) {
            Log.i(TAG, "Disabled addJavascriptInterface() bridge since Android version is old.");
            // Bug being that Java Strings do not get converted to JS strings automatically.
            // This isn't hard to work-around on the JS side, but it's easier to just
            // use the prompt bridge instead.
            return;            
        } else if (SDK_INT < Build.VERSION_CODES.HONEYCOMB && Build.MANUFACTURER.equals("unknown")) {
            // addJavascriptInterface crashes on the 2.3 emulator.
            Log.i(TAG, "Disabled addJavascriptInterface() bridge callback due to a bug on the 2.3 emulator");
            return;
    
        } else if (SDK_INT == Build.VERSION_CODES.JELLY_BEAN_MR1) {            
            Log.i(TAG, "Disabled addJavascriptInterface() bridge callback for 4.2");
            return;
    
    
        }
        this.addJavascriptInterface(exposedJsApi, "_cordovaNative");
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to create a basic application, i created facebook application before but everything
I need to create a BAT file to run an application through telnet, but
I have created an application server side that will create a pdf of a
I created an application , which Users can create a Topic and other can
I would like to create a photo/video capture application. I have created a CaptureView
I want to create application which would display spatial data on Map. I'm thinking
I've created a Java application in Eclipse JavaEE on Windows (yay for me!!) and
In my CakePHP application, By using cake.bat i created POT files and by using
I created a setup project to install my application (*.bat file) and successfully installed
I have successfully created exe file using NSIS.I have installed my application as windows

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.