<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Android on Piotr Wittchen</title>
    <link>https://wittchen.io/tags/android/</link>
    <description>Recent content in Android on Piotr Wittchen</description>
    <generator>Hugo -- 0.156.0</generator>
    <language>en</language>
    <lastBuildDate>Tue, 02 Oct 2018 00:01:31 +0000</lastBuildDate>
    <atom:link href="https://wittchen.io/tags/android/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Creating a fat AAR</title>
      <link>https://wittchen.io/notes/creating-fat-aar/</link>
      <pubDate>Tue, 02 Oct 2018 00:01:31 +0000</pubDate>
      <guid>https://wittchen.io/notes/creating-fat-aar/</guid>
      <description>&lt;p&gt;I recently wrote a new library called &lt;a href=&#34;https://github.com/pwittchen/neurosky-android-sdk&#34;&gt;NeuroSky Android SDK&lt;/a&gt;. It&amp;rsquo;s used for writing Android apps using signals of the brain waves received from the NeuroSky MindWave Mobile headsets. Probably I&amp;rsquo;ll write a separate article about it because it&amp;rsquo;s quite interesting topic. This library uses ThinkGear library, which is distributed by the NeuroSky as a &lt;code&gt;*.jar&lt;/code&gt; file, so I couldn&amp;rsquo;t use it as a Gradle or Maven dependency in my project and I had to put this &lt;code&gt;*.jar&lt;/code&gt; file into the &lt;code&gt;lib&lt;/code&gt; directory and link it in the &lt;code&gt;build.gradle&lt;/code&gt; file. Moreover, I wanted to create a library, which can be added to the project as a single Gradle dependency without messing around with additional &lt;code&gt;*.jar&lt;/code&gt; files or custom configuration. Due to this fact, I decided to create a fat &lt;code&gt;*.aar&lt;/code&gt; file and deploy it to the Maven Central repository. For those who are not familar with Android, &lt;code&gt;*.aar&lt;/code&gt; is an Android version or &lt;code&gt;*.jar&lt;/code&gt; file, which can be used as library in the project. I didn&amp;rsquo;t want to reinvent the wheel, so I searched for the different solutions. Unfortunatey, a few of them didn&amp;rsquo;t work, but luckilly I&amp;rsquo;ve found what I wanted. It&amp;rsquo;s &lt;a href=&#34;https://github.com/Mobbeel/fataar-gradle-plugin&#34;&gt;fat AAR Gradle Plugin&lt;/a&gt; developed by &lt;a href=&#34;https://github.com/Mobbeel&#34;&gt;Mobbeel&lt;/a&gt; company.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Writing my first library in Kotlin</title>
      <link>https://wittchen.io/notes/writing-my-first-library-in-kotlin/</link>
      <pubDate>Sun, 19 Aug 2018 10:24:19 +0000</pubDate>
      <guid>https://wittchen.io/notes/writing-my-first-library-in-kotlin/</guid>
      <description>&lt;h2 id=&#34;introduction&#34;&gt;Introduction&lt;/h2&gt;
&lt;p&gt;Recently, I decided to create a tiny Android library called &lt;a href=&#34;https://github.com/pwittchen/RxBattery&#34;&gt;RxBattery&lt;/a&gt;, which is monitoring battery state of the device with RxJava and RxKotlin. I created a few Java and Android libraries already and this time I decided to use &lt;a href=&#34;https://kotlinlang.org/&#34;&gt;Kotlin&lt;/a&gt; programming language instead of Java to learn something new and write something more complicated than &amp;ldquo;Hello World&amp;rdquo; app. Here are my observations.&lt;/p&gt;
&lt;h2 id=&#34;build-system&#34;&gt;Build System&lt;/h2&gt;
&lt;p&gt;I used &lt;a href=&#34;https://gradle.org/&#34;&gt;Gradle&lt;/a&gt; to build the project. It&amp;rsquo;s popular for JVM and Android apps nowadays and works fine with Kotlin. I just needed to add Kotlin Gradle Plugin and Kotlin STD Lib to the &lt;code&gt;/library/build.gradle&lt;/code&gt; file to the &lt;code&gt;classpath&lt;/code&gt; dependencies in &lt;code&gt;buildscript&lt;/code&gt; section. I also needed to define &lt;code&gt;sourceSets&lt;/code&gt; to allow IntelliJ and Android Studio recognize directories with sources.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Solving problems with AVD and KVM on Linux</title>
      <link>https://wittchen.io/notes/solving-problems-with-avd-and-kvm-on-linux/</link>
      <pubDate>Thu, 16 Aug 2018 22:01:06 +0000</pubDate>
      <guid>https://wittchen.io/notes/solving-problems-with-avd-and-kvm-on-linux/</guid>
      <description>&lt;p&gt;I installed Android SDK and Android Studio on my new ThinkPad T470s with Ubuntu Linux 18.04.1 LTS. As usual, I wanted to create a new Android phone emulator called AVD (Android Virtual Device). I was able to create a new device, but unfortunately I encoutered problems. After opening AVD window, I saw the error message&amp;hellip;&lt;/p&gt;
&lt;h2 id=&#34;devkvm-is-not-found&#34;&gt;/dev/kvm is not found&lt;/h2&gt;
&lt;p&gt;KVM (Kernel-based Virtual Machine) is a full virtualization solution for Linux on x86 hardware containing virtualization extensions (Intel VT or AMD-V). In order to enable KVM, I needed to restart the computer and enter the BIOS by pressing &lt;code&gt;F1&lt;/code&gt; key before the system boot. Next, I entered &lt;code&gt;Security&lt;/code&gt; tab and enabled &lt;code&gt;Intel Virtualization Technology&lt;/code&gt; and &lt;code&gt;Intel VT-d Feature&lt;/code&gt;. Now, I could press &lt;code&gt;F10&lt;/code&gt; to save, exit nad restart the computer. Unfortunately, that wasn&amp;rsquo;t the end of the story. I saw another error message&amp;hellip;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Releasing ReactiveNetwork v. 1.0.0 (paying the technical debt)</title>
      <link>https://wittchen.io/notes/releasing-reactive-network-1/</link>
      <pubDate>Sun, 24 Jun 2018 23:39:18 +0000</pubDate>
      <guid>https://wittchen.io/notes/releasing-reactive-network-1/</guid>
      <description>&lt;p&gt;Today, I&amp;rsquo;ve released next version of my most popular open-source project - &lt;a href=&#34;https://github.com/pwittchen/ReactiveNetwork&#34;&gt;ReactiveNetwork&lt;/a&gt;. I&amp;rsquo;ve released version &lt;code&gt;0.12.4&lt;/code&gt; for RxJava1.x and version &lt;code&gt;1.0.0&lt;/code&gt; for RxJava2.x. Please note, RxJava1.x is &lt;a href=&#34;https://github.com/ReactiveX/RxJava/releases/tag/v1.3.8&#34;&gt;no longer officially supported&lt;/a&gt; and I&amp;rsquo;m going to follow the same approach in my RxJava-based projects. It&amp;rsquo;s not the first release of this project, but I&amp;rsquo;m breaking the API and removing existing methods, so I decided to stick to proper versioning standard. I didn&amp;rsquo;t always do it properly in the past, but it&amp;rsquo;s never too late.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Debugging Google Pixel 2</title>
      <link>https://wittchen.io/notes/debugging-pixel2/</link>
      <pubDate>Wed, 20 Jun 2018 23:05:56 +0000</pubDate>
      <guid>https://wittchen.io/notes/debugging-pixel2/</guid>
      <description>&lt;p&gt;I recently destroyed my good old Nexus 6 phone. It&amp;rsquo;s still working, but display screen is broken. Due to this fact, I&amp;rsquo;ve had an excuse to buy new Pixel 2 phone. It&amp;rsquo;s pretty expansive, but its quality is really good. As usual, I wanted to debug an app on this device and encountered problem related to device permissions.&lt;/p&gt;
&lt;p&gt;Once I connected the phone, to my laptop and typed &lt;code&gt;adb devices&lt;/code&gt;, I&amp;rsquo;ve seen the following message:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Introducing ReactiveBus</title>
      <link>https://wittchen.io/notes/introducing-reactive-bus/</link>
      <pubDate>Sun, 11 Mar 2018 20:02:45 +0000</pubDate>
      <guid>https://wittchen.io/notes/introducing-reactive-bus/</guid>
      <description>&lt;p&gt;Today, I&amp;rsquo;ve released my another tiny project. It&amp;rsquo;s a very simple implementation of Event Bus with RxJava 2 under the hood. This library is compatible with Java 1.7 or higher. I didn&amp;rsquo;t use Java 1.8 or 1.9 because I wanted to make it compatible with Android apps.&lt;/p&gt;
&lt;p&gt;You can use it as follows:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-java&#34; data-lang=&#34;java&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;Bus&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;bus&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;ReactiveBus&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;na&#34;&gt;create&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;();&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;Disposable&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;observer&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;bus&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;na&#34;&gt;receive&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;().&lt;/span&gt;&lt;span class=&#34;na&#34;&gt;subscribe&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;new&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Consumer&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Event&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;    &lt;/span&gt;&lt;span class=&#34;nd&#34;&gt;@Override&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;kd&#34;&gt;public&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;kt&#34;&gt;void&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nf&#34;&gt;accept&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Event&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;event&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;      &lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;// handle event here&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;    &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;  &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;});&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Once, we created Event Bus object and our observer (or more precisely: disposable subscriber), we can start sending events:&lt;/p&gt;</description>
    </item>
    <item>
      <title>DroidCon Poland 2017 - Is your app really connected?</title>
      <link>https://wittchen.io/notes/droidcon-poland-2017-is-your-app-really-connected/</link>
      <pubDate>Sat, 02 Dec 2017 01:39:00 +0000</pubDate>
      <guid>https://wittchen.io/notes/droidcon-poland-2017-is-your-app-really-connected/</guid>
      <description>&lt;p&gt;Yesterday, I gave a presentation about connectivity in the Android apps during the &lt;a href=&#34;http://droidcon.pl&#34;&gt;DroidCon Poland 2017&lt;/a&gt; Conference in Kraków.&lt;/p&gt;
&lt;p&gt;Below, you can see slides from this presentation.&lt;/p&gt;


&lt;script async class=&#34;speakerdeck-embed&#34; data-id=&#34;2a3a400c94c1497d8a2343e269c7d1ce&#34; data-ratio=&#34;1.77777777777778&#34; src=&#34;http://speakerdeck.com/assets/embed.js&#34;&gt;&lt;/script&gt;


&lt;p&gt;&lt;a href=&#34;https://speakerdeck.com/pwittchen/is-your-app-really-connected-1&#34;&gt;View slides on SpeakerDeck&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;There&amp;rsquo;s also tweet related to this presentation from &lt;a href=&#34;https://twitter.com/droidconkr&#34;&gt;DroidCon Kraków&lt;/a&gt;:&lt;/p&gt;


&lt;blockquote class=&#34;twitter-tweet&#34; data-lang=&#34;en&#34;&gt;&lt;p lang=&#34;en&#34; dir=&#34;ltr&#34;&gt;Piotr Wittchen tells us about how we can we keep the track of network &amp;#x1f30e; or Internet connectivity changes in our app &amp;#x1f4f1;&amp;#x1f198;&amp;#x1f642; &lt;a href=&#34;https://t.co/7YGGzNJeb2&#34;&gt;pic.twitter.com/7YGGzNJeb2&lt;/a&gt;&lt;/p&gt;&amp;mdash; droidcon Kraków (@droidconkr) &lt;a href=&#34;https://twitter.com/droidconkr/status/936889529566347265?ref_src=twsrc%5Etfw&#34;&gt;December 2, 2017&lt;/a&gt;&lt;/blockquote&gt;
&lt;script async src=&#34;https://platform.twitter.com/widgets.js&#34; charset=&#34;utf-8&#34;&gt;&lt;/script&gt;


&lt;p&gt;I hope, you enjoyed it. Any kind of feedback is welcome (in the comments below this article or via e-mail). Don&amp;rsquo;t forget to check &lt;a href=&#34;https://github.com/pwittchen/ReactiveNetwork&#34;&gt;ReactiveNetwork&lt;/a&gt; library I mentioned during the presentation.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Simple reactive HTTP client and server with RxJava, Vert.x and Android</title>
      <link>https://wittchen.io/notes/simple-reactive-http-client-and-server-with-rxjava-vertx-and-android/</link>
      <pubDate>Thu, 09 Nov 2017 22:30:00 +0000</pubDate>
      <guid>https://wittchen.io/notes/simple-reactive-http-client-and-server-with-rxjava-vertx-and-android/</guid>
      <description>&lt;p&gt;During &lt;a href=&#34;https://www.facebook.com/Hack.your.Career/&#34;&gt;Hack Your Career&lt;/a&gt; event at the Silesian University of Technology, I&amp;rsquo;ve prepared a presentation titled &lt;a href=&#34;https://speakerdeck.com/pwittchen/reactive-programming-efficient-server-applications&#34;&gt;Reactive Programming - Efficient Server Applications&lt;/a&gt; with a colleague from work. Arek told about theory of Reactive Programming, shown basic concepts, data types and a few examples in the code. During my part of the presentation, I&amp;rsquo;ve wrote a very simple server and client in Java (9 on the server, 7 on the client) with &lt;a href=&#34;http://vertx.io/&#34;&gt;Vert.x&lt;/a&gt; (&lt;a href=&#34;http://vertx.io/docs/vertx-core/java/&#34;&gt;Core&lt;/a&gt; and &lt;a href=&#34;http://vertx.io/docs/vertx-rx/java2/&#34;&gt;Rx&lt;/a&gt;), &lt;a href=&#34;https://github.com/ReactiveX/RxJava&#34;&gt;RxJava 2&lt;/a&gt;, &lt;a href=&#34;https://github.com/square/okhttp&#34;&gt;OkHttp 3&lt;/a&gt;, &lt;a href=&#34;https://www.android.com/&#34;&gt;Android&lt;/a&gt; and &lt;a href=&#34;https://github.com/ReactiveX/RxAndroid/&#34;&gt;RxAndroid&lt;/a&gt;. Presentation was targeted mainly to the university students with no experience with reactive programming, but it was an open event and anyone could attend it. Below, we can see a very simple code snippet showing how to create a reactive HTTP server with Vert.x. We can create a stream of requests, make &lt;code&gt;Flowable&lt;/code&gt; out of it, apply any kind of RxJava 2 operator including backpressure handling and subscribe the stream. Moreover, we can also reactively start the server with &lt;code&gt;rxListen(int port)&lt;/code&gt; method. This is just a basic example, where will be sending request to the only one endpoint. In the case, when we want to handle more endpoints, we can use &lt;a href=&#34;http://vertx.io/docs/vertx-web/java/&#34;&gt;vertx-web&lt;/a&gt; library and design REST API.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Integrating ErrorProne and NullAway with an Android project</title>
      <link>https://wittchen.io/notes/integrating-nullaway-with-an-android-project/</link>
      <pubDate>Fri, 15 Sep 2017 18:39:00 +0000</pubDate>
      <guid>https://wittchen.io/notes/integrating-nullaway-with-an-android-project/</guid>
      <description>&lt;p&gt;Recently, with the &lt;a href=&#34;https://github.com/pwittchen/ReactiveNetwork/pull/226&#34;&gt;remote help of guys from Uber in California&lt;/a&gt;, I integrated &lt;a href=&#34;https://github.com/uber/NullAway/&#34;&gt;NullAway&lt;/a&gt; and &lt;a href=&#34;https://github.com/google/error-prone&#34;&gt;ErrorProne&lt;/a&gt; with the &lt;a href=&#34;https://github.com/pwittchen/ReactiveNetwork&#34;&gt;one of my open-source Android projects&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;what-is-nullaway&#34;&gt;What is NullAway?&lt;/h2&gt;
&lt;p&gt;Basically, it&amp;rsquo;s &lt;em&gt;a tool to help eliminate NullPointerExceptions (NPEs) in your Java code&lt;/em&gt;. It detects situations where NPE could occur at the compile time. Let&amp;rsquo;s have a look at the following code:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-java&#34; data-lang=&#34;java&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kd&#34;&gt;static&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;kt&#34;&gt;void&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nf&#34;&gt;log&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Object&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;x&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;    &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;System&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;na&#34;&gt;out&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;na&#34;&gt;println&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;x&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;na&#34;&gt;toString&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;());&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kd&#34;&gt;static&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;kt&#34;&gt;void&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nf&#34;&gt;foo&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;    &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;log&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;kc&#34;&gt;null&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;NullAway will find out that we&amp;rsquo;re passing &lt;code&gt;null&lt;/code&gt; and we&amp;rsquo;ll get appropriate error message:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Introducing ReactiveAirplaneMode</title>
      <link>https://wittchen.io/notes/introducing-reactive-airplane-mode/</link>
      <pubDate>Tue, 15 Aug 2017 19:28:00 +0000</pubDate>
      <guid>https://wittchen.io/notes/introducing-reactive-airplane-mode/</guid>
      <description>&lt;p&gt;I&amp;rsquo;m continuing &lt;em&gt;Rxfication&lt;/em&gt; of the Android. Recently I released brand new library called &lt;a href=&#34;https://github.com/pwittchen/ReactiveAirplaneMode&#34;&gt;&lt;strong&gt;ReactiveAirplaneMode&lt;/strong&gt;&lt;/a&gt;. As you may guess, it allows listening Airplane mode on Android device with RxJava observables. A usual I&amp;rsquo;ve hidden all implementation details, BroadcastReceivers and rest of the Android related stuff behind RxJava abstraction layer, so API is really simple. Just take a look on that:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-java&#34; data-lang=&#34;java&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;ReactiveAirplaneMode&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;na&#34;&gt;create&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;    &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;na&#34;&gt;observe&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;context&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;    &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;na&#34;&gt;subscribeOn&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Schedulers&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;na&#34;&gt;io&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;())&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;    &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;na&#34;&gt;observeOn&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;AndroidSchedulers&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;na&#34;&gt;mainThread&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;())&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;    &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;na&#34;&gt;subscribe&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;isOn&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;textView&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;na&#34;&gt;setText&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;String&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;na&#34;&gt;format&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;Airplane mode on: %s&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;isOn&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;na&#34;&gt;toString&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;())));&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;In the code above &lt;strong&gt;subscriber will be notified only when airplane mode changes&lt;/strong&gt;. If you want to &lt;strong&gt;read airplane mode and then listen to it&lt;/strong&gt;, you can use the following method:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Releasing ReactiveNetwork v. 0.11.0</title>
      <link>https://wittchen.io/notes/reactivenetwork-v-0110-walled-garden/</link>
      <pubDate>Sun, 06 Aug 2017 06:38:00 +0000</pubDate>
      <guid>https://wittchen.io/notes/reactivenetwork-v-0110-walled-garden/</guid>
      <description>&lt;p&gt;In the latest release of &lt;a href=&#34;https://github.com/pwittchen/ReactiveNetwork&#34;&gt;ReactiveNetwork&lt;/a&gt; library, I focused on &lt;a href=&#34;http://searchsecurity.techtarget.com/definition/walled-garden&#34;&gt;Walled Garden&lt;/a&gt; AKA Great Firewall support during checking Internet connectivity. There are countries with limited Internet access like China and in such cases, pinging commonly known host like &lt;a href=&#34;https://www.google.com&#34;&gt;www.google.com&lt;/a&gt; may have different results than in other countries because it may be blocked. We may get false positive results because users will generally have an access to the Internet, but they don&amp;rsquo;t have access only to several websites. To solve that problem, I created &lt;a href=&#34;https://github.com/pwittchen/ReactiveNetwork/blob/RxJava2.x/library/src/main/java/com/github/pwittchen/reactivenetwork/library/rx2/internet/observing/strategy/WalledGardenInternetObservingStrategy.java&#34;&gt;WalledGardenInternetObservingStrategy&lt;/a&gt; and made it default strategy for checking Internet connectivity inside the library. Of course, you can still use &lt;a href=&#34;https://github.com/pwittchen/ReactiveNetwork/blob/RxJava2.x/library/src/main/java/com/github/pwittchen/reactivenetwork/library/rx2/internet/observing/strategy/SocketInternetObservingStrategy.java&#34;&gt;SocketInternetObservingStrategy&lt;/a&gt; if you want to. Detailed release notes are as follows: &lt;strong&gt;RxJava1.x&lt;/strong&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Releasing ReactiveNetwork v. 0.10.0</title>
      <link>https://wittchen.io/notes/releasing-reactivenetwork-v-0100/</link>
      <pubDate>Thu, 20 Jul 2017 20:02:00 +0000</pubDate>
      <guid>https://wittchen.io/notes/releasing-reactivenetwork-v-0100/</guid>
      <description>&lt;p&gt;I&amp;rsquo;ve recently released &lt;a href=&#34;https://github.com/pwittchen/ReactiveNetwork&#34;&gt;&lt;strong&gt;ReactiveNetwork&lt;/strong&gt;&lt;/a&gt; library v. &lt;strong&gt;0.10.0&lt;/strong&gt; for RxJava1.x and RxJava2.x. ReactiveNetwork is an Android library listening network connection state and Internet connectivity with RxJava Observables, which I&amp;rsquo;m developing for approximately 2 years now. In this version, I&amp;rsquo;ve done a few bug fixes and added new features for RxJava2.x version. Below, you can find the release notes: &lt;a href=&#34;https://github.com/pwittchen/ReactiveNetwork/releases/tag/v0.10.0&#34;&gt;&lt;strong&gt;Release for RxJava1.x&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;bumped RxJava1 version to 1.3.0&lt;/li&gt;
&lt;li&gt;bumped test dependencies&lt;/li&gt;
&lt;li&gt;created Code of Conduct&lt;/li&gt;
&lt;li&gt;updated Kotlin version in sample apps&lt;/li&gt;
&lt;li&gt;added retrolambda to the sample Java app - issue &lt;a href=&#34;https://github.com/pwittchen/ReactiveNetwork/issues/163&#34;&gt;#163&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;fixed behavior of network observing in disconnected state - issue &lt;a href=&#34;https://github.com/pwittchen/ReactiveNetwork/issues/159&#34;&gt;#159&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a href=&#34;https://github.com/pwittchen/ReactiveNetwork/releases/tag/v0.10.0-rx2&#34;&gt;&lt;strong&gt;Release for RxJava2.x&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Release of prefser v. 2.1.0 with RxJava2 support</title>
      <link>https://wittchen.io/notes/release-of-prefser-210-with-rxjava2/</link>
      <pubDate>Mon, 19 Jun 2017 16:56:00 +0000</pubDate>
      <guid>https://wittchen.io/notes/release-of-prefser-210-with-rxjava2/</guid>
      <description>&lt;p&gt;I&amp;rsquo;ve recently released new version of &lt;a href=&#34;https://github.com/pwittchen/prefser&#34;&gt;prefser&lt;/a&gt; library for Android. In case you don&amp;rsquo;t know, it&amp;rsquo;s a wrapper for Android SharedPreferences with object serialization and RxJava Observables. This version has the new artifact, which has codebase migrated to RxJava2.x. As usual, I kept backward compatibility with RxJava1.x. You can find more details about the project at &lt;a href=&#34;https://github.com/pwittchen/prefser&#34;&gt;https://github.com/pwittchen/prefser&lt;/a&gt;. If you want to use it in your mobile project, you need the following dependencies in the &lt;code&gt;build.gradle&lt;/code&gt; file:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Releasing Prefser v. 2.0.7</title>
      <link>https://wittchen.io/notes/prefser-207/</link>
      <pubDate>Sun, 28 May 2017 20:48:00 +0000</pubDate>
      <guid>https://wittchen.io/notes/prefser-207/</guid>
      <description>&lt;p&gt;I&amp;rsquo;ve recently released new version of &lt;a href=&#34;https://github.com/pwittchen/prefser&#34;&gt;Prefser&lt;/a&gt;. It&amp;rsquo;s a wrapper for Android SharedPreferences with object serialization and RxJava Observables. The new version number is &lt;a href=&#34;https://github.com/pwittchen/prefser/releases/tag/v2.0.7&#34;&gt;2.0.7&lt;/a&gt;. In this release, I performed mostly internal work not related to the external library API. Nevertheless, it&amp;rsquo;s important for the library development in the future. The following things were done:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;updated dependencies&lt;/li&gt;
&lt;li&gt;updated Gradle configuration&lt;/li&gt;
&lt;li&gt;migrated unit tests to Robolectric&lt;/li&gt;
&lt;li&gt;started executing unit tests on Travis CI&lt;/li&gt;
&lt;li&gt;added integration with codecov.io and coverage report&lt;/li&gt;
&lt;li&gt;extracted code related to accessors from the Prefser class (refactoring library internals)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Organizational work is done and now I&amp;rsquo;m ready for migration to RxJava2 in this project on a separate branch. I want to keep backward compatibility with RxJava1 as in my other projects. This update is planned for version 2.1.0. Stay tuned!&lt;/p&gt;</description>
    </item>
    <item>
      <title>ReactiveNetwork - release v. 0.9.0 with RxJava2.x support</title>
      <link>https://wittchen.io/notes/reactivenetwork-090-rxjava2/</link>
      <pubDate>Tue, 11 Apr 2017 06:04:00 +0000</pubDate>
      <guid>https://wittchen.io/notes/reactivenetwork-090-rxjava2/</guid>
      <description>&lt;p&gt;This time, I upgraded my another reactive Android open-source project called &lt;a href=&#34;https://github.com/pwittchen/ReactiveNetwork&#34;&gt;ReactiveNetwork&lt;/a&gt; to RxJava2.x. Many thanks goes to &lt;a href=&#34;https://github.com/tushar-acharya&#34;&gt;@tushar-acharya&lt;/a&gt; who performed initial migration to the newer version of RxJava. During migration, I&amp;rsquo;ve also created new package &lt;code&gt;rx2&lt;/code&gt; to avoid potential import conflicts during migration inside Android apps. Besides migration, I&amp;rsquo;ve updated sample apps, documentation &amp;amp; JavaDocs on Github pages. You can still use RxJava1.x version and it&amp;rsquo;s available on the branch with that name. To use brand new ReactiveNetwork compatible with RxJava2.x, add the following dependency to your &lt;code&gt;build.gradle&lt;/code&gt; file:&lt;/p&gt;</description>
    </item>
    <item>
      <title>ReactiveBeacons - release of v. 0.6.0 with support for RxJava2</title>
      <link>https://wittchen.io/notes/reactivebeacons-060-rxjava2/</link>
      <pubDate>Mon, 03 Apr 2017 18:20:00 +0000</pubDate>
      <guid>https://wittchen.io/notes/reactivebeacons-060-rxjava2/</guid>
      <description>&lt;p&gt;Thanks to &lt;a href=&#34;https://github.com/BugsBunnyBR&#34;&gt;@BugsBunnyBR&lt;/a&gt; I released new version of &lt;a href=&#34;https://github.com/pwittchen/ReactiveBeacons&#34;&gt;ReactiveBeacons&lt;/a&gt; library with the RxJava2.x support. It&amp;rsquo;s an Android library scanning BLE (Bluetooth Low Energy) beacons nearby with RxJava Observables. I also kept backward compatibility with RxJava1.x. Different versions of the libraries are located on the separate git branches. It&amp;rsquo;s a similar approach to original &lt;a href=&#34;https://github.com/ReactiveX/RxJava&#34;&gt;RxJava&lt;/a&gt; project. I have separate builds on Travis CI, separate artifacts and JavaDocs. Such approach generates more overhead, but in such case, RxJava1.x can be kept in a maintenance mode and RxJava2.x can be a subject of the future development. What has been done in this version?&lt;/p&gt;</description>
    </item>
    <item>
      <title>Handling different Android versions with strategy pattern</title>
      <link>https://wittchen.io/notes/handling-different-android-versions-with-strategy-pattern/</link>
      <pubDate>Sun, 26 Mar 2017 22:39:00 +0000</pubDate>
      <guid>https://wittchen.io/notes/handling-different-android-versions-with-strategy-pattern/</guid>
      <description>&lt;p&gt;When we&amp;rsquo;re developing Android apps, we have to remember that different users have different versions of the Android OS. Unfortunately, not all of them has the newest version of the system and some of them have older devices with older systems. Some of these devices may be even unsupported because e.g. Google supports their devices like Nexus and Pixel for only 2 years. When we want to reach as many users as possible and make the app available for almost everyone, we have to handle different Android versions. One of the solutions for that problem is &lt;strong&gt;strategy design pattern&lt;/strong&gt; (it&amp;rsquo;s also called Policy in Domain-Driven Design). I&amp;rsquo;m developing an Android open-source library called &lt;a href=&#34;https://github.com/pwittchen/ReactiveNetwork&#34;&gt;ReactiveNetwork&lt;/a&gt;, which is used for monitoring connectivity with the network in the system. Network monitoring strategies vary between different versions of Android and I wanted to choose an appropriate strategy for appropriate Android version. To do so, I&amp;rsquo;ve created &lt;code&gt;NetworkObservingStrategy&lt;/code&gt; interface:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Android design inspirations</title>
      <link>https://wittchen.io/notes/android-design-inspirations/</link>
      <pubDate>Sun, 19 Mar 2017 19:51:00 +0000</pubDate>
      <guid>https://wittchen.io/notes/android-design-inspirations/</guid>
      <description>&lt;p&gt;When we are planning to create our next Android app, besides the codebase, it&amp;rsquo;s also good to plan its design, UI, and UX. Before doing that, we can take a look at some inspirations and work of other people to gather a few UI design patterns, inspirations, and ideas. Good resource of such inspirations is &lt;a href=&#34;http://androidniceties.tumblr.com&#34;&gt;&lt;strong&gt;Android Niceties&lt;/strong&gt;&lt;/a&gt; website. As the authors write, this website is &lt;em&gt;a collection of screenshots encompassing some of the most beautiful looking Android apps&lt;/em&gt;. You can also take a look at [https://pl.pinterest.com/explore/android-ui/](http://android-ui tag on Pinterest). Do you know any other similar resources? Share them in comments :-).&lt;/p&gt;</description>
    </item>
    <item>
      <title>Unit test coverage report with Travis CI for Robolectric on Android</title>
      <link>https://wittchen.io/notes/unit-test-coverage-report-with-travis-ci-for-robolectric-on-android/</link>
      <pubDate>Sun, 19 Mar 2017 19:32:00 +0000</pubDate>
      <guid>https://wittchen.io/notes/unit-test-coverage-report-with-travis-ci-for-robolectric-on-android/</guid>
      <description>&lt;h2 id=&#34;introduction&#34;&gt;Introduction&lt;/h2&gt;
&lt;p&gt;Some time ago, I&amp;rsquo;ve written an article about &lt;a href=&#34;https://wittchen.io/test-coverage-in-android-applications/&#34;&gt;Test coverage report for Android application&lt;/a&gt;. It got some interest (many comments below article and many visits according to Google Analytics), so I decided to refresh this topic. Previously, I&amp;rsquo;ve written instrumentation unit tests, which needed to be executed on a real device or an emulator. It&amp;rsquo;s a good approach when you want to test functionalities strongly connected with the device. E.g. when you want to test operations on a real SQLite database or something like that. Nevertheless, this approach has huge disadvantages. It&amp;rsquo;s hard to run tests on the Continous Integration server because we need to have the emulator or device up &amp;amp; connected all the time and also tests need to interact properly with the device to get passed what is not so easy. In most cases, mocking part of the application&amp;rsquo;s behavior is enough. In that case, we can easily run tests on a CI server and have deterministic test results. In order to do that, we can use &lt;a href=&#34;http://robolectric.org/&#34;&gt;&lt;strong&gt;Robolectric&lt;/strong&gt;&lt;/a&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>ReactiveNetwork - release of v. 0.2.0</title>
      <link>https://wittchen.io/notes/reactive-network-2/</link>
      <pubDate>Thu, 11 Feb 2016 19:19:00 +0000</pubDate>
      <guid>https://wittchen.io/notes/reactive-network-2/</guid>
      <description>&lt;p&gt;I&amp;rsquo;ve recently released new version of &lt;a href=&#34;https://github.com/pwittchen/ReactiveNetwork&#34;&gt;ReactiveNetwork&lt;/a&gt; library for Android. Here are the fresh &lt;strong&gt;release notes&lt;/strong&gt; for &lt;a href=&#34;https://github.com/pwittchen/ReactiveNetwork/releases/tag/v0.2.0&#34;&gt;version 0.2.0&lt;/a&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;added possibility to observe WiFi signal level with &lt;code&gt;observeWifiSignalLevel(context, numLevels)&lt;/code&gt; and &lt;code&gt;observeWifiSignalLevel(context)&lt;/code&gt; method&lt;/li&gt;
&lt;li&gt;created &lt;code&gt;WifiSignalLevel&lt;/code&gt; enum&lt;/li&gt;
&lt;li&gt;added internet check to parameters of &lt;code&gt;getConnectivityStatus(context, checkInternet)&lt;/code&gt; method&lt;/li&gt;
&lt;li&gt;made &lt;code&gt;getConnectivityStatus(context, checkInternet)&lt;/code&gt; method public&lt;/li&gt;
&lt;li&gt;changed String variable status in &lt;code&gt;ConnectivityStatus&lt;/code&gt; enum to description and made it public&lt;/li&gt;
&lt;li&gt;changed output of the &lt;code&gt;toString()&lt;/code&gt; method in &lt;code&gt;ConnectivityStatus&lt;/code&gt; to keep consistency with another enum&lt;/li&gt;
&lt;li&gt;made &lt;code&gt;ReactiveNetwork&lt;/code&gt; class non-final&lt;/li&gt;
&lt;li&gt;bumped Kotlin version in sample app to 1.0.0-rc-1036&lt;/li&gt;
&lt;li&gt;increased immutability of code of the library&lt;/li&gt;
&lt;li&gt;updated sample apps and documentation&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Thanks to &lt;a href=&#34;https://github.com/llp&#34;&gt;@llp&lt;/a&gt; and his Pull Request, we are able to &lt;a href=&#34;https://github.com/pwittchen/ReactiveNetwork#observing-wifi-signal-level&#34;&gt;observe WiFi signal level&lt;/a&gt; AKA &lt;a href=&#34;https://en.wikipedia.org/wiki/Received_signal_strength_indication&#34;&gt;RSSI&lt;/a&gt; now!&lt;/p&gt;</description>
    </item>
    <item>
      <title>Reactive Live Coding during GDG DevFest 2015 in Poland</title>
      <link>https://wittchen.io/notes/reactive-live-coding-gdg-devfest-pl-2015/</link>
      <pubDate>Sun, 29 Nov 2015 20:16:00 +0000</pubDate>
      <guid>https://wittchen.io/notes/reactive-live-coding-gdg-devfest-pl-2015/</guid>
      <description>&lt;p&gt;I was asked to be a speaker during &lt;a href=&#34;http://devfest.pl&#34;&gt;GDG DevFest&lt;/a&gt; 2015 conference in Warsaw, Poland. Of course, I accepted this invitation and prepared presentation titled &amp;ldquo;Reactive Live Coding&amp;rdquo;. Presentation covered basics of Reactive Programming, RxJava and RxAndroid. Besides my talk I&amp;rsquo;ve done live coding to show how to use mentioned libraries and basics principles of Reactive Programming in real life. I had only 20 minutes for all of that, so my time-box was very limited. Being a speaker at conference was really interesting and challenging experience, which I haven&amp;rsquo;t had before. Moreover, I could meet a lot of interesting people and hear very inspiring talks covering different topics. You can check activity from conference by browsing &lt;a href=&#34;https://twitter.com/search?q=%23devfest15pl&#34;&gt;#devfest15pl&lt;/a&gt; hashtag on Twitter and &lt;a href=&#34;https://www.facebook.com/events/595578613913819/&#34;&gt;Facebook event&lt;/a&gt;. You can also check official website of the conference at &lt;a href=&#34;http://devfest.pl&#34;&gt;devfest.pl&lt;/a&gt;. Slides from my presentation are available below.&lt;/p&gt;</description>
    </item>
    <item>
      <title>New release of Kirai - elegant string formatting library for Java</title>
      <link>https://wittchen.io/notes/new-release-of-kirai-140/</link>
      <pubDate>Sun, 22 Nov 2015 20:34:00 +0000</pubDate>
      <guid>https://wittchen.io/notes/new-release-of-kirai-140/</guid>
      <description>&lt;p&gt;I&amp;rsquo;ve recently released version &lt;strong&gt;1.4.0&lt;/strong&gt; of &lt;a href=&#34;https://github.com/pwittchen/kirai&#34;&gt;Kirai&lt;/a&gt; library. Kirai means &lt;em&gt;phrase&lt;/em&gt; in Swahili language. It&amp;rsquo;s string formatting library written in Java. It originally started as an Android library, but it evolved to pure Java library. It&amp;rsquo;s first possibilities were basic string formatting and text formatting for Android TextViews. Now, it allows to format strings for &lt;strong&gt;Java&lt;/strong&gt;, &lt;strong&gt;Web&lt;/strong&gt;, &lt;strong&gt;Android&lt;/strong&gt; and even &lt;strong&gt;Unix Terminal&lt;/strong&gt;! Have you ever wanted to have colorful and styled text in your mobile app, website or terminal app? Now you can with an elegant and fluent API! Moreover, I&amp;rsquo;ve added test coverage supported by &lt;a href=&#34;http://codecov.io&#34;&gt;codecov.io&lt;/a&gt;. It&amp;rsquo;s really nice service, which integrates with &lt;a href=&#34;http://travis-ci.org&#34;&gt;Travis CI&lt;/a&gt; and is free for open-source projects. It&amp;rsquo;s available for various programming languages and build systems. Check library source code and samples at: &lt;a href=&#34;https://github.com/pwittchen/kirai&#34;&gt;https://github.com/pwittchen/kirai&lt;/a&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Bunch of updates in my OSS for Android</title>
      <link>https://wittchen.io/notes/bunch-of-updates-in-my-android-oss/</link>
      <pubDate>Sun, 08 Nov 2015 16:53:00 +0000</pubDate>
      <guid>https://wittchen.io/notes/bunch-of-updates-in-my-android-oss/</guid>
      <description>&lt;h2 id=&#34;introduction&#34;&gt;Introduction&lt;/h2&gt;
&lt;p&gt;In the last days I prepared a bunch of updates in my open-source software for Android. Most of them are bug fixes and are related to increasing robustness of the projects as well as their overall quality. I also decided to play a little with &lt;a href=&#34;https://kotlinlang.org/&#34;&gt;Kotlin&lt;/a&gt; language from JetBrains, which seems to be reasonable choice for mobile applications running on Android. Nevertheless, writing an app in Kotlin requires some additional configuration and we should remember, it&amp;rsquo;s still in beta version. If you are interested in Kotlin programming for Android, take a look at &lt;a href=&#34;https://kotlinlang.org/docs/tutorials/kotlin-android.html&#34;&gt;Getting started with Android and Kotlin&lt;/a&gt; guide from official Kotlin website. You can also take a look at &lt;a href=&#34;https://github.com/pwittchen/ReactiveNetwork/tree/master/app-kotlin&#34;&gt;one of my sample apps&lt;/a&gt; written in Kotlin and &lt;a href=&#34;https://github.com/pwittchen/ReactiveNetwork/blob/master/app-kotlin/build.gradle&#34;&gt;its configuration in Gradle&lt;/a&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Introducing ReactiveBeacons</title>
      <link>https://wittchen.io/notes/introducing-reactive-beacons/</link>
      <pubDate>Wed, 30 Sep 2015 19:49:00 +0000</pubDate>
      <guid>https://wittchen.io/notes/introducing-reactive-beacons/</guid>
      <description>&lt;p&gt;Recently, I&amp;rsquo;ve created yet another reactive library for Android. It&amp;rsquo;s called &lt;a href=&#34;https://github.com/pwittchen/ReactiveBeacons&#34;&gt;ReactiveBeacons&lt;/a&gt; and it&amp;rsquo;s responsible for observing BLE (Bluetooth Low Energy) beacons. Beacons are small devices, which became quite popular in the last years. They can be utilized in creating Contextual Awareness, Contextual Computing and &lt;a href=&#34;https://en.wikipedia.org/wiki/Internet_of_Things&#34;&gt;Internet of Things&lt;/a&gt;. Beacons have lithium battery, are constantly turned on and emit signals via Bluetooth all the time. ReactiveBeacons library allows to transform these signals into Observable stream compatible with RxJava. Whenever new beacon is detected or &lt;a href=&#34;https://en.wikipedia.org/wiki/Received_signal_strength_indication&#34;&gt;RSSI&lt;/a&gt; (Received signal strength indication) changes, new immutable beacon data is emitted.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Introducing ReactiveSensors</title>
      <link>https://wittchen.io/notes/introducing-reactive-sensors/</link>
      <pubDate>Sat, 05 Sep 2015 20:03:00 +0000</pubDate>
      <guid>https://wittchen.io/notes/introducing-reactive-sensors/</guid>
      <description>&lt;p&gt;Another month, another library. Recently, I&amp;rsquo;ve released yet another reactive library called &lt;a href=&#34;https://github.com/pwittchen/ReactiveSensors&#34;&gt;ReactiveSensors&lt;/a&gt;. It&amp;rsquo;s an open-source Android library monitoring hardware sensors with RxJava Observables. Library is compatible with RxJava 1.0.+ and RxAndroid 1.0.+ and uses them under the hood.&lt;/p&gt;
&lt;p&gt;Library is available at: &lt;a href=&#34;https://github.com/pwittchen/ReactiveSensors&#34;&gt;https://github.com/pwittchen/ReactiveSensors&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;In my opinion, hardware sensors are perfect case for applying RxJava, because in fact we&amp;rsquo;re constantly receiving a stream of events emitted by many sensors. With Reactive Programming approach we have plenty of possibilities and easy API for manipulating received sensor&amp;rsquo;s data.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Learning Android and being up to date</title>
      <link>https://wittchen.io/notes/learning-android/</link>
      <pubDate>Sat, 22 Aug 2015 18:09:00 +0000</pubDate>
      <guid>https://wittchen.io/notes/learning-android/</guid>
      <description>&lt;p&gt;Recently a few people asked me, what are my methods for gathering knowledge and being up to date with all news connected with Android. I didn&amp;rsquo;t really think about that. I just grabbed all knowledge from a various places and then tried to use it in practice. I decided to sum everything up and create a collection of my knowledge resources. Of course, we are not able to use all of that every day, because it&amp;rsquo;s too much, but it&amp;rsquo;s good to know where we can find something interesting. Android is very dynamic mobile platform, which changes really fast. It&amp;rsquo;s hard to be up to date with all of new features and programming techniques. That&amp;rsquo;s why it&amp;rsquo;s worth to find places where we can gather interesting information. Below, I collected some resources, links and information, which I find useful for learning Android &amp;amp; Java and being up to date with Android development.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Introducing ReactiveNetwork</title>
      <link>https://wittchen.io/notes/introducing-reactive-network/</link>
      <pubDate>Mon, 10 Aug 2015 21:52:00 +0000</pubDate>
      <guid>https://wittchen.io/notes/introducing-reactive-network/</guid>
      <description>&lt;p&gt;I&amp;rsquo;ve recently released &lt;a href=&#34;https://github.com/pwittchen/ReactiveNetwork&#34;&gt;ReactiveNetwork&lt;/a&gt;. It is an open-source Android library listening network connection state and change of the WiFi signal strength with &lt;a href=&#34;https://github.com/ReactiveX/RxJava&#34;&gt;RxJava&lt;/a&gt; Observables. It&amp;rsquo;s a successor of &lt;a href=&#34;https://github.com/pwittchen/NetworkEvents&#34;&gt;Network Events&lt;/a&gt; library rewritten with Reactive Programming approach.&lt;/p&gt;
&lt;p&gt;Library is compatible with RxJava 1.0.+ and RxAndroid 1.0.+ and uses them under the hood. Min Android SDK version is 9.
JavaDoc can be found at: &lt;a href=&#34;http://pwittchen.github.io/ReactiveNetwork&#34;&gt;http://pwittchen.github.io/ReactiveNetwork&lt;/a&gt;.
Repository is available at: &lt;a href=&#34;https://github.com/pwittchen/ReactiveNetwork&#34;&gt;https://github.com/pwittchen/ReactiveNetwork&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;This library is much simpler and easier to use than NetworkEvents. Even code-base is much smaller, but we have to remember that it utilizes powerful RxJava and RxAndroid. RxJava hase huge API and gives a lot of possibilities. That&amp;rsquo;s why I was able to obtain desired result with fewer lines of code.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Releasing prefser 2.0.0</title>
      <link>https://wittchen.io/notes/releasing-prefser-2/</link>
      <pubDate>Thu, 06 Aug 2015 22:34:00 +0000</pubDate>
      <guid>https://wittchen.io/notes/releasing-prefser-2/</guid>
      <description>&lt;p&gt;I&amp;rsquo;ve recently released &lt;a href=&#34;https://github.com/pwittchen/prefser&#34;&gt;Prefser&lt;/a&gt; library v. &lt;a href=&#34;https://github.com/pwittchen/prefser/releases/tag/v2.0.0&#34;&gt;2.0.0&lt;/a&gt;. Prefser is a wrapper for Android SharedPreferences with object serialization and RxJava Observables. This update couldn&amp;rsquo;t be done without help of awesome open-source community and people who reported new issues and created pull requests. Thanks for that! A lot of issues related to RxJava was fixed. Moreover, now we can store and retrieve lists of objects of any type with Prefser. Examples of library usage can be found in &lt;code&gt;README.md&lt;/code&gt; file and in unit tests covering 96% of the code. Below, you can find release notes for this version of the library:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Releasing NetworkEvents 2.0.0</title>
      <link>https://wittchen.io/notes/releasing-network-events-2/</link>
      <pubDate>Fri, 31 Jul 2015 09:28:00 +0000</pubDate>
      <guid>https://wittchen.io/notes/releasing-network-events-2/</guid>
      <description>&lt;p&gt;I&amp;rsquo;ve recently released &lt;a href=&#34;https://github.com/pwittchen/NetworkEvents&#34;&gt;NetworkEvents&lt;/a&gt; library &lt;a href=&#34;https://github.com/pwittchen/NetworkEvents/releases/tag/v2.0.0&#34;&gt;v. 2.0.0&lt;/a&gt;. It&amp;rsquo;s an Android library listening network connection state and change of the Wifi signal strength. It has a few significant changes in the API and new features, which people were requesting on GitHub. Moreover, codebase was slightly refactored and updated. I&amp;rsquo;m going to keep &lt;code&gt;major.minor.patch&lt;/code&gt; convention AKA semantic versioning now:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;major&lt;/strong&gt; - new feature or update - backward incompatible&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;minor&lt;/strong&gt; - new feature - backward compatible&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;patch&lt;/strong&gt; - bug-fix - backward compatible&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;A few changes are backward incompatible, so I&amp;rsquo;ve increased &lt;code&gt;major&lt;/code&gt; number. Below, you can find list of changes. As you can see, there is a lot of stuff. That&amp;rsquo;s why I&amp;rsquo;ve made the most important changes &lt;strong&gt;bold&lt;/strong&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Releasing Weather Icon View v. 1.0.0 for Android</title>
      <link>https://wittchen.io/notes/releasing-weather-icon-view-1-for-android/</link>
      <pubDate>Tue, 21 Jul 2015 17:34:00 +0000</pubDate>
      <guid>https://wittchen.io/notes/releasing-weather-icon-view-1-for-android/</guid>
      <description>&lt;p&gt;Today I released &lt;a href=&#34;https://github.com/pwittchen/WeatherIconView&#34;&gt;Weather Icon View&lt;/a&gt; library v. &lt;a href=&#34;https://github.com/pwittchen/WeatherIconView/releases/tag/v1.0.0&#34;&gt;1.0.0&lt;/a&gt; It&amp;rsquo;s very simple and easy to use Android library, which allows you to use &lt;a href=&#34;https://github.com/erikflowers/weather-icons/&#34;&gt;Weather Icons&lt;/a&gt; created by &lt;a href=&#34;https://github.com/erikflowers&#34;&gt;Erik Flowers&lt;/a&gt; in your mobile applications. This library was already available on GitHub as I wrote in &lt;a href=&#34;http://blog.wittchen.biz.pl/weather-icons-for-android-applications/&#34;&gt;one of my previous posts&lt;/a&gt;, but today it was released to Maven Central Repository and you can use it as &lt;a href=&#34;https://github.com/pwittchen/WeatherIconView#download&#34;&gt;Maven or Gradle dependency&lt;/a&gt;. I was encouraged to make this project more available by the open-source community and people who find it useful as I could read in the &lt;a href=&#34;https://github.com/pwittchen/WeatherIconView/issues/1&#34;&gt;issue&lt;/a&gt; reported on the repository website. Thanks for that. You can find more details, usage examples and sample app in the repository of the project at: &lt;a href=&#34;https://github.com/pwittchen/WeatherIconView&#34;&gt;https://github.com/pwittchen/WeatherIconView&lt;/a&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Releasing prefser v. 1.0.5</title>
      <link>https://wittchen.io/notes/releasing-prefser-v-105/</link>
      <pubDate>Thu, 18 Jun 2015 20:46:00 +0000</pubDate>
      <guid>https://wittchen.io/notes/releasing-prefser-v-105/</guid>
      <description>&lt;p&gt;I am happy to announce that I released version 1.0.5 of &lt;a href=&#34;https://github.com/pwittchen/prefser&#34;&gt;Prefser&lt;/a&gt; Android library. Prefser is a wrapper for Android SharedPreferences with object serialization and RxJava Observables. What has been done in this version:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Removed &lt;code&gt;final&lt;/code&gt; keyword from &lt;code&gt;Prefser&lt;/code&gt; class in order to allow class mocking thanks to &lt;a href=&#34;https://github.com/plackemacher&#34;&gt;@plackemacher&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Removed unused imports from &lt;code&gt;Prefser&lt;/code&gt; class&lt;/li&gt;
&lt;li&gt;Added &lt;a href=&#34;http://blog.wittchen.biz.pl/test-coverage-report-for-android-application/&#34;&gt;test coverage report generation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;http://pwittchen.github.io/prefser/test-coverage-report&#34;&gt;Increased test coverage to 100%&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Added abstraction for &lt;code&gt;JsonConverter&lt;/code&gt; and default &lt;code&gt;GsonConverter&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Added &lt;code&gt;getAndObserve(...)&lt;/code&gt; method&lt;/li&gt;
&lt;li&gt;Emiting current value right on subscription to &lt;code&gt;Observable&lt;/code&gt; with &lt;code&gt;getAndObserve(...)&lt;/code&gt; method, which is idea provided by &lt;a href=&#34;https://github.com/semanticer&#34;&gt;@semanticer&lt;/a&gt;. Thanks!&lt;/li&gt;
&lt;li&gt;Added GitHub pages with generated JavaDoc documentation on &lt;code&gt;gh-pages&lt;/code&gt; branch available at: &lt;a href=&#34;http://pwittchen.github.io/prefser&#34;&gt;http://pwittchen.github.io/prefser&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Moreover you can browse auto-generated reports:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Test coverage report for Android application</title>
      <link>https://wittchen.io/notes/test-coverage-in-android-applications/</link>
      <pubDate>Wed, 03 Jun 2015 18:22:00 +0000</pubDate>
      <guid>https://wittchen.io/notes/test-coverage-in-android-applications/</guid>
      <description>&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt; see newer article about &lt;a href=&#34;https://wittchen.io/unit-test-coverage-report-with-travis-ci-for-robolectric-on-android/&#34;&gt;&lt;strong&gt;Unit test coverage report with Travis CI for Robolectric on Android&lt;/strong&gt;&lt;/a&gt;. For a long time, I wasn&amp;rsquo;t able to find the right way to generate test coverage reports for Android instrumentation unit tests created with AndroidJUnit4 runner. In the past I&amp;rsquo;ve found many solutions, but none of them was working or they were compatible only with Robolectric, which I currently don&amp;rsquo;t use. Other developers also stopped using it for the new projects. E.g. &lt;a href=&#34;https://github.com/square/sqlbrite&#34;&gt;Sqlbrite&lt;/a&gt; from Square is using AndroidJUnit4 runner as my projects do. Recently, I&amp;rsquo;ve found &lt;a href=&#34;http://www.reddit.com/r/androiddev/comments/2v1n2u/code_coverage_in_android_studio/&#34;&gt;an interesting discussion on Reddit&lt;/a&gt;, where we can find information about enabling test coverage very easily without additional plugins, scripts and many lines of configuration. Moreover, Android SDK currently has built-in support for &lt;a href=&#34;http://emma.sourceforge.net/&#34;&gt;Emma Test Coverage&lt;/a&gt;, what we can read in &lt;a href=&#34;http://developer.android.com/reference/android/test/InstrumentationTestRunner.html&#34;&gt;official documentation&lt;/a&gt;. Basically, the only thing we need to do, is to apply &lt;code&gt;jacoco-android&lt;/code&gt; plugin in &lt;code&gt;build.gradle&lt;/code&gt; file:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Static code analysis in Android project</title>
      <link>https://wittchen.io/notes/static-code-analysis-in-android-project/</link>
      <pubDate>Thu, 26 Mar 2015 00:23:00 +0000</pubDate>
      <guid>https://wittchen.io/notes/static-code-analysis-in-android-project/</guid>
      <description>&lt;h2 id=&#34;overview&#34;&gt;Overview&lt;/h2&gt;
&lt;p&gt;I&amp;rsquo;ve recently read great article telling &lt;a href=&#34;http://vincentbrison.com/2014/07/19/how-to-improve-quality-and-syntax-of-your-android-code/&#34;&gt;how to improve quality and syntax of your Android code&lt;/a&gt; by &lt;a href=&#34;http://vincentbrison.com/&#34;&gt;Vincent Brison&lt;/a&gt;. It presents how to use tools like &lt;a href=&#34;http://checkstyle.sourceforge.net/&#34;&gt;Checkstyle&lt;/a&gt;, &lt;a href=&#34;http://findbugs.sourceforge.net/&#34;&gt;Findbugs&lt;/a&gt;, &lt;a href=&#34;http://pmd.sourceforge.net/&#34;&gt;PMD&lt;/a&gt;, and &lt;a href=&#34;http://tools.android.com/tips/lint&#34;&gt;Android Lint&lt;/a&gt; for &lt;a href=&#34;http://en.wikipedia.org/wiki/Static_program_analysis&#34;&gt;Static Code Analysis&lt;/a&gt; in Android project. Static Code Analysis allows us to keep consistency of the source code style and helps us to find errors, warnings, possible bugs, bottlenecks and ways to improve the projects. I highly recommend to use tools like those mentioned.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Mockito on Android</title>
      <link>https://wittchen.io/notes/mockito-on-android/</link>
      <pubDate>Sun, 15 Mar 2015 15:44:00 +0000</pubDate>
      <guid>https://wittchen.io/notes/mockito-on-android/</guid>
      <description>&lt;h2 id=&#34;overview&#34;&gt;Overview&lt;/h2&gt;
&lt;p&gt;When we write unit tests for an Android application, sometimes there&amp;rsquo;s a necessity to mock some classes or interfaces. Instead of writing implementations dedicated for unit tests by hand, we can use Mockito library. We can read article about &lt;a href=&#34;https://corner.squareup.com/2012/10/mockito-android.html&#34;&gt;Mockito on Android&lt;/a&gt; on &lt;a href=&#34;https://corner.squareup.com/&#34;&gt;Square&amp;rsquo;s blog&lt;/a&gt;. Mockito can make our tests cleaner and better. It can be used both in &lt;em&gt;classic&lt;/em&gt; Java projects and Android projects. It&amp;rsquo;s one of the most popular mocking framework in Java and if you&amp;rsquo;re a Java developer who writes unit tests and tries to apply TDD approach, you should be familiar with it.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Introducing prefser</title>
      <link>https://wittchen.io/notes/introducing-prefser/</link>
      <pubDate>Sun, 22 Feb 2015 22:39:00 +0000</pubDate>
      <guid>https://wittchen.io/notes/introducing-prefser/</guid>
      <description>&lt;p&gt;I&amp;rsquo;ve recently released &lt;a href=&#34;https://github.com/pwittchen/prefser&#34;&gt;Prefser&lt;/a&gt;, which is a wrapper for Android &lt;a href=&#34;http://developer.android.com/reference/android/content/SharedPreferences.html&#34;&gt;SharedPreferences&lt;/a&gt; with object serialization and &lt;a href=&#34;https://github.com/ReactiveX/RxJava&#34;&gt;RxJava&lt;/a&gt; Observables. Prefser wraps SharedPreferences and thanks to Java Generics provides you simpler API than classic SharedPreferences with only two methods:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-java&#34; data-lang=&#34;java&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kt&#34;&gt;void&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nf&#34;&gt;put&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;String&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;key&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Object&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;value&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;o&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;T&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;T&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nf&#34;&gt;get&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;String&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;key&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Class&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;classOfT&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;T&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;defaultValue&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Classic SharedPreferences allows you to store only primitive data types and set of strings. Thanks to &lt;a href=&#34;https://code.google.com/p/google-gson/&#34;&gt;Gson&lt;/a&gt; serialization, Prefser allows you to store:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Primitive data types (boolean, float, int, long, double)&lt;/li&gt;
&lt;li&gt;Strings&lt;/li&gt;
&lt;li&gt;Custom Objects&lt;/li&gt;
&lt;li&gt;Lists&lt;/li&gt;
&lt;li&gt;Arrays&lt;/li&gt;
&lt;li&gt;Sets&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In addition, Prefser transforms &lt;a href=&#34;http://developer.android.com/reference/android/content/SharedPreferences.OnSharedPreferenceChangeListener.html&#34;&gt;OnSharedPreferenceChangeListener&lt;/a&gt; into Observables from RxJava:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Unit Testing Support for Android Studio 1.1</title>
      <link>https://wittchen.io/notes/unit-testing-support-for-android-studio-11/</link>
      <pubDate>Sun, 15 Feb 2015 12:53:00 +0000</pubDate>
      <guid>https://wittchen.io/notes/unit-testing-support-for-android-studio-11/</guid>
      <description>&lt;p&gt;As official Android website says:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Version 1.1 of Android Studio and the Android gradle plugin brings support for unit testing your code. This feature is still considered experimental, we encourage you to try it and file any bugs you find in our bug tracker.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;It&amp;rsquo;s great news, because now we can write Unit Tests with JUnit 4.12 without any &amp;ldquo;hacks&amp;rdquo; or tricky configuration, which had to be done earlier. We can execute two kinds of tests:&lt;/p&gt;</description>
    </item>
    <item>
      <title>NetworkEvents v. 1.0.2</title>
      <link>https://wittchen.io/notes/network-events-v102/</link>
      <pubDate>Sun, 15 Feb 2015 00:16:00 +0000</pubDate>
      <guid>https://wittchen.io/notes/network-events-v102/</guid>
      <description>&lt;p&gt;I&amp;rsquo;ve recently released &lt;a href=&#34;https://github.com/pwittchen/NetworkEvents&#34;&gt;NetworkEvents&lt;/a&gt; v. 1.0.2. In case, you don&amp;rsquo;t know it, it&amp;rsquo;s an Android library listening network connection state and change of the Wifi signal strength. This version has small improvements:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Updated &lt;code&gt;ping&lt;/code&gt; method in &lt;code&gt;NetworkHelper&lt;/code&gt; class.&lt;/li&gt;
&lt;li&gt;Detection of Internet access in WiFi network works faster and is more reliable.&lt;/li&gt;
&lt;li&gt;Added example of usage of NetworkEvents with &lt;a href=&#34;https://github.com/square/dagger&#34;&gt;Dagger&lt;/a&gt; in &lt;code&gt;example-dagger&lt;/code&gt; directory in the repository of the project.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Right now, we check Internet connection in a different way. Instead of sending HEAD or GET request to a specific website like &lt;a href=&#34;https://www.google.com&#34;&gt;www.google.com&lt;/a&gt;, we just ping 4.2.2.2 IP address. If you want to know why, read an article about &lt;a href=&#34;http://www.tummy.com/articles/famous-dns-server/&#34;&gt;4.2.2.2: The Story Behind a DNS Legend&lt;/a&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Hello Kotlin!</title>
      <link>https://wittchen.io/notes/hello-kotlin/</link>
      <pubDate>Sat, 07 Feb 2015 18:59:00 +0000</pubDate>
      <guid>https://wittchen.io/notes/hello-kotlin/</guid>
      <description>&lt;p&gt;I&amp;rsquo;ve recently played with &lt;a href=&#34;http://kotlinlang.org/&#34;&gt;Kotlin&lt;/a&gt; in order to create simple &amp;ldquo;Hello World&amp;rdquo; Android app using this new, fancy language from JetBrains. Kotlin is another programming language based on JVM, which can work with Java. It&amp;rsquo;s aim is to reduce code boilerplate and create projects faster. In my simple Android project, I&amp;rsquo;ve also used &lt;a href=&#34;https://github.com/JakeWharton/kotterknife&#34;&gt;KotterKnife&lt;/a&gt; for injecting views. I&amp;rsquo;ve also added one simple &lt;code&gt;ActivityUnitTestCase&lt;/code&gt;. Unfortunately, I couldn&amp;rsquo;t convert it into Kotlin, because I wasn&amp;rsquo;t allowed to call constructor of inherited class using &lt;code&gt;super()&lt;/code&gt; method. You can read &lt;a href=&#34;http://stackoverflow.com/questions/27699184/in-kotlin-how-do-i-extend-a-class-that-has-multiple-constructors&#34;&gt;related StackOverflow thread&lt;/a&gt; in order to view more details. In order to use Kotlin, I followed instructions from &lt;a href=&#34;http://blog.jetbrains.com/kotlin/2013/08/working-with-kotlin-in-android-studio/&#34;&gt;article on JetBrains blog&lt;/a&gt;. I&amp;rsquo;ve also needed &lt;a href=&#34;https://plugins.jetbrains.com/plugin/6954?pr=idea&#34;&gt;Kotlin plugin&lt;/a&gt; for Android Studio.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Introducing NetworkEvents</title>
      <link>https://wittchen.io/notes/introducing-network-events/</link>
      <pubDate>Sat, 31 Jan 2015 20:35:00 +0000</pubDate>
      <guid>https://wittchen.io/notes/introducing-network-events/</guid>
      <description>&lt;p&gt;I have released NetworkEvents library for Android. It&amp;rsquo;s a wrapper for system Broadcast Receivers built with Otto library. It allows you to listen change of connectivity status (connected to WiFi network with or without Internet access, mobile network, off-line) and change of the WiFi signal strength very easily with &lt;code&gt;@Subscribe&lt;/code&gt; annotation. The only thing you need to do, is to create &lt;code&gt;Bus&lt;/code&gt; and &lt;code&gt;NetworkEvents&lt;/code&gt; objects, register them in &lt;code&gt;onResume()&lt;/code&gt; method and unregister them in &lt;code&gt;onPause()&lt;/code&gt; method in your activity. After that, you can subscribe for the events you want to listen. Of course, remember to give your app appropriate permissions in &lt;code&gt;AndroidManifest.xml&lt;/code&gt; file. In contrast to Broadcast Receivers available in Android SDK, NetworkEvents sends only one event per one occurrence of this event. Android Broadcast Receivers have a &lt;a href=&#34;http://stackoverflow.com/questions/8412714/broadcastreceiver-receives-multiple-identical-messages-for-one-event&#34;&gt;bug, which causes sending multiple Intents&lt;/a&gt; even if only one event occurred. This behavior may vary on different devices. Regardless of this fact, this bug was handled by NetworkEvents and you shouldn&amp;rsquo;t encounter that problem while using this library. Important facts:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Android resource converter</title>
      <link>https://wittchen.io/notes/android-resource-converter/</link>
      <pubDate>Sat, 17 Jan 2015 00:19:00 +0000</pubDate>
      <guid>https://wittchen.io/notes/android-resource-converter/</guid>
      <description>&lt;p&gt;In international projects sometimes there&amp;rsquo;s a need to send resource files to the client in order to have translated strings. Client doesn&amp;rsquo;t have to understand XML notation and editing two or more files at the same time is inconvenient. It&amp;rsquo;s easier to send file which can be edited in MS Excel or Libre Office Calc. I&amp;rsquo;ve created Python scripts, which are able to convert Android xml resources with translations to a single &lt;code&gt;*.csv&lt;/code&gt; file ready to open in software for common users. In addition, there&amp;rsquo;s another script, which can generate xml resource files with translations from &lt;code&gt;*.csv&lt;/code&gt; file. Generating &lt;code&gt;*.csv&lt;/code&gt; file from resources is easy:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Kirai - flavored Android string formatting library</title>
      <link>https://wittchen.io/notes/kirai-flavored-android-string-formatting-library/</link>
      <pubDate>Tue, 13 Jan 2015 19:12:00 +0000</pubDate>
      <guid>https://wittchen.io/notes/kirai-flavored-android-string-formatting-library/</guid>
      <description>&lt;h2 id=&#34;overview&#34;&gt;Overview&lt;/h2&gt;
&lt;p&gt;Recently I&amp;rsquo;ve developed and realased to Maven Central Repository &lt;strong&gt;&lt;a href=&#34;https://github.com/pwittchen/kirai/&#34;&gt;Kirai&lt;/a&gt;&lt;/strong&gt;, which is &lt;strong&gt;flavored Android string formatting library&lt;/strong&gt;. Kirai means &lt;em&gt;phrase&lt;/em&gt; in Swahili language. Project is inspired by &lt;a href=&#34;https://github.com/square/phrase&#34;&gt;phrase&lt;/a&gt;, &lt;a href=&#34;https://github.com/polok/TaggerString&#34;&gt;TaggerString&lt;/a&gt; and &lt;a href=&#34;https://github.com/quiqueqs/BabushkaText&#34;&gt;BabushkaText&lt;/a&gt;. Kirai has fluent API similar to phrase with additional formatting similar to TaggerString and allows to add formatted pieces of text like BabushkaText. Development including writing Unit Tests took me about 2 days. Deployment and release to Maven Central Repository took me about 2 days as well. It was my first deployment, so it wasn&amp;rsquo;t so easy, but people from Sonatype are helpful, problems were solved very quickly and release went quite smooth.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Detecting swipe gesture in mobile application</title>
      <link>https://wittchen.io/notes/detecting-swipe-gesture-in-mobile-application/</link>
      <pubDate>Thu, 25 Dec 2014 15:59:00 +0000</pubDate>
      <guid>https://wittchen.io/notes/detecting-swipe-gesture-in-mobile-application/</guid>
      <description>&lt;h2 id=&#34;introduction&#34;&gt;Introduction&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt;: Swipe Detector project is now called &lt;a href=&#34;https://github.com/pwittchen/swipe&#34;&gt;swipe&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Some time ago, I needed to detect moment when user is swiping finger on the screen horizontally (from left to right or opposite) or when user swiped horizontally. I&amp;rsquo;ve decided to spend some time for analyzing [onTouch(MotionEvent event)](&lt;a href=&#34;http://developer.android.com/reference/android/view/View.OnTouchListener.html#onTouch(android.view.View&#34;&gt;http://developer.android.com/reference/android/view/View.OnTouchListener.html#onTouch(android.view.View&lt;/a&gt;, android.view.MotionEvent)) and &lt;code&gt;dispatchTouchEvent(MotionEvent event)&lt;/code&gt; method. We can read more about differences between triggering onTouch eventes on &lt;a href=&#34;http://stackoverflow.com/questions/9586032/android-difference-between-onintercepttouchevent-and-dispatchtouchevent&#34;&gt;StackOverflow thread&lt;/a&gt;. Method like &lt;code&gt;onTouch(MotionEvent event)&lt;/code&gt; allows to trigger any touch event, but it doesn&amp;rsquo;t allow to detect type of that event. Android API has &lt;a href=&#34;http://developer.android.com/reference/android/view/GestureDetector.html&#34;&gt;GestureDetector&lt;/a&gt; class, which allows to detect long press and double tap events. There is also &lt;a href=&#34;http://developer.android.com/reference/android/view/GestureDetector.OnGestureListener.html&#34;&gt;GestureDetector.OnGestureListener&lt;/a&gt; interface, which has the following methods:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Installing release and debug version of app on a single device</title>
      <link>https://wittchen.io/notes/installing-release-and-debug-version-of-app-on-a-single-device/</link>
      <pubDate>Thu, 25 Dec 2014 15:15:00 +0000</pubDate>
      <guid>https://wittchen.io/notes/installing-release-and-debug-version-of-app-on-a-single-device/</guid>
      <description>&lt;h2 id=&#34;introduction&#34;&gt;Introduction&lt;/h2&gt;
&lt;p&gt;During software development process developers and QAs may want to have installed release and debug version of the app on a single device, what can be very helpful when they want to develop and use application at the same time. Another advantage is the fact that debug and release version of the app may need different configuration. It this post I will show you an example in which we are changing application name and launcher icon, but we can also change different values during compilation in the same way (e.g. address of the webservice). Some time ago, I&amp;rsquo;ve created &lt;a href=&#34;http://blog.wittchen.biz.pl/different-back-end-urls-for-debug-and-release-version-of-the-android-app/&#34;&gt;similar template&lt;/a&gt;, but it was using older version of Build Tools, Android SDK and Android Studio. I&amp;rsquo;ve created new template, with the newest version of Android Studio (1.0.2) and newest version of Build Tools (1.0.0), so in that case, build.gradle file is smaller and simpler, but does its work correctly.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Square is advocating against fragments</title>
      <link>https://wittchen.io/notes/square-is-advocating-against-fragments/</link>
      <pubDate>Sun, 12 Oct 2014 18:58:00 +0000</pubDate>
      <guid>https://wittchen.io/notes/square-is-advocating-against-fragments/</guid>
      <description>&lt;p&gt;Recently, &lt;a href=&#34;http://squareup.com&#34;&gt;Square&lt;/a&gt; engineers confirmed my doubts I always had about fragments. I definitely knew that something was wrong with them, but Google introduced fragments into Android API, so I thought it must be okay for some reason and I tried to live with them feeling pain. Finally, concrete company have written an article criticizing Android Fragments and I totally agree with them. Read the article at: &lt;a href=&#34;http://corner.squareup.com/2014/10/advocating-against-android-fragments.html&#34;&gt;http://corner.squareup.com/2014/10/advocating-against-android-fragments.html&lt;/a&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Different build config for debug and release version of the Android app</title>
      <link>https://wittchen.io/notes/different-build-config-for-debug-and-release-version-of-the-android-app/</link>
      <pubDate>Wed, 08 Oct 2014 17:52:00 +0000</pubDate>
      <guid>https://wittchen.io/notes/different-build-config-for-debug-and-release-version-of-the-android-app/</guid>
      <description>&lt;p&gt;Sometimes we may want to set different address of the back-end web service for debuggable and release version of our Android app. E.g. predefined static host and port for release version of the application and our local IP address and predefined port for debuggable version of the application. In second case, we can deploy back-end webservice on our local machine for testing purposes. We can customize all of that in build.gradle file. We can use &lt;code&gt;variant.buildType.isDebuggable()&lt;/code&gt; instruction to check build type of the app. I described way of &lt;a href=&#34;http://blog.wittchen.biz.pl/updating-android-xml-resources-dynamically-before-compilation-via-gradle/&#34;&gt;Updating Android XML resources before compilation via Gradle&lt;/a&gt; in &lt;a href=&#34;http://blog.wittchen.biz.pl/updating-android-xml-resources-dynamically-before-compilation-via-gradle/&#34;&gt;one of my previous posts&lt;/a&gt;, so you can check it if you don&amp;rsquo;t understand &lt;code&gt;replaceBackendAddressInResources(variant, host, port)&lt;/code&gt; method. After proper configuration, setting of the back-end url is straightforward. Please check the code between &lt;code&gt;// configuration of the back-end address - begin&lt;/code&gt; and &lt;code&gt;// configuration of the back-end address - end&lt;/code&gt; comments.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Weather Icons for Android applications</title>
      <link>https://wittchen.io/notes/weather-icons-for-android-applications/</link>
      <pubDate>Thu, 02 Oct 2014 21:18:00 +0000</pubDate>
      <guid>https://wittchen.io/notes/weather-icons-for-android-applications/</guid>
      <description>&lt;p&gt;Some time ago I found &lt;a href=&#34;https://github.com/erikflowers/weather-icons/&#34;&gt;Weather Icons&lt;/a&gt; project by &lt;a href=&#34;https://github.com/erikflowers&#34;&gt;Erik Flowers&lt;/a&gt;. It&amp;rsquo;s customized font with appropriate CSS, which allows you to use weather icons on the website. In addition, those icons can be customized. They can have different size or color. Moreover, they are compatible with the &lt;a href=&#34;http://getbootstrap.com/&#34;&gt;Bootstrap&lt;/a&gt;. I thought, that it would be nice, if I had something like that for Android applications. That&amp;rsquo;s why I created simple open-source project called &lt;a href=&#34;https://github.com/pwittchen/WeatherIconView&#34;&gt;Weather Icon View&lt;/a&gt;. It&amp;rsquo;s customized view for Android, which allows you to use weather icons in mobile apps in similar way as in web apps. When you add mentioned library to your project, you can use it in XML layout in the following way:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Micro-location based on WiFi Access Points</title>
      <link>https://wittchen.io/notes/micro-location-based-on-wifi-access-points/</link>
      <pubDate>Sun, 21 Sep 2014 13:16:00 +0000</pubDate>
      <guid>https://wittchen.io/notes/micro-location-based-on-wifi-access-points/</guid>
      <description>&lt;h2 id=&#34;introduction&#34;&gt;Introduction&lt;/h2&gt;
&lt;p&gt;Recently, I started working on quite interesting project. One of its elements is micro-location inside the building based on WiFi Access Points. Company&amp;rsquo;s buildings have a lot of Access Points in different locations like regular rooms, conference rooms, corridors, sports building and restaurant. Having pool of Access Points with their names, locations and &lt;a href=&#34;http://en.wikipedia.org/wiki/MAC_address&#34;&gt;MAC&lt;/a&gt; addresses (or more precisely: &lt;a href=&#34;http://en.wiktionary.org/wiki/BSSID&#34;&gt;BSSID&lt;/a&gt;) it&amp;rsquo;s possible to create micro-location for Android mobile devices.&lt;/p&gt;
&lt;h2 id=&#34;overview&#34;&gt;Overview&lt;/h2&gt;
&lt;p&gt;On the image below, you can see approximate location of WiFi Access Points in the F3 building of Future Processing company. Other buildings also have their own Access Points, but they weren&amp;rsquo;t taken into consideration during the initial experiment. Android gives us possibility to scan available WiFi Access Points and measure their signal strength. Appropriate &lt;a href=&#34;http://developer.android.com/reference/android/content/BroadcastReceiver.html&#34;&gt;BroadcastReceiver&lt;/a&gt; allows us to react on event of changing WiFi Access Points signal strength, what can be interpreted as movement of person having mobile device. When such event occurs, we can read list of available Access Points, measure their signal strength, detect Access Point with the strongest signal, map it to specific room location and start WiFi scan again in order to retrieve fresh list of the Access Points as soon as possible. We have to remember that WiFi scanning is an asynchronous operation, so we don&amp;rsquo;t know, when we receive the results. That&amp;rsquo;s why event-driven development is good approach in such case. We can use pure Android BroadcastReceiver or use &lt;a href=&#34;http://square.github.io/otto/&#34;&gt;Otto Event Bus&lt;/a&gt; to make our code annotation-based, fine-grained and clear.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Versioning Android applications</title>
      <link>https://wittchen.io/notes/versioning-android-applications/</link>
      <pubDate>Sat, 13 Sep 2014 12:49:00 +0000</pubDate>
      <guid>https://wittchen.io/notes/versioning-android-applications/</guid>
      <description>&lt;p&gt;When we work in a team projects, our code constantly changes and being tested. Often some bugs occur in a specific version of application and no longer exists in next version of the project, because one programmer might fixed the bug according to the &lt;a href=&#34;http://programmer.97things.oreilly.com/wiki/index.php/The_Boy_Scout_Rule&#34;&gt;Boy Scout Rule&lt;/a&gt; and this is good. Nevertheless, sometimes we need to write documentation and check in which version bug occurred to be sure, that it was really fixed. In addition, &lt;a href=&#34;http://en.wikipedia.org/wiki/Quality_assurance&#34;&gt;QA&lt;/a&gt; Engineer needs to know, which version of the project he or she should check. That&amp;rsquo;s why we should introduce versioning system to our project. In Android Manifest we have &lt;code&gt;versionCode&lt;/code&gt; and &lt;code&gt;versionName&lt;/code&gt;. The &lt;code&gt;versionCode&lt;/code&gt; is used for updates on Google Play Store and it has to be integer value. We should increment &lt;code&gt;versionCode&lt;/code&gt; before releasing new version of the application for the users. The &lt;code&gt;versionName&lt;/code&gt; available in Android Manifest is a string value and we can use it to store information, which we need in a current project. When we use Git as a Version Control System, we can put SHA value of a specific commit into our version name. In addition, we can add date and time of compilation to this variable. After that, our &lt;code&gt;versionName&lt;/code&gt; contains very detailed information about current version of our application. Exemplary &lt;code&gt;versionName&lt;/code&gt; will look in as follows: &lt;code&gt;f935ea7-20140913144001&lt;/code&gt;. We can obtain that with proper configuration of &lt;code&gt;build.gradle&lt;/code&gt; file containing &lt;code&gt;buildTime()&lt;/code&gt; method and &lt;code&gt;gitSha()&lt;/code&gt; method. Please, take a look at creation of &lt;code&gt;versionName&lt;/code&gt; in 35th line of the &lt;code&gt;build.gradle&lt;/code&gt; file presented below.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Updating Android XML resources before compilation via Gradle</title>
      <link>https://wittchen.io/notes/updating-android-xml-resources-before-compilation-via-gradle/</link>
      <pubDate>Wed, 10 Sep 2014 21:22:00 +0000</pubDate>
      <guid>https://wittchen.io/notes/updating-android-xml-resources-before-compilation-via-gradle/</guid>
      <description>&lt;h2 id=&#34;problem&#34;&gt;Problem&lt;/h2&gt;
&lt;p&gt;In a team project, we encountered one of the common problems connected with mobile applications. Android application sends requests to backend web service and we don&amp;rsquo;t have backend web service deployed right now on a separate server, so every mobile developer is compiling and running backend web service on the local machine for testing purposes. In the beginning, url of backend url looked as follows:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-xml&#34; data-lang=&#34;xml&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;cp&#34;&gt;&amp;lt;?xml version=&amp;#34;1.0&amp;#34; encoding=&amp;#34;utf-8&amp;#34;?&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nt&#34;&gt;&amp;lt;resources&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;nt&#34;&gt;&amp;lt;string&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;name=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;backend_url&amp;#34;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;&amp;gt;&lt;/span&gt;192.168.1.1&lt;span class=&#34;nt&#34;&gt;&amp;lt;/string&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nt&#34;&gt;&amp;lt;/resources&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Of course address varies on different machines.&lt;/p&gt;</description>
    </item>
    <item>
      <title>EEG Analyzer - Android app</title>
      <link>https://wittchen.io/notes/eeg-analyzer-android-app/</link>
      <pubDate>Mon, 01 Sep 2014 11:38:00 +0000</pubDate>
      <guid>https://wittchen.io/notes/eeg-analyzer-android-app/</guid>
      <description>&lt;p&gt;I recently published my side project connected with &lt;a href=&#34;http://en.wikipedia.org/wiki/Brain%E2%80%93computer_interface&#34;&gt;BCI&lt;/a&gt; and &lt;a href=&#34;http://en.wikipedia.org/wiki/Electroencephalography&#34;&gt;EEG&lt;/a&gt; technology in Google Play Store. &lt;a href=&#34;https://play.google.com/store/apps/details?id=com.pwittchen.eeganalyzer&#34;&gt;&lt;img alt=&#34;unnamed&#34; loading=&#34;lazy&#34; src=&#34;https://wittchen.io/posts/2014/eeg-analyzer-android-app/eeg_analyzer_graphic.png&#34;&gt;&lt;/a&gt; &lt;a href=&#34;https://play.google.com/store/apps/details?id=com.pwittchen.eeganalyzer&#34;&gt;EEG Analyzer&lt;/a&gt; reads electrical activity of the brain with &lt;a href=&#34;http://en.wikipedia.org/wiki/Electroencephalography&#34;&gt;EEG&lt;/a&gt; technology and blink strength with &lt;a href=&#34;http://en.wikipedia.org/wiki/Electromyography&#34;&gt;EMG&lt;/a&gt; sensor from NeuroSky MindWave Mobile device connected via Bluetooth to Android device. &lt;strong&gt;In order to use this application, you need to have NeuroSky MindWave Mobile device&lt;/strong&gt;, which can be ordered from &lt;a href=&#34;http://neurosky.com/&#34;&gt;http://neurosky.com/&lt;/a&gt; website. Direct link to the mentioned product: &lt;a href=&#34;http://store.neurosky.com/products/brainwave-starter-kit&#34;&gt;http://store.neurosky.com/products/brainwave-starter-kit&lt;/a&gt; Application has the following features:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Publishing Android application in Google Play store</title>
      <link>https://wittchen.io/notes/publishing-android-application-in-google-play-store/</link>
      <pubDate>Sun, 31 Aug 2014 14:44:00 +0000</pubDate>
      <guid>https://wittchen.io/notes/publishing-android-application-in-google-play-store/</guid>
      <description>&lt;h2 id=&#34;introduction&#34;&gt;Introduction&lt;/h2&gt;
&lt;p&gt;When you want to publish your Android application in Google Play Store, first you need to go to &lt;a href=&#34;https://play.google.com/apps/publish/&#34;&gt;https://play.google.com/apps/publish/&lt;/a&gt; website and create a Developer account. Its cost is $25. You can read more about that at: &lt;a href=&#34;https://support.google.com/googleplay/android-developer/answer/113468?hl=en&#34;&gt;https://support.google.com/googleplay/android-developer/answer/113468?hl=en&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;problems-with-payments-during-registration&#34;&gt;Problems with payments during registration&lt;/h2&gt;
&lt;p&gt;Remember that you need to have appropriate debit card in order to proceed with payments. E.g. I have debit card in PKO BP (Polish bank), which has two-stage authorization. Most of debit cards has two-stage authorization for the registration of the card in on-line payment system and next payments are verified only once. In my bank every payment is verified twice. It&amp;rsquo;s more secure, but due to this security policy I was not able to pay for my developer account at all! I decided to create another bank account for on-line payments in bank, which has one-stage authorization for regular payments. I&amp;rsquo;ve chosen mBank (another Polish bank). Finally, I was able to proceed with payments and create my developer account.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Stuff you should know about Android</title>
      <link>https://wittchen.io/notes/stuff-you-should-know-about-android/</link>
      <pubDate>Fri, 29 Aug 2014 16:29:00 +0000</pubDate>
      <guid>https://wittchen.io/notes/stuff-you-should-know-about-android/</guid>
      <description>&lt;p&gt;Today I had talk at &lt;a href=&#34;http://www.future-processing.com/&#34;&gt;Future Processing&lt;/a&gt; about Android. It was part of company&amp;rsquo;s Java show &amp;amp; tell series. I wanted to make it interesting both for people without any experience with Android development and for people who already know something about this platform. Presentation was divided into three main parts:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Basics&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Challenges&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Techniques&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Below, you can browse slides from the presentation.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;http://slides.com/piotrwittchen/stuff-you-should-know-about-android#/&#34;&gt;View the presentation&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Of course, slides does not show everything I prepared, but they are good summary of the talk. I hope you find it interesting and useful. Feel free to give me any feedback about the presentation (especially if you attended it in person. ;-)) !&lt;/p&gt;</description>
    </item>
    <item>
      <title>NetworkEvents - Android library</title>
      <link>https://wittchen.io/notes/network-events-android-library/</link>
      <pubDate>Tue, 19 Aug 2014 14:59:00 +0000</pubDate>
      <guid>https://wittchen.io/notes/network-events-android-library/</guid>
      <description>&lt;p&gt;&lt;strong&gt;Please note: This post is outdated. Check newest API on the &lt;a href=&#34;https://github.com/pwittchen/NetworkEvents&#34;&gt;GitHub&lt;/a&gt;.&lt;/strong&gt;&lt;/p&gt;
&lt;h2 id=&#34;introduction&#34;&gt;Introduction&lt;/h2&gt;
&lt;p&gt;NetworkEvents is an Android library, which I&amp;rsquo;ve created recently for one of the projects. It uses &lt;a href=&#34;http://square.github.io/otto/&#34;&gt;Otto Event Bus&lt;/a&gt; to support event driven programming. We can use appropriate annotations and perform any action, when connectivity status changes. E.g. when device will go offline, connects to the mobile network, connects to the WiFi network, connects to the WiFi network with Internet access or connects to WiFi network without Internet access. Android API does not allow to determine whether specific WiFi Access Point is connected to the Internet, but this library does. In addition, we can monitor change of the signal strength of available WiFi Access Points in the same manner as connectivity status.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Brain-Computer Interface for mobile devices - Master Thesis presentation</title>
      <link>https://wittchen.io/notes/bci-for-mobile-devices-master-thesis-presentation/</link>
      <pubDate>Tue, 08 Jul 2014 20:03:00 +0000</pubDate>
      <guid>https://wittchen.io/notes/bci-for-mobile-devices-master-thesis-presentation/</guid>
      <description>&lt;p&gt;Recently, I graduated from &lt;a href=&#34;http://www.polsl.pl/&#34;&gt;my university&lt;/a&gt;. Below, you can browse my Master Thesis presentation about &lt;em&gt;Brain-Computer Interface for mobile devices&lt;/em&gt;. If you are interested in writing mobile Android applications communicating with NeuroSky MindWave Mobile device, you can check my &lt;a href=&#34;https://github.com/pwittchen/EEGReader/&#34;&gt;EEG Reader&lt;/a&gt; project on GitHub, which can be treated as a basis for more advanced projects. During writing my Master Thesis, I created two another projects using similar concepts. Mentioned code may be a little bit outdated comparing to the newest Android trends, but feel free to fork and upgrade it.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Selected aspects of creating mobile Android applications</title>
      <link>https://wittchen.io/notes/selected-aspects-of-creating-mobile-android-applications/</link>
      <pubDate>Mon, 07 Apr 2014 17:04:00 +0000</pubDate>
      <guid>https://wittchen.io/notes/selected-aspects-of-creating-mobile-android-applications/</guid>
      <description>&lt;p&gt;During the development of mobile applications, we should adjust our point of view to the specific projects we are working with. Applications for mobile devices are different than desktop or web applications. They have their own lifecycle, work on various devices with different screen resolutions. They have to work on devices with limited memory, clock rate of the CPU and battery life. In addition, these applications often have to be able to work without an Internet connection and their user interface has to be simple and well-designed due to smaller screen of a typical smartphone.&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to highlight and click on ListView item in Android programmatically?</title>
      <link>https://wittchen.io/notes/how-to-highlight-and-click-on-listview-item-in-android-programmatically/</link>
      <pubDate>Thu, 06 Mar 2014 21:43:00 +0000</pubDate>
      <guid>https://wittchen.io/notes/how-to-highlight-and-click-on-listview-item-in-android-programmatically/</guid>
      <description>&lt;p&gt;There are many approaches concerning selecting items on Android&amp;rsquo;s ListView. Unfortunately most of them don&amp;rsquo;t work. I was struggling with this problem for some time and decided to publish my solution, which is actually quite easy.&lt;/p&gt;
&lt;h2 id=&#34;the-problem&#34;&gt;The problem&lt;/h2&gt;
&lt;p&gt;I want to highlight item on a ListView programmatically (in a source code - without touching item on the screen).
I also want to click on item of the ListView programmatically.&lt;/p&gt;
&lt;h2 id=&#34;solution&#34;&gt;Solution&lt;/h2&gt;
&lt;p&gt;We have to create our own adapter. Let&amp;rsquo;s call it ContactsAdapter.&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to read contacts in Android device using ContentResolver?</title>
      <link>https://wittchen.io/notes/how-to-read-contacts-in-android-device-using-contentresolver/</link>
      <pubDate>Sun, 02 Mar 2014 22:23:00 +0000</pubDate>
      <guid>https://wittchen.io/notes/how-to-read-contacts-in-android-device-using-contentresolver/</guid>
      <description>&lt;p&gt;With &lt;a href=&#34;http://developer.android.com/guide/topics/providers/content-providers.html&#34;&gt;Content Providers&lt;/a&gt; we can access data stored by Android system applications. Popular example of using Content Provider is retrieving contact list from the smartphone. We can also access Calendar or create our own Content Provider. More information about that can be found in documentation of Android. If we want to access Content Provider, we can use &lt;a href=&#34;http://developer.android.com/reference/android/content/ContentResolver.html&#34;&gt;Content Resolver&lt;/a&gt; in our application&amp;rsquo;s context.&lt;/p&gt;
&lt;p&gt;In this example, we will access contact list. First of all, it’s good to create Contact entity class, which will be model of our data.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Avoiding OutOfMemory Error while loading large Bitmaps in Android UI</title>
      <link>https://wittchen.io/notes/avoiding-outofmemory-error-while-loading-large-bitmaps-in-android-ui/</link>
      <pubDate>Sun, 23 Feb 2014 13:34:00 +0000</pubDate>
      <guid>https://wittchen.io/notes/avoiding-outofmemory-error-while-loading-large-bitmaps-in-android-ui/</guid>
      <description>&lt;p&gt;Sometimes we may encounter an error connected with loading too large Bitmaps into Android UI. In such cases, we may receive &lt;code&gt;OutOfMemoryError&lt;/code&gt; in stack trace. In Android, we are working with limited memory and we shouldn&amp;rsquo;t load images with full resolution into UI. These images should be scaled down in order to save memory and increase performance of the application. It&amp;rsquo;s very well described in official Android documentation in section &lt;a href=&#34;http://developer.android.com/training/displaying-bitmaps/load-bitmap.html&#34; title=&#34;Loading Large Bitmaps Efficiently&#34;&gt;Loading Large Bitmaps Efficiently&lt;/a&gt;. It&amp;rsquo;s worth reading. We can deal with memory problem in three easy steps:&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to connect to Android device via TCP/IP?</title>
      <link>https://wittchen.io/notes/how-to-connect-to-android-device-via-tcp-ip/</link>
      <pubDate>Sat, 12 Oct 2013 12:48:00 +0000</pubDate>
      <guid>https://wittchen.io/notes/how-to-connect-to-android-device-via-tcp-ip/</guid>
      <description>&lt;p&gt;While developing Android applications, we need to debug them on real devices. We also should be able to access &lt;a href=&#34;http://developer.android.com/tools/help/logcat.html&#34;&gt;debug output&lt;/a&gt; and execute Unix shell commands. In Android device (mobile phone or tablet), we can go to &lt;em&gt;Settings&lt;/em&gt; and then to &lt;em&gt;Developer options&lt;/em&gt;. Afterwards, we can enable &lt;em&gt;USB Debugging&lt;/em&gt;. Now, we can connect our device via USB cable to the computer and we will be able to access it via &lt;a href=&#34;http://developer.android.com/tools/help/adb.html&#34;&gt;Android Debug Bridge (ADB)&lt;/a&gt;. USB connection is standard way of debugging application on real devices. We can also use TCP/IP connection and debug applications wireless. In order to do that, we need to go through the following steps:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Justifying block of text inside TextView in Android</title>
      <link>https://wittchen.io/notes/justifying-block-of-text-inside-textview-in-android/</link>
      <pubDate>Sat, 31 Aug 2013 22:14:00 +0000</pubDate>
      <guid>https://wittchen.io/notes/justifying-block-of-text-inside-textview-in-android/</guid>
      <description>&lt;p&gt;Justifying text inside &lt;code&gt;TextView&lt;/code&gt; in Android is not that simple as we may expect it to be. Unfortunately, Android does not have attribute for &lt;code&gt;TextView&lt;/code&gt;, which supports justifying text. We can set alignment to the right or to the left, but we cannot simply justify text with generic attributes. In order to do that, we need to perform a few tricks. First of all, we need to create file named &lt;code&gt;justified_textview.css&lt;/code&gt; and we need to put it into the &lt;code&gt;assets/&lt;/code&gt; directory of our project. We will use it later in our custom view. Source code of this CSS stylesheet is presented below:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Asynchronous loading and caching bitmaps with Volley</title>
      <link>https://wittchen.io/notes/asynchronous-loading-and-caching-bitmaps-with-volley/</link>
      <pubDate>Mon, 26 Aug 2013 23:37:00 +0000</pubDate>
      <guid>https://wittchen.io/notes/asynchronous-loading-and-caching-bitmaps-with-volley/</guid>
      <description>&lt;p&gt;We can use &lt;a href=&#34;https://android.googlesource.com/platform/frameworks/volley/&#34;&gt;Volley&lt;/a&gt; library from Google for very clean, simple and easy loading of the images from Internet. Volley uses &lt;a href=&#34;http://developer.android.com/reference/android/util/LruCache.html&#34;&gt;LRU cache&lt;/a&gt;, so first of all, we need to create BitmapLruCache class extending LruCache class.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-java&#34; data-lang=&#34;java&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kn&#34;&gt;package&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nn&#34;&gt;com.github.volley.example.toolbox&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kn&#34;&gt;import&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nn&#34;&gt;com.android.volley.toolbox.ImageLoader.ImageCache&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kn&#34;&gt;import&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nn&#34;&gt;android.graphics.Bitmap&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kn&#34;&gt;import&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nn&#34;&gt;android.support.v4.util.LruCache&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kd&#34;&gt;public&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;kd&#34;&gt;class&lt;/span&gt; &lt;span class=&#34;nc&#34;&gt;BitmapLruCache&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;kd&#34;&gt;extends&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;LruCache&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;String&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Bitmap&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;kd&#34;&gt;implements&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;ImageCache&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;    &lt;/span&gt;&lt;span class=&#34;kd&#34;&gt;public&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nf&#34;&gt;BitmapLruCache&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;kt&#34;&gt;int&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;maxSize&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;        &lt;/span&gt;&lt;span class=&#34;kd&#34;&gt;super&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;maxSize&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;    &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;//    Fix thanks to Steven&amp;#39;s comment: sizeOf method should not be overriden, &lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;//    when we are passing max image cache entries in another place of the code&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;//    @Override&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;//    protected int sizeOf(String key, Bitmap value) {&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;//        return value.getRowBytes() * value.getHeight();&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;//    }&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;    &lt;/span&gt;&lt;span class=&#34;nd&#34;&gt;@Override&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;    &lt;/span&gt;&lt;span class=&#34;kd&#34;&gt;public&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Bitmap&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nf&#34;&gt;getBitmap&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;String&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;url&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;        &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;return&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;get&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;url&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;    &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;    &lt;/span&gt;&lt;span class=&#34;nd&#34;&gt;@Override&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;    &lt;/span&gt;&lt;span class=&#34;kd&#34;&gt;public&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;kt&#34;&gt;void&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nf&#34;&gt;putBitmap&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;String&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;url&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Bitmap&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;bitmap&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;        &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;put&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;url&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;bitmap&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;    &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Next, we need to create VolleyHelper class.&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to change Fragment layout on orientation change?</title>
      <link>https://wittchen.io/notes/how-to-change-fragment-layout-on-orientation-change/</link>
      <pubDate>Thu, 15 Aug 2013 22:50:00 +0000</pubDate>
      <guid>https://wittchen.io/notes/how-to-change-fragment-layout-on-orientation-change/</guid>
      <description>&lt;p&gt;When we work with Activities in Android, defining different layouts for different screen orientations is easy. The only thing we need to do, is to create two &lt;code&gt;*.xml&lt;/code&gt; files with the same name for layouts in two separate directories (&lt;em&gt;res/layout/&lt;/em&gt; and &lt;em&gt;res/layout-land/&lt;/em&gt;). In &lt;a href=&#34;http://developer.android.com/guide/components/fragments.html&#34;&gt;Fragments&lt;/a&gt; it&amp;rsquo;s not that easy. In such case, we need to perform additional operations in order to achieve our goal. Fragment in Android is not re-inflated on configuration change, but we can recreate layout and repopulate view manually. We need to create two layouts for different orientations of the screen in the same way as for Activity:&lt;/p&gt;</description>
    </item>
    <item>
      <title>First Google Glass Hackathon in Poland</title>
      <link>https://wittchen.io/notes/first-google-glass-hackathon-in-poland/</link>
      <pubDate>Tue, 30 Jul 2013 18:46:00 +0000</pubDate>
      <guid>https://wittchen.io/notes/first-google-glass-hackathon-in-poland/</guid>
      <description>&lt;p&gt;Some time ago I participated in first Google Glass Hackathon in Poland, where I had possibility to test Google Glass, try it and write applications, which can be run on this cutting-edge device. It was very interesting experience. In addition, I took 2nd place with my team, what made me happy after leaving Warsaw late night. In a few hours, we created simple native application for Android platform, which can be used as a city guide with augmented reality, geolocation and image recognition. We called it &lt;em&gt;Hereandhounds&lt;/em&gt;. You can see its source code at: &lt;a href=&#34;https://github.com/pwittchen/Hereandhounds&#34;&gt;https://github.com/pwittchen/Hereandhounds&lt;/a&gt;. You can read detailed report from that event at technical blog of Future Processing: &lt;a href=&#34;http://www.future-processing.pl/blog/relacja-z-pierwszego-w-polsce-glass-hackathonu/&#34; title=&#34;http://www.future-processing.pl/blog/relacja-z-pierwszego-w-polsce-glass-hackathonu/&#34;&gt;http://www.future-processing.pl/blog/relacja-z-pierwszego-w-polsce-glass-hackathonu/&lt;/a&gt;. Unfortunately, its available &lt;strong&gt;only in Polish language&lt;/strong&gt; right now.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Displaying image from the Internet inside the TextView</title>
      <link>https://wittchen.io/notes/displaying-image-from-the-internet-resource-inside-the-textview-in-android/</link>
      <pubDate>Tue, 19 Mar 2013 23:04:00 +0000</pubDate>
      <guid>https://wittchen.io/notes/displaying-image-from-the-internet-resource-inside-the-textview-in-android/</guid>
      <description>&lt;p&gt;Sometimes, we have to work with legacy code and we have to change application&amp;rsquo;s behavior without modifying layouts, structure of the application and core components. Such situations can force us to do some tricks during development or maintenance process. For example, at the beginning, our app had to download data from the web service or RSS channel. This data consisted of the text, so we could use &lt;em&gt;TextView&lt;/em&gt; in order to display such information. After some time, back-end developers decided to put there some HTML code including references to images. We want to display images in our mobile application without modifying existing structure, so we can create data of type &lt;em&gt;Drawable&lt;/em&gt; inside the &lt;em&gt;TextView&lt;/em&gt;. We can do it by creating an additional method &lt;em&gt;getImageHTML()&lt;/em&gt; and using &lt;a href=&#34;http://developer.android.com/reference/android/text/Html.html#fromHtml(java.lang.String)&#34;&gt;&lt;em&gt;fromHtml&lt;/em&gt;&lt;/a&gt; method from &lt;a href=&#34;http://developer.android.com/reference/android/text/Html.html&#34;&gt;&lt;em&gt;Html&lt;/em&gt; class&lt;/a&gt;, which is default Android class. Below, you can see an example presenting approach described in this post.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Improper data type in Android TextView</title>
      <link>https://wittchen.io/notes/improper-data-type-in-android-textview/</link>
      <pubDate>Sun, 17 Mar 2013 18:57:00 +0000</pubDate>
      <guid>https://wittchen.io/notes/improper-data-type-in-android-textview/</guid>
      <description>&lt;h2 id=&#34;identifying-the-problem&#34;&gt;Identifying the problem&lt;/h2&gt;
&lt;p&gt;One of the common mistakes done by Android programmers is using improper data type in &lt;em&gt;TextView&lt;/em&gt;. Let&amp;rsquo;s have a look on a simple code snippet:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-java&#34; data-lang=&#34;java&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kt&#34;&gt;int&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;area&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;TextView&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;sampleTextView&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;TextView&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;findViewById&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;R&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;na&#34;&gt;id&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;na&#34;&gt;myTextViewInXml&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;sampleTextView&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;na&#34;&gt;setText&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;area&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;+&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34; km&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Here, we simply set a value of the text in an exemplary &lt;em&gt;TextView&lt;/em&gt; and append string value &amp;quot; km&amp;quot; at the end. It can be used with &lt;em&gt;SeekBar&lt;/em&gt;. For example, when we change value of the &lt;em&gt;SeekBar&lt;/em&gt;, we can also update value of the text inside the &lt;em&gt;TextView&lt;/em&gt;. Let&amp;rsquo;s have a look on another example:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Endless ListView in Android</title>
      <link>https://wittchen.io/notes/endless-listview-in-android/</link>
      <pubDate>Thu, 14 Feb 2013 15:34:00 +0000</pubDate>
      <guid>https://wittchen.io/notes/endless-listview-in-android/</guid>
      <description>&lt;p&gt;Some time ago, I had to implement Endless ListView in Android application. I checked different solutions, but some of them were overprogrammed or did not work well. Fortunately, I found simple solution, which solves the problem. Code snippet presenting mentioned approach, is placed below.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-java&#34; data-lang=&#34;java&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kd&#34;&gt;public&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;kd&#34;&gt;class&lt;/span&gt; &lt;span class=&#34;nc&#34;&gt;EndlessScrollListener&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;kd&#34;&gt;implements&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;OnScrollListener&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;    &lt;/span&gt;&lt;span class=&#34;kd&#34;&gt;private&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;kt&#34;&gt;int&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;visibleThreshold&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;20&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;    &lt;/span&gt;&lt;span class=&#34;kd&#34;&gt;private&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;kt&#34;&gt;int&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;currentPage&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;0&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;    &lt;/span&gt;&lt;span class=&#34;nd&#34;&gt;@Override&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;    &lt;/span&gt;&lt;span class=&#34;kd&#34;&gt;public&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;kt&#34;&gt;void&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nf&#34;&gt;onScroll&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;AbsListView&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;view&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;kt&#34;&gt;int&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;firstVisibleItem&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;kt&#34;&gt;int&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;visibleItemCount&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;kt&#34;&gt;int&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;totalItemCount&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;    &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;    &lt;/span&gt;&lt;span class=&#34;nd&#34;&gt;@Override&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;    &lt;/span&gt;&lt;span class=&#34;kd&#34;&gt;public&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;kt&#34;&gt;void&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nf&#34;&gt;onScrollStateChanged&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;AbsListView&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;view&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;kt&#34;&gt;int&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;scrollState&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;        &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;if&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;scrollState&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;==&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;SCROLL_STATE_IDLE&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;            &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;if&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;listView&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;na&#34;&gt;getLastVisiblePosition&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;&amp;gt;=&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;listView&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;na&#34;&gt;getCount&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;-&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;visibleThreshold&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;                &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;currentPage&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;++&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;                &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;downloadRecordsTask&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;na&#34;&gt;setPage&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;currentPage&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;                &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;downloadRecordsTask&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;na&#34;&gt;execute&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;();&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;            &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;        &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;    &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;In this solution, I simply implement OnScrollListener interface inside the activity, which is responsible for displaying the ListView (class presented above can be nested class in the proper activity class). In this case listView attribute represents ListView and downloadRecordsTask in an examplary AsyncTask. Of course, AsyncTask class should also have setPage method used for pagination. Records are loaded asynchronously to the listView, when user is not scrolling the list (&lt;code&gt;SCROLL_STATE_IDLE&lt;/code&gt;). In my opinion, this solution is the simplest, the easiest to implement and works as we expect it to work. I have tested it in my project for over 1000 records and I have not encountered any problems during the testing process.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Custom background for ActionBar and SherlockActionBar</title>
      <link>https://wittchen.io/notes/custom-background-for-actionbar-and-sherlockactionbar/</link>
      <pubDate>Fri, 01 Feb 2013 22:31:00 +0000</pubDate>
      <guid>https://wittchen.io/notes/custom-background-for-actionbar-and-sherlockactionbar/</guid>
      <description>&lt;p&gt;When you want to set custom background for Android ActionBar or SherlockActionBar instead of playing with your styles or views, you can use the following simple code snippet.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-java&#34; data-lang=&#34;java&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nd&#34;&gt;@InjectResource&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;R&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;na&#34;&gt;drawable&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;na&#34;&gt;actionbar_custom_background&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kd&#34;&gt;private&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Drawable&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;actionBarCustomBackground&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kd&#34;&gt;public&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;kt&#34;&gt;void&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nf&#34;&gt;onCreate&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;  &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;getSupportActionBar&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;().&lt;/span&gt;&lt;span class=&#34;na&#34;&gt;setBackgroundDrawable&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;actionBarCustomBackground&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;In this case, Drawable object is injected using RoboGuice library and set as a background for the ActionBar. In particular cases, you can use also getActionBar() method.
In Drawable object you can store an image of 1 px width and it will be stretched for 100% of width of the ActionBar.
I have tested the code snippet presented above for SherlockActionBar and it worked fine.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Custom fonts in Android</title>
      <link>https://wittchen.io/notes/custom-fonts-in-android/</link>
      <pubDate>Thu, 31 Jan 2013 23:45:00 +0000</pubDate>
      <guid>https://wittchen.io/notes/custom-fonts-in-android/</guid>
      <description>&lt;p&gt;Using custom fonts in Android is quite simple, but requires to do some things programmatically and cannot be done using only XML file defining the view. Let&amp;rsquo;s have a look on an example. Here we have a simple Android view file:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-xml&#34; data-lang=&#34;xml&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;cp&#34;&gt;&amp;lt;?xml version=&amp;#34;1.0&amp;#34; encoding=&amp;#34;utf-8&amp;#34;?&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nt&#34;&gt;&amp;lt;LinearLayout&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;xmlns:android=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;http://schemas.android.com/apk/res/android&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;na&#34;&gt;android:orientation=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;vertical&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;na&#34;&gt;android:layout_width=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;fill_parent&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;na&#34;&gt;android:layout_height=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;fill_parent&amp;#34;&lt;/span&gt; &lt;span class=&#34;nt&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;nt&#34;&gt;&amp;lt;TextView&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;na&#34;&gt;android:id=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;@+id/custom_font&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;na&#34;&gt;android:layout_width=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;fill_parent&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;na&#34;&gt;android:layout_height=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;wrap_content&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;na&#34;&gt;android:text=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;This is our custom font&amp;#34;&lt;/span&gt; &lt;span class=&#34;nt&#34;&gt;/&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nt&#34;&gt;&amp;lt;/LinearLayout&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;We want to use custom font for the TextView element with id: &lt;em&gt;custom_font&lt;/em&gt;. Firstly, we have to put our font (in this example: &lt;em&gt;Custom_Font.ttf&lt;/em&gt;) into the &lt;em&gt;./assets&lt;/em&gt; directory (create it if it doesn’t exist yet) in the main directory of the project. Then, we can use the following code:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Android and Maven</title>
      <link>https://wittchen.io/notes/android-and-maven/</link>
      <pubDate>Thu, 24 Jan 2013 23:50:00 +0000</pubDate>
      <guid>https://wittchen.io/notes/android-and-maven/</guid>
      <description>&lt;h2 id=&#34;overview&#34;&gt;Overview&lt;/h2&gt;
&lt;h3 id=&#34;etymology&#34;&gt;Etymology&lt;/h3&gt;
&lt;p&gt;Maven, a &lt;a href=&#34;http://en.wikipedia.org/wiki/Maven&#34;&gt;Yiddish&lt;/a&gt; word meaning accumulator of knowledge.&lt;/p&gt;
&lt;h3 id=&#34;what-is-maven&#34;&gt;What is Maven?&lt;/h3&gt;
&lt;p&gt;&lt;a href=&#34;http://maven.apache.org/&#34;&gt;Maven&lt;/a&gt; is a tool that can be used for building and managing any Java-based project with all its dependencies (libraries).&lt;/p&gt;
&lt;h3 id=&#34;mavens-objectives&#34;&gt;Maven&amp;rsquo;s objectives&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Making build process easy&lt;/li&gt;
&lt;li&gt;Providing uniform build system (Project Object Model)&lt;/li&gt;
&lt;li&gt;Providing quality project information&lt;/li&gt;
&lt;li&gt;Providing guidelines for best practices development&lt;/li&gt;
&lt;li&gt;Allowing transparent migration to new features&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;setting-up-maven-android-projects-on-ms-windows&#34;&gt;Setting up Maven Android projects on MS Windows&lt;/h2&gt;
&lt;h3 id=&#34;configuring-environment&#34;&gt;Configuring environment&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;You need Eclipse Indigo or Juno installed&lt;/p&gt;</description>
    </item>
    <item>
      <title>Fixing bug with dissappearing map overlay after zoom in Android</title>
      <link>https://wittchen.io/notes/fixing-bug-with-dissappearing-map-overlay-after-zoom-in-android/</link>
      <pubDate>Mon, 21 Jan 2013 22:16:00 +0000</pubDate>
      <guid>https://wittchen.io/notes/fixing-bug-with-dissappearing-map-overlay-after-zoom-in-android/</guid>
      <description>&lt;p&gt;In Android 3.0 – HoneyComb (API 11) or higher occurs specific bug connected with map overlay. When we draw overlay on the map (e.g. routes, directions or polylines) after zooming to particular level, overlay disappear unexpectedly. We can fix this bug very easily by disabling hardware acceleration for drawing overlays. Below, you can see exemplary code snippet with map injected by RoboGuice and disabled hardware acceleration. Changing way of drawing overlays should fix the bug.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
