Skip to content Skip to sidebar Skip to footer

Table Not Found When Coming Back From In App Browser Link: Phonegap

I am developing a phone-gap application for android, save database with .db extension in assets folder , on java file of application i did copy database to my application database

Solution 1:

my problem solved by using _system at the target value.

window.open(url, target, options);

  • url: the URL to load (String). Call encodeURI() on this if you have Unicode characters in your URL.
  • target: the target to load the URL in (String) (Optional, Default: "_self")
  • options: options for the InAppBrowser (String) (Optional, Default: "location=yes")

target values:

_self - opens in the Cordova WebView if url isin the white-list, else it opens in the InAppBrowser
_blank - always openin the InAppBrowser
_system - always openin the system web browser

Solution 2:

Due to my need to create an inAppBrowser using target= "_blank" and returning using a Database connection, I decided to investigate deeply and I found a "fix" that works for me.

In source file (in my case is Android (InAppBrowser.java)) I just comment those lines being the result like this:

if (enableDatabase) {
    //String databasePath = cordova.getActivity().getApplicationContext().getDir("inAppBrowserDB", Context.MODE_PRIVATE).getPath();
    //settings.setDatabasePath(databasePath);
      settings.setDatabaseEnabled(true);
                }

Post a Comment for "Table Not Found When Coming Back From In App Browser Link: Phonegap"