<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: How To: Implement HTML5 Storage on a WebView with Android 2.0</title>
	<atom:link href="http://blogs.nitobi.com/joe/2009/11/05/how-to-implement-html5-storage-on-a-webview-with-android-2-0/feed/" rel="self" type="application/rss+xml" />
	<link>http://blogs.nitobi.com/joe/2009/11/05/how-to-implement-html5-storage-on-a-webview-with-android-2-0/</link>
	<description>A blog about what I do during the day</description>
	<lastBuildDate>Thu, 07 Jul 2011 01:00:14 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
	<item>
		<title>By: Aaron</title>
		<link>http://blogs.nitobi.com/joe/2009/11/05/how-to-implement-html5-storage-on-a-webview-with-android-2-0/comment-page-1/#comment-30858</link>
		<dc:creator>Aaron</dc:creator>
		<pubDate>Thu, 07 Jul 2011 01:00:14 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.nitobi.com/joe/?p=117#comment-30858</guid>
		<description>hi Joe:

i have a question that i would like to ask:

can i let the html5 page run in the WebView access my database which was created by the app. 
it&#039;s mean : can i  let the app code and the html page run in the webview share the same database?</description>
		<content:encoded><![CDATA[<p>hi Joe:</p>
<p>i have a question that i would like to ask:</p>
<p>can i let the html5 page run in the WebView access my database which was created by the app.<br />
it&#8217;s mean : can i  let the app code and the html page run in the webview share the same database?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: thomas</title>
		<link>http://blogs.nitobi.com/joe/2009/11/05/how-to-implement-html5-storage-on-a-webview-with-android-2-0/comment-page-1/#comment-27060</link>
		<dc:creator>thomas</dc:creator>
		<pubDate>Wed, 04 May 2011 08:40:03 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.nitobi.com/joe/?p=117#comment-27060</guid>
		<description>Hello,
I have a problem with the local storage for a webview which may 
display an HTML5 app, but the test.html file informs me that local 
storage is&#039;nt supported by my browser... 
Please take a look at my code : 
package com.test.HelloWebView; 
import android.app.Activity; 
import android.content.Context; 
import android.os.Bundle; 
import android.util.Log; 
import android.view.KeyEvent; 
import android.webkit.WebChromeClient; 
import android.webkit.WebSettings; 
import android.webkit.WebStorage; 
import android.webkit.WebView; 
import android.webkit.WebViewClient; 
public class HelloWebView extends Activity { 
WebView webview; 
public void onCreate(Bundle savedInstanceState) { 
super.onCreate(savedInstanceState); 
setContentView(R.layout.main); 
webview = (WebView) findViewById(R.id.webview); 
webview.getSettings().setJavaScriptEnabled(true); 
webview.setWebViewClient(new HelloWebViewClient()); 
webview.loadUrl(&quot;file:///android_asset/test.html&quot;); 
WebSettings settings = webview.getSettings(); 
settings.setJavaScriptEnabled(true); 
settings.setDatabaseEnabled(true); 
String databasePath = 
this.getApplicationContext().getDir(&quot;database&quot;, 
Context.MODE_PRIVATE).getPath(); 
settings.setDatabasePath(databasePath);
webview.setWebChromeClient(new WebChromeClient() { 
public void onExceededDatabaseQuota(String url, String 
databaseIdentifier, long currentQuota, long estimatedSize, 
long totalUsedQuota, WebStorage.QuotaUpdater 
quotaUpdater) { 
quotaUpdater.updateQuota(100000); 
} 
}); 
} 
public boolean onKeyDown(int keyCode, KeyEvent event) { 
if ((keyCode == KeyEvent.KEYCODE_BACK) &amp;&amp; webview.canGoBack()) 
{ 
webview.goBack(); 
return true; 
} 
return super.onKeyDown(keyCode, event); 
} 
private class HelloWebViewClient extends WebViewClient { 
public boolean shouldOverrideUrlLoading(WebView view, String 
url) { 
view.loadUrl(url); 
return true; 
} 
} 
}

Thanks, 
Thomas.</description>
		<content:encoded><![CDATA[<p>Hello,<br />
I have a problem with the local storage for a webview which may<br />
display an HTML5 app, but the test.html file informs me that local<br />
storage is&#8217;nt supported by my browser&#8230;<br />
Please take a look at my code :<br />
package com.test.HelloWebView;<br />
import android.app.Activity;<br />
import android.content.Context;<br />
import android.os.Bundle;<br />
import android.util.Log;<br />
import android.view.KeyEvent;<br />
import android.webkit.WebChromeClient;<br />
import android.webkit.WebSettings;<br />
import android.webkit.WebStorage;<br />
import android.webkit.WebView;<br />
import android.webkit.WebViewClient;<br />
public class HelloWebView extends Activity {<br />
WebView webview;<br />
public void onCreate(Bundle savedInstanceState) {<br />
super.onCreate(savedInstanceState);<br />
setContentView(R.layout.main);<br />
webview = (WebView) findViewById(R.id.webview);<br />
webview.getSettings().setJavaScriptEnabled(true);<br />
webview.setWebViewClient(new HelloWebViewClient());<br />
webview.loadUrl(&#8220;file:///android_asset/test.html&#8221;);<br />
WebSettings settings = webview.getSettings();<br />
settings.setJavaScriptEnabled(true);<br />
settings.setDatabaseEnabled(true);<br />
String databasePath =<br />
this.getApplicationContext().getDir(&#8220;database&#8221;,<br />
Context.MODE_PRIVATE).getPath();<br />
settings.setDatabasePath(databasePath);<br />
webview.setWebChromeClient(new WebChromeClient() {<br />
public void onExceededDatabaseQuota(String url, String<br />
databaseIdentifier, long currentQuota, long estimatedSize,<br />
long totalUsedQuota, WebStorage.QuotaUpdater<br />
quotaUpdater) {<br />
quotaUpdater.updateQuota(100000);<br />
}<br />
});<br />
}<br />
public boolean onKeyDown(int keyCode, KeyEvent event) {<br />
if ((keyCode == KeyEvent.KEYCODE_BACK) &amp;&amp; webview.canGoBack())<br />
{<br />
webview.goBack();<br />
return true;<br />
}<br />
return super.onKeyDown(keyCode, event);<br />
}<br />
private class HelloWebViewClient extends WebViewClient {<br />
public boolean shouldOverrideUrlLoading(WebView view, String<br />
url) {<br />
view.loadUrl(url);<br />
return true;<br />
}<br />
}<br />
}</p>
<p>Thanks,<br />
Thomas.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Agus Haryanto</title>
		<link>http://blogs.nitobi.com/joe/2009/11/05/how-to-implement-html5-storage-on-a-webview-with-android-2-0/comment-page-1/#comment-16436</link>
		<dc:creator>Agus Haryanto</dc:creator>
		<pubDate>Sun, 17 Oct 2010 01:09:24 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.nitobi.com/joe/?p=117#comment-16436</guid>
		<description>Thanks Joe,

It&#039;s Work, and finally i can use html5 database feature on webkit :)</description>
		<content:encoded><![CDATA[<p>Thanks Joe,</p>
<p>It&#8217;s Work, and finally i can use html5 database feature on webkit :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kevin</title>
		<link>http://blogs.nitobi.com/joe/2009/11/05/how-to-implement-html5-storage-on-a-webview-with-android-2-0/comment-page-1/#comment-10884</link>
		<dc:creator>Kevin</dc:creator>
		<pubDate>Tue, 17 Nov 2009 13:36:00 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.nitobi.com/joe/?p=117#comment-10884</guid>
		<description>figured out my problem.  the value for updateQuota must be larger than the size given to openDatabase in javascript.

works like a charm now.</description>
		<content:encoded><![CDATA[<p>figured out my problem.  the value for updateQuota must be larger than the size given to openDatabase in javascript.</p>
<p>works like a charm now.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joe B</title>
		<link>http://blogs.nitobi.com/joe/2009/11/05/how-to-implement-html5-storage-on-a-webview-with-android-2-0/comment-page-1/#comment-10879</link>
		<dc:creator>Joe B</dc:creator>
		<pubDate>Mon, 16 Nov 2009 12:11:07 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.nitobi.com/joe/?p=117#comment-10879</guid>
		<description>Hey

The filename is actually a directory name.  Each site will have its own database, and this will be generated by WebKit.  WebKit just needs to know where to store it.

As far as what you need to import, WebStorage alone should be enough.  Putting a stub of a database in the APK isn&#039;t needed, and will just increase your application size.

If you look at http://github.com/bowserj/phonegap/tree/android_2.0 you can see a working example of this.</description>
		<content:encoded><![CDATA[<p>Hey</p>
<p>The filename is actually a directory name.  Each site will have its own database, and this will be generated by WebKit.  WebKit just needs to know where to store it.</p>
<p>As far as what you need to import, WebStorage alone should be enough.  Putting a stub of a database in the APK isn&#8217;t needed, and will just increase your application size.</p>
<p>If you look at <a href="http://github.com/bowserj/phonegap/tree/android_2.0" rel="nofollow">http://github.com/bowserj/phonegap/tree/android_2.0</a> you can see a working example of this.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kevin</title>
		<link>http://blogs.nitobi.com/joe/2009/11/05/how-to-implement-html5-storage-on-a-webview-with-android-2-0/comment-page-1/#comment-10853</link>
		<dc:creator>Kevin</dc:creator>
		<pubDate>Fri, 13 Nov 2009 09:25:02 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.nitobi.com/joe/?p=117#comment-10853</guid>
		<description>hi Joe.  I&#039;ve been trying to figure this out myself and can&#039;t seem to make it happen.

I believe I&#039;m just not getting the location right.  I get the &quot;/data/data/package_name&quot; part, but unsure about the file name part.

first, does the filename have any correlation to the name of the database in the HTML?  (i.e. do they both have to be the same or is it irrelevant)

and do I need to include a stub of a database in my apk?

last what methods do I need to import?  is android.webkit.WebStorage and android.webkit.WebStorage.QuotaUpdater enough?</description>
		<content:encoded><![CDATA[<p>hi Joe.  I&#8217;ve been trying to figure this out myself and can&#8217;t seem to make it happen.</p>
<p>I believe I&#8217;m just not getting the location right.  I get the &#8220;/data/data/package_name&#8221; part, but unsure about the file name part.</p>
<p>first, does the filename have any correlation to the name of the database in the HTML?  (i.e. do they both have to be the same or is it irrelevant)</p>
<p>and do I need to include a stub of a database in my apk?</p>
<p>last what methods do I need to import?  is android.webkit.WebStorage and android.webkit.WebStorage.QuotaUpdater enough?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joe@Nitobi &#187; Blog Archive &#187; Where Data Lives on Android</title>
		<link>http://blogs.nitobi.com/joe/2009/11/05/how-to-implement-html5-storage-on-a-webview-with-android-2-0/comment-page-1/#comment-10827</link>
		<dc:creator>Joe@Nitobi &#187; Blog Archive &#187; Where Data Lives on Android</dc:creator>
		<pubDate>Mon, 09 Nov 2009 14:52:12 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.nitobi.com/joe/?p=117#comment-10827</guid>
		<description>[...] Blogs       Joe Bowser&#8217;s Blog RSS   &#171; How To: Implement HTML5 Storage on a WebView with Android 2.0 [...]</description>
		<content:encoded><![CDATA[<p>[...] Blogs       Joe Bowser&#8217;s Blog RSS   &laquo; How To: Implement HTML5 Storage on a WebView with Android 2.0 [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>

