<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>catchingtales</title>
	<atom:link href="http://www.catchingtales.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.catchingtales.com</link>
	<description>ideas going mobile</description>
	<lastBuildDate>Sun, 16 Sep 2012 14:18:57 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4.2</generator>
		<item>
		<title>Android WebView shouldOverrideUrlLoading and redirect</title>
		<link>http://www.catchingtales.com/android-webview-shouldoverrideurlloading-and-redirect/416/</link>
		<comments>http://www.catchingtales.com/android-webview-shouldoverrideurlloading-and-redirect/416/#comments</comments>
		<pubDate>Sun, 16 Sep 2012 14:15:45 +0000</pubDate>
		<dc:creator>joachim</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Development]]></category>

		<guid isPermaLink="false">http://www.catchingtales.com/?p=416</guid>
		<description><![CDATA[Androids WebView class provides a method called shouldOverrideUrlLoading to intercept the loading of the requested URLs. This gives us the ability to suppress loading of the given URL or handle a URL in the external browser for example. If you want to prevent the webview from loading the URL you have to return true. Otherwise [...]]]></description>
			<content:encoded><![CDATA[<p>Androids WebView class provides a method called shouldOverrideUrlLoading to intercept the loading of the requested URLs.<br />
This gives us the ability to suppress loading of the given URL or handle a URL in the external browser for example.</p>
<p>If you want to prevent the webview from loading the URL you have to return true. Otherwise the url is forwarded to the webview as usual. </p>
<pre name="code" class="java">
_webView.setWebViewClient(new WebViewClient() {
  @Override
  public boolean shouldOverrideUrlLoading(WebView view, String url) {
    boolean shouldOverride = false;
    if (url.startsWith("https://")) { //NON-NLS
      // DO SOMETHING
      shouldOverride = true;
    }
    return shouldOverride;
  }
}
</pre>
<p>This mechanism works fine for all URLs triggered by a user tapping on a link. </p>
<h3>Issue &#8211; does not work on all devices</h3>
<p>Unfortunately this method does not get invoked if the URLs source is a redirect on devices running Android < 3.0 (API Level 10 and lower).<br />
Although it will be invoked an works just fine on devices with Android >=  3.0 (API Level 11 and up).</p>
<p><span class="highlight ">Android < 3.0 -> shouldOverrideUrlLoading will <strong>not</strong> be called on redirects</span></p>
<p><span class="highlight ">Android >= 3.0 -> shouldOverrideUrlLoading will be called even on redirects</span></p>
<p>You can <a href="http://www.google.com/#q=redirect+shouldOverrideUrlLoading&#038;fp=1" rel="nofollow">find</a> some fellow developers facing the same issue. </p>
<h3>Workaround &#8211; onPageStarted</h3>
<p>As a Workaround we use the recommended <code>onPageStarted(WebView view, String url, Bitmap favicon)</code></p>
<p>Usage is quite the same as shouldOverrideUrlLoading:</p>
<pre name="code" class="java">
_webView.setWebViewClient(new WebViewClient() {
  @Override
  public void onPageStarted(WebView view, String url, Bitmap favicon){
    if (url.startsWith("https://")) { //NON-NLS
      view.stopLoading();
      // DO SOMETHING
    }
  }
} 
</pre>
<p>With <code>view.stopLoading</code> the webview will stop loading of the new URL and still show the current content. This equals the behavior of shouldOverrideUrlLoading returning true.</p>
<p>The advantage is it works on all Android versions.</p>
<p>However the drawback is onPageStarted is invoked <strong>AFTER</strong> the page was requested form server. That means, the request is already sent to the server even if the response is afterward ignored.</p>
<p>The method shouldOverrideUrlLoading would let you omit the request <strong>BEFORE</strong> it is sent. So you would be able to save the outgoing web request.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.catchingtales.com/android-webview-shouldoverrideurlloading-and-redirect/416/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Proguard and the @Subscribe Annotation used by Guava EventBus</title>
		<link>http://www.catchingtales.com/proguard-and-the-subscribe-annotation-used-by-guava-eventbus/404/</link>
		<comments>http://www.catchingtales.com/proguard-and-the-subscribe-annotation-used-by-guava-eventbus/404/#comments</comments>
		<pubDate>Thu, 13 Sep 2012 14:52:04 +0000</pubDate>
		<dc:creator>philip</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Development]]></category>

		<guid isPermaLink="false">http://www.catchingtales.com/?p=404</guid>
		<description><![CDATA[We recently stumbled over an issue regarding the usage of com.google.common.eventbus.EventBus from the Google Guava Libraries and the default processing Proguard applies to your bytecode. The EventBus provides an easy to use observer implementation for app internal messaging without the need to explicitly register event handler methods. Instead of providing an interface Guavas EventBus identifies [...]]]></description>
			<content:encoded><![CDATA[<p>We recently stumbled over an issue regarding the usage of com.google.common.eventbus.EventBus from the Google Guava Libraries and the default processing Proguard applies to your bytecode.</p>
<p>The EventBus provides an easy to use observer implementation for app internal messaging without the need to explicitly register event handler methods. Instead of providing an interface Guavas EventBus identifies the appropriate methods via an @Subscribe annotation.</p>
<pre name="code" class="java">@Subscribe
public void onEvent(MyEvent event) {
}
</pre>
<p>As part of Proguards shrinking and obfuscation process all annotations are removed by default and method names are obfuscated. The event handling methods can no longer be identified by the EventBus at runtime. So events sent to the EventBus will no longer be dispatched.</p>
<p>Following lines have to be addd to the proguard.cfg file to fix that </p>
<pre name="code" class="java">-keepattributes *Annotation*

-keepclassmembers class * {
       public void *(MyEvent);
}</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.catchingtales.com/proguard-and-the-subscribe-annotation-used-by-guava-eventbus/404/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Browser Fairy review on apfelklatsch.de</title>
		<link>http://www.catchingtales.com/browser-fairy-review-on-apfelklatsch-de/380/</link>
		<comments>http://www.catchingtales.com/browser-fairy-review-on-apfelklatsch-de/380/#comments</comments>
		<pubDate>Wed, 04 Jan 2012 21:02:28 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.catchingtales.com/?p=380</guid>
		<description><![CDATA[The guys of apfelklatsch.de &#8211; a german podcast &#8211; introduced Browser Fairy in one of their recent episodes. Check it out on apfelklatsch.de and don&#8217;t miss all the other episodes &#8211; this podcast is very informative and entertaining as well!]]></description>
			<content:encoded><![CDATA[<p>The guys of apfelklatsch.de &#8211; a german podcast &#8211; introduced Browser Fairy in one of their recent episodes. Check it out on <a href="http://apfelklatsch.de/ak013/">apfelklatsch.de</a> and don&#8217;t miss all the other episodes &#8211; this podcast is very informative and entertaining as well!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.catchingtales.com/browser-fairy-review-on-apfelklatsch-de/380/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Browser Fairy review on macgeneration.com</title>
		<link>http://www.catchingtales.com/browser-fairy-review-on-macgeneration-com/367/</link>
		<comments>http://www.catchingtales.com/browser-fairy-review-on-macgeneration-com/367/#comments</comments>
		<pubDate>Wed, 04 Jan 2012 20:31:42 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.catchingtales.com/?p=367</guid>
		<description><![CDATA[Nicolas Furno published a review of Browser Fairy: &#8220;Browser Fairy : gérer facilement plusieurs navigateurs&#8221;. As you can tell by the title it&#8217;s written in french. Check it out on www.macgeneration.com. @Nicolas: Merci beaucoup &#8211; we appreciate it!!!]]></description>
			<content:encoded><![CDATA[<p>Nicolas Furno published a review of Browser Fairy: <em>&#8220;Browser Fairy : gérer facilement plusieurs navigateurs&#8221;</em>.  As you can tell by the title it&#8217;s written in french. Check it out on <a href="http://www.macgeneration.com/news/voir/228892/browser-fairy-gerer-facilement-plusieurs-navigateurs">www.macgeneration.com</a>.</p>
<p>@Nicolas: Merci beaucoup &#8211; we appreciate it!!!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.catchingtales.com/browser-fairy-review-on-macgeneration-com/367/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Announcing our first Mac OS X App – Browser Fairy!</title>
		<link>http://www.catchingtales.com/announcing-our-first-app-%e2%80%93-browser-fairy/247/</link>
		<comments>http://www.catchingtales.com/announcing-our-first-app-%e2%80%93-browser-fairy/247/#comments</comments>
		<pubDate>Tue, 13 Dec 2011 17:25:25 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.catchingtales.com/?p=247</guid>
		<description><![CDATA[We proudly present our first App for Mac OS X. Get started here: Browser Fairy]]></description>
			<content:encoded><![CDATA[<p>We proudly present our first App for Mac OS X. </p>
<p>Get started here: <a href="http://www.catchingtales.com/osx/browserfairy/">Browser Fairy</a>  </p>
]]></content:encoded>
			<wfw:commentRss>http://www.catchingtales.com/announcing-our-first-app-%e2%80%93-browser-fairy/247/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Yeah, yeah, finally catchingtales hit the web</title>
		<link>http://www.catchingtales.com/catching-tales-hit-the-web/249/</link>
		<comments>http://www.catchingtales.com/catching-tales-hit-the-web/249/#comments</comments>
		<pubDate>Tue, 13 Dec 2011 17:12:18 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.catchingtales.com/?p=249</guid>
		<description><![CDATA[We&#8217;ve been around for more then a year building apps for iOS and Android. Finally our site made it too! And there is more to come&#8230; Enjoy, Jo &#038; Philip]]></description>
			<content:encoded><![CDATA[<p>We&#8217;ve been around for more then a year building apps for iOS and Android.<br />
Finally our site made it too! And there is more to come&#8230;</p>
<p>Enjoy,<br />
Jo &#038; Philip</p>
<p><a href="http://www.catchingtales.com/wp-content/uploads/2011/06/android_devs.png" rel="prettyPhoto[name]" title=""><img src="http://www.catchingtales.com/wp-content/uploads/2011/06/android_devs-150x150.png" alt="" title="android_devs" width="150" height="150" class="alignleft size-thumbnail wp-image-102" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.catchingtales.com/catching-tales-hit-the-web/249/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
