WebView on Android ICS, iframe problems with android_assets

Sirs, I had the same problem when using Phonegap (Apache Cordova) and IFrames in Android Ice Cream Sandwich (4.0.3). To solve this problem, I had to edit Apache Cordova Source Code. I changed the org.apache.cordova.CordovaWebViewClient.java file, and commented this part of the code, and included the last line (return false;). So it now looks like … Read more

Loading existing .html file with android WebView

ok, that was my very stupid mistake. I post the answer here just in case someone has the same problem. The correct path for files stored in assets folder is file:///android_asset/* (with no “s” for assets folder which i was always thinking it must have a “s”). And, mWebView.loadUrl(“file:///android_asset/myfile.html”); works under all API levels. I … Read more

Play audio file from the assets directory

player.setDataSource(afd.getFileDescriptor(),afd.getStartOffset(),afd.getLength()); Your version would work if you had only one file in the assets directory. The asset directory contents are not actually ‘real files’ on disk. All of them are put together one after another. So, if you do not specify where to start and how many bytes to read, the player will read up … Read more