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

  • SEARCH
  • Home
  • 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 8052101
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T07:27:51+00:00 2026-06-05T07:27:51+00:00

I’m having some problems with android webview, SQLite and my target device. On a

  • 0

I’m having some problems with android webview, SQLite and my target device. On a physical device, the database is not accessible(see errors at the end).

The setup of the webview:

    settings.setJavaScriptEnabled(true);
    settings.setDatabaseEnabled(true);
    settings.setDatabasePath("/data/data/de.sqlite.webview/databases"); 

I’m defining the webview in the onCreate method, and setting the update quota twice as high as estimated or bigger than in the HTML5 definition.

mWebView.setWebChromeClient(new WebChromeClient() {
    @Override
    public void onExceededDatabaseQuota(String url, String databaseIdentifier, long currentQuota, long estimatedSize, long totalUsedQuota, WebStorage.QuotaUpdater quotaUpdater)
    {
            quotaUpdater.updateQuota(204801); //estimatedSize * 2
    }
}); 


    mWebView.setWebViewClient(new WebViewClient() {                 
    @Override
    public boolean shouldOverrideUrlLoading( ... ) 
    }

On the Emulator and on Chrome everything works fine, but if I deploy the app to my galaxys2 I’m getting an error: openDatabase is not defined.

The following html-code works in chrome and in the emulated webview:

    db = new HKSQL();
    db.openSQL();
    today = getTodayDate();
    createDbTable_LastLogin();

    //HKSQL Class 
    function HkSQL(){
    this.query;
    this.result;
    this.database;
    }

    HkSQL.prototype.openSQL = function(){
    this.database = openDatabase("hkapp","1.0","HKApp","65536");    
    } 

    //an example query to create my db
    CREATE TABLE IF NOT EXISTS HK_lastlogin (id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, datum TEXT NOT NULL)

I have no clue why it doesn’t work on my device. I thought about read and write permissions, but the .db file is already created.
Here are some error messages which, I think, target to the same problem:

Uncaught ReferenceError: openDatabase is not defined 
Uncaught TypeError: Object [object DOMWindow] has no method 'openDatabase'
  • 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-05T07:27:51+00:00Added an answer on June 5, 2026 at 7:27 am

    The answer was that both Webviews need to initialized as WebChromeClients with full features.

    myWebView = (WebView) findViewById(R.id.l_webview);
    
    myWebView.setWebViewClient(new WebViewClient() {  });
    myWebView.setWebChromeClient(new WebChromeClient() { ... } );
    
    
    myWebView2 = (WebView) findViewById(R.id.l_navi);
    
    myWebView2.setWebViewClient(new WebViewClient() {        });
    myWebView2.setWebChromeClient(new WebChromeClient() { ... } );
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build
I need a function that will clean a strings' special characters. I do NOT
I have a reasonable size flat file database of text documents mostly saved in
I'm having trouble keeping the paragraph square between the quote marks. In firefox the
Is it possible to replace javascript w/ HTML if JavaScript is not enabled on

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.