<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
	<title>Android and beyond !</title>
	<link>https://www.xgouchet.fr/android/</link>
	<language>en</language>
	<description>Code snippets, Apps, Tools</description>
<atom:link xmlns:atom="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="https://www.xgouchet.fr/android/feed.php?rss" />
	<lastBuildDate>Wed, 04 Jun 2014 09:10:00 +0200</lastBuildDate>
	<generator>PluXml</generator>
	<item>
		<title>A developer&#039;s tool : Codota / Livecode</title> 
		<link>https://www.xgouchet.fr/android/index.php?article44/a-developer-s-tool-codota-livecode</link>
		<guid>https://www.xgouchet.fr/android/index.php?article44/a-developer-s-tool-codota-livecode</guid>
		<description>&lt;p&gt;&lt;a href=&quot;http://www.codota.com&quot;/&gt;Codota&lt;/a&gt; is a website proposing Android code snippets on various subjects. Although they don&#039;t have much content yet, the idea seems great. Anyway I&#039;m more interested in their &lt;strong&gt;new  Chrome Extension : &lt;a href=&quot;http://www.codota.com/livecode/&quot;&gt;Livecode&lt;/a&gt;&lt;/strong&gt;.&lt;/p&gt;
&lt;p class=&quot;center&quot;&gt;

&lt;img src=&quot;https://www.xgouchet.fr/android/data/images/livecode-screenshot2.png&quot; alt=&quot;Codota Livecode&quot; /&gt;
&lt;/p&gt;
&lt;p&gt;
This extension will make all Android classes and methods clickable on Codota an Stackoverflow. Clicking will then display the official documentation of the class / method directly. This is just a great tool when you spend your time on StackOverflow !&lt;/p&gt;</description>
		<pubDate>Wed, 04 Jun 2014 09:10:00 +0200</pubDate>
		<dc:creator>Xavier Gouchet</dc:creator>
	</item>
	<item>
		<title>A developer&#039;s tool : Screenshot Cleaner</title> 
		<link>https://www.xgouchet.fr/android/index.php?article43/a-developer-s-tool-screenshot-cleaner</link>
		<guid>https://www.xgouchet.fr/android/index.php?article43/a-developer-s-tool-screenshot-cleaner</guid>
		<description>&lt;p&gt;When deploying an app on a Store, be it Google&#039;s Play Store or Amazon&#039;s, or any other, a developer needs to create goodlooking screenshots. And often, the screenshot is not as clean as it can, mainly because of the status bar, showing a low battery, or numerous icons (unread mails, social network notifications, ...). &lt;/p&gt;

&lt;p class=&quot;center&quot;&gt;&lt;a href=&quot;https://play.google.com/store/apps/details?id=com.wazabe.screenshotcleaner&quot;&gt;&lt;img src=&quot;http://xgouchet.fr/android/data/images/screenshot_cleaner.png&quot; alt=&quot;Screenshot Cleaner&quot;/&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://play.google.com/store/apps/details?id=com.wazabe.screenshotcleaner&quot;&gt;Screenshot Cleaner&lt;/a&gt; takes your screenshot and cleans the status bar, making your screenshots look professional.&lt;/p&gt;

&lt;p&gt;Source : &lt;a href=&quot;https://twitter.com/francoisblavoet&quot;&gt;@francoisblavoet&lt;/a&gt;&lt;/p&gt;</description>
		<pubDate>Mon, 02 Jun 2014 10:53:00 +0200</pubDate>
		<dc:creator>Xavier Gouchet</dc:creator>
	</item>
	<item>
		<title>Launch intents using ADB</title> 
		<link>https://www.xgouchet.fr/android/index.php?article42/launch-intents-using-adb</link>
		<guid>https://www.xgouchet.fr/android/index.php?article42/launch-intents-using-adb</guid>
		<description>&lt;p&gt;
Sometimes, you want an Activity or a Broadcast Receiver to listen for a specific intent, which is not always easy to test. There are some applications, like &lt;a href=&quot;https://play.google.com/store/apps/details?id=com.zachklipp.intentsendertool&quot;&gt;With Intent&lt;/a&gt; which let you declare and send an intent. But you then need to be outside of your app. 
&lt;/p&gt;
&lt;p&gt;
I just discovered that you can use ADB to send an intent to any device (physical or emulated). Here are a couple of sample command you can run in your shell (assuming your sdk/platfor-tools is in your path) to start activities. 
&lt;/p&gt;

&lt;pre class=&quot;code&quot;&gt;
&lt;code class=&quot;shell ruby&quot;&gt;
# specifying the action and data uri
adb shell am start -a &quot;android.intent.action.VIEW&quot; -d &quot;http://developer.android.com&quot;

# specifying the action, mime type and an extra string 
adb shell am start -a &quot;android.intent.action.SEND&quot; --es &quot;android.intent.extra.TEXT&quot; &quot;Hello World&quot; -t &quot;text/plain&quot;

# specifying an explicit component name 
adb shell am start -n &quot;com.example.application/.MainActivity&quot;
&lt;/code&gt;
&lt;/pre&gt;

&lt;p&gt;
And of course you can also start a service or broacast an intent
&lt;/p&gt;

&lt;pre class=&quot;code&quot;&gt;
&lt;code class=&quot;shell ruby&quot;&gt;
# specifying an explicit component name 
adb shell am startservice -n &quot;com.example.application/.BackgroundService&quot;

# specifying the action
adb shell am broadcast -a &quot;android.intent.action.PACKAGE_FIRST_LAUNCH&quot; -d &quot;com.example.application&quot;
&lt;/code&gt;
&lt;/pre&gt;

&lt;p&gt;
You&#039;ll find all the options you can use in the &lt;a href=&quot;http://developer.android.com/tools/help/adb.html#am&quot;&gt;Official Documentation&lt;/a&gt;.
&lt;/p&gt;</description>
		<pubDate>Thu, 15 May 2014 14:42:00 +0200</pubDate>
		<dc:creator>Xavier Gouchet</dc:creator>
	</item>
	<item>
		<title>Android NDK tips</title> 
		<link>https://www.xgouchet.fr/android/index.php?article41/android-ndk-tips</link>
		<guid>https://www.xgouchet.fr/android/index.php?article41/android-ndk-tips</guid>
		<description>&lt;p&gt;The Android NDK can get really powerful, but one of the few drawbacks is that the &lt;code&gt;Android.mk&lt;/code&gt; configuration file must list the source files. And if your project contains too many files, it can get quite difficult to maintain. Here&#039;s a little tip to list the files in a JNI source trees that is more readable, and more maintainable. &lt;/p&gt;

&lt;p&gt;Here&#039;s your default &lt;code&gt;Android.mk&lt;/code&gt; file&lt;/p&gt;

&lt;pre class=&quot;code&quot;&gt;&lt;code class=&quot;Makefile&quot;&gt;
   LOCAL_PATH := $(call my-dir)

   include $(CLEAR_VARS)

   LOCAL_MODULE    := hello-jni
   LOCAL_SRC_FILES := hello-jni.c foo/spam.c  foo/eggs.c foo/bacon.c bar/banana.c 

   include $(BUILD_SHARED_LIBRARY)
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Assuming you have folders foo and bar inside your jni folders, each with many source files, here&#039;s how you can list all your sources. First create a &lt;code&gt;sources.mk&lt;/code&gt; file in each subfolder, with the following code in it : &lt;/p&gt;

&lt;pre class=&quot;code&quot;&gt;&lt;code class=&quot;Makefile&quot;&gt;
LOCAL_SRC_FILES += foo/spam.c  foo/eggs.c foo/bacon.c
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Then modify the &lt;code&gt;Android.mk&lt;/code&gt; file that resides in your jni folder like this ; &lt;/p&gt;

&lt;pre class=&quot;code&quot;&gt;&lt;code class=&quot;Makefile&quot;&gt;
   LOCAL_PATH := $(call my-dir)

   include $(CLEAR_VARS)

   LOCAL_MODULE    := hello-jni
   LOCAL_SRC_FILES := hello-jni.c

   include $(LOCAL_PATH)/foo/sources.mk

   include $(BUILD_SHARED_LIBRARY)
&lt;/code&gt;&lt;/pre&gt;</description>
		<pubDate>Wed, 23 Apr 2014 11:35:00 +0200</pubDate>
		<dc:creator>Xavier Gouchet</dc:creator>
	</item>
	<item>
		<title>My own Muzei extension : MuzeiDeezerAlbums</title> 
		<link>https://www.xgouchet.fr/android/index.php?article40/my-own-muzei-extension-muzeideezeralbums</link>
		<guid>https://www.xgouchet.fr/android/index.php?article40/my-own-muzei-extension-muzeideezeralbums</guid>
		<description>&lt;p&gt;So, a couple of weeks earlier, Roman Nurik released an Android Live Wallpaper allowing other developers to create plugins. If you don&#039;t know it already, &lt;a href=&quot;https://play.google.com/store/apps/details?id=net.nurik.roman.muzei&quot;&gt;check it out&lt;/a&gt;, as well as the &lt;a href=&quot;https://play.google.com/store/search?q=muzei%20extension&amp;c=apps&quot;&gt;extensions&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;As soon as it got out, I knew I wanted to play with this new toy, and it was not hard to get an idea of extension to do. As I work at Deezer, I thought &quot;Hey, let&#039;s use album covers as wallpapers!&quot;. A little bit of code later, and here is my contribution to Muzei : &lt;strong&gt;MuzeiDeezerAlbums&lt;/strong&gt;. &lt;/p&gt;

&lt;p style=&quot;text-align:center&quot;&gt;
&lt;img src=&quot;https://www.xgouchet.fr/android/data/images/screenshot_muzei_deezer.png&quot; alt=&quot;MuzeiDeezerAlbums&quot; /&gt;
&lt;/p&gt;

&lt;p&gt;
Albums displayed can be selected four different ways : 
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt; from Deezer&#039;s weekly selection, categorized by genres; &lt;/li&gt;
&lt;li&gt; from your own selection of album covers; &lt;/li&gt;
&lt;li&gt; from the last track you listen to with Deezer (if you don&#039;t have it, check it out here https://play.google.com/store/apps/details?id=deezer.android.app);&lt;/li&gt;
&lt;li&gt; from your favorite albums (requires you to log in).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And as always, if you have any trouble with one of my app or one of my repo on github, please let me know.&lt;/p&gt;

&lt;p&gt;
&lt;a href=&quot;http://play.google.com/store/apps/details?id=fr.xgouchet.deezer.muzei&quot;&gt;&lt;img alt=&quot;Android app on Google Play&quot; src=&quot;http://developer.android.com/images/brand/en_generic_rgb_wo_60.png&quot; /&gt;&lt;/a&gt;

&lt;a href=&quot;https://github.com/xgouchet/MuzeiDeezerAlbums&quot;&gt;
&lt;img src=&quot;https://www.xgouchet.fr/android/data/images/github.png&quot; alt=&quot;Fork me on GitHub&quot; /&gt;
&lt;/a&gt;
&lt;/p&gt;</description>
		<pubDate>Tue, 25 Feb 2014 11:31:00 +0100</pubDate>
		<dc:creator>Xavier Gouchet</dc:creator>
	</item>
	<item>
		<title>Taming the LogCat (part 3)</title> 
		<link>https://www.xgouchet.fr/android/index.php?article39/taming-the-logcat-part-3</link>
		<guid>https://www.xgouchet.fr/android/index.php?article39/taming-the-logcat-part-3</guid>
		<description>&lt;p&gt;Those who have used the adb tool might have stumbled upon the following message : &lt;/p&gt;
&lt;pre class=&quot;code&quot;&gt;&lt;code class=&quot;no-highlight&quot;&gt;
$ adb logcat
     - waiting for device -
     error: more than one device and emulator
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;In such case, you need to find, then specify the device&#039;s serial like this : &lt;/p&gt;
&lt;pre class=&quot;code&quot;&gt;&lt;code class=&quot;no-highlight&quot;&gt;

$ adb devices -l
    List of devices attached 
    XXX900AKC2             device usb:3-1.3 product:falcon model:XT1032 device:falcon_umts
    XXXBDAD913017009       device usb:1-1   product:yakju  model:Nexus  device:maguro

$ adb logcat -s XXXBDAD913017009
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Here I used the logcat command but it&#039;s the same thing when you want to install an apk or pull a file from a device. &lt;/p&gt;

&lt;p&gt;I&#039;ve just discovered that if you don&#039;t specify a serial, adb will look for an environment variable named &lt;strong&gt;ANDROID_SERIAL&lt;/strong&gt; to know which device to use. If you&#039;re often using several devices in USB, you can just add the following aliases to your .bashrc file.&lt;/p&gt;

&lt;pre class=&quot;code&quot;&gt;&lt;code class=&quot;shell&quot;&gt;
# ANDROID DEVICES SERIAL NUMBERS
alias adb-use-galaxy-nexus=&#039;export ANDROID_SERIAL=XXXBDAD913017009&#039;
alias adb-use-moto-g=&#039;export ANDROID_SERIAL=XXX900AKC2&#039;
alias reset-android-serial=&#039;unset ANDROID_SERIAL&#039;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;When using the adb logcat command, you can also set in the &lt;strong&gt;ANDROID_LOG_TAGS&lt;/strong&gt; environment variable a list of tag/severity filter, like in the following example. &lt;/p&gt;


&lt;pre class=&quot;code&quot;&gt;&lt;code class=&quot;shell&quot;&gt;
# suppresses all log messages except those with the tag &quot;ActivityManager&quot;, at priority &quot;Info&quot; or above, and all log messages with tag &quot;MyApp&quot;, with priority &quot;Debug&quot; or above
export ANDROID_LOG_TAGS=&quot;ActivityManager:I MyApp:D *:S&quot;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;These tips are fully compatible with the &lt;a href=&quot;http://xgouchet.fr/android/index.php?article34&quot;&gt;PidCat tool&lt;/a&gt; I talked about earlier. &lt;/p&gt;</description>
		<pubDate>Fri, 31 Jan 2014 12:05:00 +0100</pubDate>
		<dc:creator>Xavier Gouchet</dc:creator>
	</item>
	<item>
		<title>A developer&#039;s tool : Grid Wichterle</title> 
		<link>https://www.xgouchet.fr/android/index.php?article38/a-developer-s-tool-grid-wichterle</link>
		<guid>https://www.xgouchet.fr/android/index.php?article38/a-developer-s-tool-grid-wichterle</guid>
		<description>&lt;p&gt;Many apps exists to enforce good UI design in Android Apps, some embedded in the developper settings screen. This app is a small simple app that you can add to your toolbox. &lt;/p&gt;

&lt;p class=&quot;center&quot;&gt;
&lt;a href=&quot;https://github.com/inmite/android-grid-wichterle&quot;&gt;&lt;a href=&quot;https://www.xgouchet.fr/android/data/images/screenshot.png&quot;&gt;&lt;img src=&quot;https://www.xgouchet.fr/android/data/images/screenshot.tb.png&quot; alt=&quot;Grid Wichterle&quot; /&gt;&lt;/a&gt;&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;As you can see on the screenshot above, &lt;strong&gt;the app draws a grid above your Android UI&lt;/strong&gt;, to let you see if your views are aligned following the design guidelines.&lt;/p&gt;

&lt;p&gt;The project is Open Sourced on &lt;a href=&quot;https://github.com/inmite/android-grid-wichterle&quot;&gt;Github&lt;/a&gt; and can be downloaded on the &lt;a href=&quot;https://play.google.com/store/apps/details?id=eu.inmite.android.gridwichterle&quot;&gt;Google Play Store&lt;/a&gt;&lt;/p&gt;</description>
		<pubDate>Tue, 12 Nov 2013 11:01:00 +0100</pubDate>
		<dc:creator>Xavier Gouchet</dc:creator>
	</item>
	<item>
		<title>Meanwhile on the Google Play Store</title> 
		<link>https://www.xgouchet.fr/android/index.php?article35/meanwhile-on-the-google-play-store</link>
		<guid>https://www.xgouchet.fr/android/index.php?article35/meanwhile-on-the-google-play-store</guid>
		<description>&lt;p class=&quot;center&quot;&gt;
&lt;a href=&quot;https://play.google.com/store/apps/details?id=useless.button&quot;&gt;
&lt;img src=&quot;https://www.xgouchet.fr/android/data/images/useless.png&quot; alt=&quot;Useless Button&quot; /&gt;
&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
It&#039;s not one of my app, but I think that it might be a good idea to start making money... Or not...
&lt;/p&gt;</description>
		<pubDate>Mon, 16 Sep 2013 11:37:00 +0200</pubDate>
		<dc:creator>Xavier Gouchet</dc:creator>
	</item>
	<item>
		<title>A developer tool : taming the logcat with pidcat</title> 
		<link>https://www.xgouchet.fr/android/index.php?article34/a-developer-tool-taming-the-logcat-with-pidcat</link>
		<guid>https://www.xgouchet.fr/android/index.php?article34/a-developer-tool-taming-the-logcat-with-pidcat</guid>
		<description>&lt;p&gt;LogCat is a great logging feature which is part of the core &lt;em&gt;Android Developper Experience&amp;trade;&lt;/em&gt;. Most of us using an IDE use the DDMS tool to view the LogCat outputs. Some might also use directly the console with &lt;code class=&quot;bash&quot;&gt;adb logcat -v long&lt;/code&gt;, with maybe some &lt;code&gt;grep&lt;/code&gt; or &lt;code&gt;awk&lt;/code&gt; to enhance the result. &lt;/p&gt;


&lt;p&gt;Well &lt;strong&gt;Jake Wharton&lt;/strong&gt; (you know, the guy behind ActionBarSherlock) developped &lt;a href=&quot;https://github.com/JakeWharton/pidcat&quot;&gt;&lt;strong&gt;PidCat&lt;/strong&gt;&lt;/a&gt;, a Python script to print the LogCat output in the console in a usefull way. Here&#039;s how it looks like. &lt;/p&gt;

&lt;p class=&quot;center&quot;&gt;
&lt;a href=&quot;https://www.xgouchet.fr/android/data/images/pidcat_screen.png&quot;&gt;&lt;img src=&quot;https://www.xgouchet.fr/android/data/images/pidcat_screen.tb.png&quot; alt=&quot;PidCat Screenshot&quot; /&gt;&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;After a couple of day, I find it better than DDMS LogCat view. And what&#039;s great is that it&#039;s Open Source, so I&#039;ll probably add some features in it myself. You can download it or fork it from &lt;a href=&quot;https://github.com/JakeWharton/pidcat&quot;&gt;PidCat Github Repository&lt;/a&gt;. &lt;/p&gt;</description>
		<pubDate>Wed, 11 Sep 2013 13:17:00 +0200</pubDate>
		<dc:creator>Xavier Gouchet</dc:creator>
	</item>
	<item>
		<title>Secret Phone number</title> 
		<link>https://www.xgouchet.fr/android/index.php?article33/secret-phone-number</link>
		<guid>https://www.xgouchet.fr/android/index.php?article33/secret-phone-number</guid>
		<description>&lt;p&gt;So maybe you already know that some secret phone numbers are hidden in Android. For instance, if you dial &lt;strong&gt;*#*#4636#*#*&lt;/strong&gt; on your Android phone&lt;sup&gt;1&lt;/sup&gt;, you&#039;ll access a secret settings panel. &lt;/p&gt;

&lt;p&gt;But did you know that you can add this feature in your own android application ? Basically, you can setup a BroadcastReceiver to listen to a secret number and then launch a hidden Activity. This can be used to unlock some beta features or access developper options on your app. Or just add an easter egg to your phone. &lt;/p&gt;

&lt;p&gt;To do that, you simply need to declare your BroadcastReceiver in your manifest, like this : &lt;/p&gt;


&lt;pre class=&quot;code&quot;&gt;&lt;code class=&quot;xml&quot;&gt;    &amp;lt;!-- Secret receiver --&gt;
    &amp;lt;receiver android:name=&quot;.MySecretBroadcastReceiver&quot; &gt;
        &amp;lt;intent-filter&gt;
            &amp;lt;action android:name=&quot;android.provider.Telephony.SECRET_CODE&quot; /&gt;
            &amp;lt;data
                android:host=&quot;1337&quot;
                android:scheme=&quot;android_secret_code&quot; /&gt;
        &amp;lt;/intent-filter&gt;
    &amp;lt;/receiver&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;After that, you simply need to handle the corresponding Intent in your BroadcastReceiver : &lt;/p&gt;

&lt;pre class=&quot;code&quot;&gt;&lt;code class=&quot;java&quot;&gt;
public class MySecretBroadcastReceiver extends BroadcastReceiver {

	@Override
	public void onReceive(Context context, Intent intent) {
		if (intent.getAction().equals(&quot;android.provider.Telephony.SECRET_CODE&quot;)) {
			// Do something in here
		}
	}

}
&lt;/code&gt;&lt;/pre&gt;</description>
		<pubDate>Wed, 14 Aug 2013 16:16:00 +0200</pubDate>
		<dc:creator>Xavier Gouchet</dc:creator>
	</item>
	<item>
		<title>A designer tool : UI Stencils</title> 
		<link>https://www.xgouchet.fr/android/index.php?article32/a-designer-tool-ui-stencils</link>
		<guid>https://www.xgouchet.fr/android/index.php?article32/a-designer-tool-ui-stencils</guid>
		<description>&lt;p&gt;A couple of months ago, I stumbled upon pdf with an outline of Android phone / tablet (and other fruity devices too) used to design apps on paper before writing a line of code. For the curious, those files are still &lt;a href=&quot;http://uxdesign.smashingmagazine.com/2012/09/18/free-download-ux-sketching-wireframing-templates-mobile/&quot;&gt;available online&lt;/a&gt;. &lt;/p&gt;
&lt;p&gt;Today I found the ultimate tool for a designer : the &lt;strong&gt;&lt;a href=&quot;http://www.uistencils.com/products/android-stencil-kit&quot;&gt;Android Stencil Kit&lt;/a&gt;&lt;/strong&gt; (and yes, they also have other OS covered too). &lt;/p&gt;
&lt;p style=&quot;text-align:center&quot;&gt;
&lt;a href=&quot;http://www.uistencils.com/products/android-stencil-kit&quot;&gt;&lt;img src=&quot;https://www.xgouchet.fr/android/data/images/andriod-handset-8_1024x1024.tb.jpg&quot; alt=&quot;Android Stencil Kit&quot; /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;So yeah, it&#039;s my birthday soon, so I guess I&#039;ll make myself a gift... &lt;/p&gt;
&lt;p&gt;Source: &lt;a href=&quot;http://www.spawnrider.net/blogs/2013/04/18/des-ressources-pour-webmobile-designer&quot;&gt;Spawn Rider&lt;/a&gt;&lt;/p&gt;</description>
		<pubDate>Thu, 18 Apr 2013 12:01:00 +0200</pubDate>
		<dc:creator>Xavier Gouchet</dc:creator>
	</item>
	<item>
		<title>The Google Play Store™ is starting to remove Android™ apps</title> 
		<link>https://www.xgouchet.fr/android/index.php?article31/the-google-play-store-is-starting-to-remove-android-apps</link>
		<guid>https://www.xgouchet.fr/android/index.php?article31/the-google-play-store-is-starting-to-remove-android-apps</guid>
		<description>&lt;p&gt;The Google Play Store contains more than 700&#039;000 apps for Android, a number which slowly grew since 2008 when the first Android phone was released. &lt;/p&gt;
&lt;p&gt;In february, the Play Store saw the removal of around 60&#039;000 apps, most of them automatically removed by Google itself. Most of those apps were spam apps, so no one will mourn for them. &lt;/p&gt;
&lt;p&gt;Today, I learnt that the &lt;em&gt;Android UI Patterns&lt;/em&gt; which I &lt;a href=&quot;http://xgouchet.fr/android/index.php?article7/a-developper-tool-android-ui-patterns&quot;&gt;presented on this blog&lt;/a&gt; was removed due to a &lt;q&gt;&lt;em&gt;Violation of the intellectual property&lt;/em&gt;&lt;/q&gt;. &lt;/p&gt;
&lt;p&gt;Following the author&#039;s &lt;a href=&quot;https://plus.google.com/u/0/108176685096570584154/posts/bRzj146TnWK&quot;&gt;post on G+&lt;/a&gt; and on the &lt;a href=&quot;https://plus.google.com/u/0/116710244628127765142/posts/RJYwtni78m7&quot;&gt;Android developpers&lt;/a&gt; community, I learnt that the reason for this removal is the name of the app. &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt; &quot;Android&quot; by itself cannot be used in the name of an application name or accessory product. Instead use &quot;for Android.&quot;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;color:red&quot;&gt;Incorrect&lt;/span&gt;: &quot;Android MediaPlayer&quot;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color:green&quot;&gt;Correct&lt;/span&gt;: &quot;MediaPlayer for Android&quot;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If used with your logo, &quot;for Android&quot; needs to be smaller in size than your logo.
First instance of this use should be followed by a TM symbol, &quot;for Android&amp;trade;&quot;.&lt;/p&gt;
&lt;footer&gt;&amp;mdash; Quoting from the &lt;cite&gt;&lt;a href=&quot;http://developer.android.com/distribute/googleplay/promote/brand.html&quot;&gt;Branding Guidelines&lt;/a&gt;&lt;/cite&gt;&lt;/footer&gt;
&lt;/blockquote&gt;

&lt;p&gt;Needless to say that I immediatly reviewed all my apps descriptions to make sure that I followed the &lt;a href=&quot;http://developer.android.com/distribute/googleplay/promote/brand.html&quot;&gt;Branding Guidelines&lt;/a&gt; and &lt;a href=&quot;http://developer.android.com/distribute/googleplay/policies/index.html&quot;&gt;Policies&lt;/a&gt; from the Android documentation. &lt;/p&gt;</description>
		<pubDate>Wed, 17 Apr 2013 08:30:00 +0200</pubDate>
		<dc:creator>Xavier Gouchet</dc:creator>
	</item>
	<item>
		<title>Un nouveau design pour le Kamoulox</title> 
		<link>https://www.xgouchet.fr/android/index.php?article29/un-nouveau-design-pour-le-kamoulox</link>
		<guid>https://www.xgouchet.fr/android/index.php?article29/un-nouveau-design-pour-le-kamoulox</guid>
		<description>&lt;h3&gt;&lt;em&gt;This article is written in French as the app is in French only&lt;/em&gt;&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Kamoulox&lt;/strong&gt; est une de mes applications les plus loufoques. Directement inspirée des vidéos absurdes de Kad et Olivier, l&#039;application permet de générer des milliers de phrases permettant de jouer au Kamoulox selon les règles officielles du jeu, ainsi que les règles locales de Bourcefranc le Chapus (Charente-Maritime), d’Arnac-la-Poste (Haute-Vienne) et évidemment Bézaudun-sur-Bîne (Drome). &lt;/p&gt;

&lt;p style=&quot;text-align:center&quot;&gt;
&lt;img src=&quot;https://www.xgouchet.fr/android/data/images/promo_kamoulox_old_small.png&quot; alt=&quot;Kamoulox, version 2010&quot; /&gt;
&lt;/p&gt;

&lt;p&gt;Cette application a été écrite en 2010, et malgré quelques mises à jour, a peu évolué en terme de design. Aujourd&#039;hui, grâce à l&#039;aide de JF Tolaguera, je vous propose une toute nouvelle version du Kamoulox entièrement redesigné. &lt;/p&gt;

&lt;p style=&quot;text-align:center&quot;&gt;
&lt;img src=&quot;https://www.xgouchet.fr/android/data/images/promo_kamoulox_new_small.png&quot; alt=&quot;Kamoulox, version 2013&quot; /&gt;
&lt;/p&gt;

&lt;p&gt;
Bien évidemment vous pouvez retrouver l&#039;application depuis le &lt;a href=&quot;http://play.google.com/store/apps/details?id=fr.xgouchet.kamoulox&quot;&gt;Google Play Store&lt;/a&gt; en cliquant sur le lien ci dessous. Et si vous avez un souci, une remarque, ou une question sur les règles du Kamoulox à Chaumont sur Tharonne, n&#039;hésitez pas à me contacter !
&lt;/p&gt;
&lt;p&gt;
&lt;a href=&quot;http://play.google.com/store/apps/details?id=fr.xgouchet.kamoulox&quot;&gt;&lt;img alt=&quot;Kamoulox on Google Play&quot; src=&quot;http://developer.android.com/images/brand/en_generic_rgb_wo_60.png&quot; /&gt;&lt;/a&gt;

&lt;/p&gt;</description>
		<pubDate>Sat, 30 Mar 2013 08:00:00 +0100</pubDate>
		<dc:creator>Xavier Gouchet</dc:creator>
	</item>
	<item>
		<title>A developer tool : DevApps Direct</title> 
		<link>https://www.xgouchet.fr/android/index.php?article30/a-developer-tool-devapps-direct</link>
		<guid>https://www.xgouchet.fr/android/index.php?article30/a-developer-tool-devapps-direct</guid>
		<description>&lt;p&gt;This is a somewhat similar app to &lt;a href=&quot;https://play.google.com/store/apps/details?id=com.groidify.uipatterns&quot;&gt;Android UI Patterns&lt;/a&gt; (which I &lt;a href=&quot;http://xgouchet.fr/android/index.php?article7/a-developper-tool-android-ui-patterns&quot;&gt;talked about earlier&lt;/a&gt;). The aim of &lt;strong&gt;&lt;a href=&quot;https://play.google.com/store/apps/details?id=com.inappsquared.devappsdirect&quot;&gt;DevApps Direct&lt;/a&gt;&lt;/strong&gt; is to list available libraries for Android developpers, with again a live demo feature. &lt;/p&gt;

&lt;p style=&quot;text-align:center&quot;&gt;
&lt;img src=&quot;https://www.xgouchet.fr/android/data/images/devappsdirect_2.png&quot; alt=&quot;DevAppsDirect&quot; /&gt;
&lt;/p&gt;
&lt;p&gt;What is really interesting is that it is built around an RSS feed, which you can still follow in any RSS Reader (well, not Google Reader obviously). The app itself will then  be able to get new libraries without having to update the app itself. &lt;/p&gt;

&lt;p style=&quot;text-align:center&quot;&gt;
&lt;img src=&quot;https://www.xgouchet.fr/android/data/images/devappsdirect_1.png&quot; alt=&quot;DevAppsDirect&quot; /&gt;
&lt;/p&gt;
&lt;p&gt;It will also download the libraries&#039; demo on demand, meaning that it won&#039;t use much of your space for nothing. Although it&#039;s still in beta, this app is very usefull to test many libraris, and keep some in your favorites&lt;/p&gt;

&lt;p&gt;As always, you can download it from the &lt;a href=&quot;https://play.google.com/store/apps/details?id=com.inappsquared.devappsdirect&quot;&gt;Google Play Store&lt;/a&gt;.&lt;/p&gt;</description>
		<pubDate>Fri, 29 Mar 2013 09:00:00 +0100</pubDate>
		<dc:creator>Xavier Gouchet</dc:creator>
	</item>
	<item>
		<title>A developer tool : Stanley (beta)</title> 
		<link>https://www.xgouchet.fr/android/index.php?article28/a-developer-tool-stanley-beta</link>
		<guid>https://www.xgouchet.fr/android/index.php?article28/a-developer-tool-stanley-beta</guid>
		<description>&lt;p&gt;Recently I needed to know what intents were used by an app on my phone, simply out of curiosity and to learn how to have similar features in one of my app. &lt;/p&gt;
&lt;p&gt;There aren&#039;t so many way to do this, and so I designed and developped an App to take a look at an App, from a developper point of view. So here it is, in public beta.&lt;/p&gt;
&lt;p class=&quot;center&quot;&gt;
&lt;img src=&quot;https://www.xgouchet.fr/android/data/images/framed_stanley_preview.png&quot; alt=&quot;Stanley Preview&quot; /&gt;
&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Stanley&lt;/strong&gt; can list all package installed on any device, and for any given package, lets one see the Activities, Services, Broadcast Receivers, Content Providers, and more.&lt;/p&gt;
&lt;p&gt;More over, it can &lt;strong&gt;export the package&#039;s original manifest&lt;/strong&gt; into a readable XML, to see what lies in the intent filters for instance.&lt;/p&gt;
&lt;p&gt;It is not yet available on the Play Store, but you can already try it by downloading the APK attached to this post. Any feedback on this app will be welcomed.&lt;/p&gt;

&lt;p&gt;
&lt;span style=&quot;text-decoration: line-through;&quot;&gt;Stanley 1.0 (Beta) APK (562 Kb)&lt;/span&gt;
&lt;/p&gt;

&lt;p&gt;
&lt;a href=&quot;http://play.google.com/store/apps/details?id=fr.xgouchet.packageexplorer&quot;&gt;&lt;img alt=&quot;Stanley on Google Play&quot; src=&quot;http://developer.android.com/images/brand/en_generic_rgb_wo_60.png&quot;&gt;&lt;/a&gt;

&lt;/p&gt;</description>
		<pubDate>Fri, 22 Mar 2013 13:30:00 +0100</pubDate>
		<dc:creator>Xavier Gouchet</dc:creator>
	</item>
	<item>
		<title>Enabling / Disabling activities at runtime</title> 
		<link>https://www.xgouchet.fr/android/index.php?article27/enabling-disabling-activities-at-runtime</link>
		<guid>https://www.xgouchet.fr/android/index.php?article27/enabling-disabling-activities-at-runtime</guid>
		<description>&lt;p&gt;Sometimes, you might want an activity to be available only under specific conditions. But you may want to completely disable it at runtime when some conditions are met. For instance based on the time, or the user geolocation.&lt;/p&gt;

&lt;p&gt;This could also let one have different activities based on the user&#039;s configuration&lt;/p&gt;

&lt;p&gt;You can do so simply by using the &lt;a href=&quot;https://developer.android.com/reference/android/content/pm/PackageManager.html&quot;&gt;PackageManager&lt;/a&gt;. In the following example, I disable an activity and enable another one. &lt;/p&gt;

&lt;pre class=&quot;code&quot;&gt;&lt;code class=&quot;java&quot;&gt;
PackageManager pm = getPackageManager();
pm.setComponentEnabledSetting(new ComponentName(this, ActivityC.class), 
    PackageManager.COMPONENT_ENABLED_STATE_ENABLED, 0);
pm.setComponentEnabledSetting(new ComponentName(this, ActivityA.class), 
    PackageManager.COMPONENT_ENABLED_STATE_DISABLED, 0);
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The manifest declares the two activities with the same intent filter, namely the home screen shortcut. But using the previous code, I&#039;m able to get a single one of them in the launcher menu at any given time. &lt;/p&gt;</description>
		<pubDate>Wed, 20 Feb 2013 08:00:00 +0100</pubDate>
		<dc:creator>Xavier Gouchet</dc:creator>
	</item>
	<item>
		<title>Axel v2.3 : quick actions and clipboard support</title> 
		<link>https://www.xgouchet.fr/android/index.php?article25/axel-v2-3-quick-actions-and-clipboard-support</link>
		<guid>https://www.xgouchet.fr/android/index.php?article25/axel-v2-3-quick-actions-and-clipboard-support</guid>
		<description>&lt;p&gt;Today, the latest version of Axel was launched, bringing many new features to make XML edition simpler. &lt;/p&gt;

&lt;h3&gt;New version&lt;/h3&gt;

&lt;p&gt;First of all, I added an implementation of the &lt;a href=&quot;http://www.androiduipatterns.com/2012/08/roman-nurik-on-done-discard.html&quot;&gt;Done / Discard&lt;/a&gt; UI pattern. This make a much clearer interface when editing a node. &lt;/p&gt;

&lt;p&gt;Then I added many ways to interact differently with nodes. A friend of mine once taught me that a user must be able to perform a single action in many different way, and better, should be able to change the way an action must be performed. &lt;/p&gt;


&lt;h3&gt;Quick Actions&lt;/h3&gt;
&lt;p&gt;So from now on, Axel lets you choose what happens when you tap, double tap or long press a node. By default, actions are edit on tap, add a child on double tap and bring the context menu on long press. &lt;/p&gt;

&lt;p style=&quot;text-align:center&quot;&gt;
&lt;img src=&quot;https://www.xgouchet.fr/android/data/images/axel_quick_actions.png&quot; alt=&quot;Axel : quick node actions&quot; /&gt;
&lt;/p&gt;

&lt;p&gt;Speaking of quick action, I used the &lt;a href=&quot;https://github.com/lorensiuswlt/NewQuickAction&quot;&gt;NewQuickAction&lt;/a&gt; library to add a better looking quick action. The same actions are available, with new ones.&lt;/p&gt;

&lt;h3&gt;Cut, Copy, Paste&lt;/h3&gt;
&lt;p&gt;A brand new feature is that Axel now support the integration with the Android clipboard, with the famous cut, copy and paste operations. Cut and copy will put the xml node (and hierarchy) as xml text in the clipboard, and psat will parse the clipboard content and insert it inside the selected node&#039;s hierarchy. &lt;/p&gt;

&lt;p&gt;And as always, if you have any trouble with one of my app or one of my repo on github, please let me know.&lt;/p&gt;

&lt;p&gt;
&lt;a href=&quot;http://play.google.com/store/apps/details?id=fr.xgouchet.xmleditor&quot;&gt;&lt;img alt=&quot;Android app on Google Play&quot; src=&quot;http://developer.android.com/images/brand/en_generic_rgb_wo_60.png&quot; /&gt;&lt;/a&gt;

&lt;a href=&quot;https://github.com/xgouchet/Axel&quot;&gt;
&lt;img src=&quot;https://www.xgouchet.fr/android/data/images/github.png&quot; alt=&quot;Fork me on GitHub&quot; /&gt;
&lt;/a&gt;
&lt;/p&gt;</description>
		<pubDate>Fri, 15 Feb 2013 18:00:00 +0100</pubDate>
		<dc:creator>Xavier Gouchet</dc:creator>
	</item>
	<item>
		<title>A developer tool : AndroidXRef</title> 
		<link>https://www.xgouchet.fr/android/index.php?article23/a-developer-tool-androidxref</link>
		<guid>https://www.xgouchet.fr/android/index.php?article23/a-developer-tool-androidxref</guid>
		<description>&lt;p&gt;The Android source code is full of information, and I never spend a week without having to find a piece of code in there. The problem with it is that I had to download the git repo, and to use my OS&#039;s search to find the relevant piece of code. &lt;/p&gt;
&lt;p&gt;Not anymore, thanks to &lt;strong&gt;&lt;a href=&quot;http://androidxref.com/&quot;&gt;AndroidXRef&lt;/a&gt;, a search engine for the Android Open Source Project&lt;/strong&gt;. Although it&#039;s still in beta, it is very usefull to find information on how things are implemented in Android. &lt;/p&gt;</description>
		<pubDate>Wed, 06 Feb 2013 18:10:00 +0100</pubDate>
		<dc:creator>Xavier Gouchet</dc:creator>
	</item>
	<item>
		<title>A more complete Activity Lifecycle</title> 
		<link>https://www.xgouchet.fr/android/index.php?article22/a-more-complete-activity-lifecycle</link>
		<guid>https://www.xgouchet.fr/android/index.php?article22/a-more-complete-activity-lifecycle</guid>
		<description>&lt;p&gt;In one of my application, I want to perform an action when the user has been idle for more than n minutes. &lt;/p&gt;
&lt;p&gt;While searching the web I found those two callbacks in the Activity class : &lt;strong&gt;onUserInteraction()&lt;/strong&gt; and &lt;strong&gt;onUserLeaveHint &lt;/strong&gt;, both available since Cupcake.&lt;/p&gt;
&lt;p&gt;The first one is simply called whenever an interaction is consumed by the activity : touch, key event, trackball event. The second is called just before onPause() when the user leaves your Activity on purpose. For example by pressing the home button, launching another activity from the notification bar. It won&#039;t be called when an Activity generated by the system comes in the foreground (an incoming phone call for instance). &lt;/p&gt;
&lt;p&gt;And there are a lot more callbacks in an Activity that one can override. So, after some extensive logging and reading through AOSP sources, here&#039;s a new and more complete Activity lifecycle graph, with all the callbacks one may find usefull. I also included the callbacks sent to an Activity&#039;s fragments. &lt;/p&gt;
&lt;p style=&quot;text-align:center&quot;&gt;
&lt;a href=&quot;https://www.xgouchet.fr/android/data/images/android-full-lifecycle.png&quot;&gt;&lt;img src=&quot;https://www.xgouchet.fr/android/data/images/android-full-lifecycle.tb.png&quot; alt=&quot;Android Full LifeCycle&quot; /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;Feel free to add any remark to make this diagram as accurate as possible. &lt;/p&gt;</description>
		<pubDate>Tue, 05 Feb 2013 11:09:00 +0100</pubDate>
		<dc:creator>Xavier Gouchet</dc:creator>
	</item>
	<item>
		<title>A developer tool : Quick REx , Eclipse Regexp Plugin</title> 
		<link>https://www.xgouchet.fr/android/index.php?article21/a-developer-tool-quick-rex-eclipse-regexp-plugin</link>
		<guid>https://www.xgouchet.fr/android/index.php?article21/a-developer-tool-quick-rex-eclipse-regexp-plugin</guid>
		<description>&lt;p&gt;Now and then, a little Regexp is necessary. Recently, I had to create a couple of regexp for my &lt;a href=&quot;https://play.google.com/store/apps/details?id=fr.xgouchet.xmleditor&quot;&gt;Android XML Editor&lt;/a&gt;. When the Regexp is complex, designing it from memory is almost impossible, and one needs a tool to write and test the Regexp. &lt;/p&gt;

&lt;p&gt;Here is a little Eclipse plugin I found recently. In short, it&#039;s a Regex editor, with a couple of useful features: &lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;preview of matches (and groups) in a user defined input;&lt;/li&gt;
&lt;li&gt;a button to escape the sequence to be parsed in a Java String;&lt;/li&gt;
&lt;li&gt;Ctrl-Space completion to insert common patterns, quantifiers, ...;&lt;/li&gt;
&lt;li&gt;flags and options to match Pattern options.&lt;/li&gt;
&lt;/ul&gt;

&lt;p style=&quot;text-align:center&quot;&gt;
&lt;img src=&quot;https://www.xgouchet.fr/android/data/images/quick_rex.png&quot; alt=&quot;Quick REx Eclipse plugin&quot; /&gt;
&lt;/p&gt;


&lt;p&gt;Checkout the official &lt;strong&gt;&lt;a href=&quot;http://www.bastian-bergerhoff.com/eclipse/features/web/QuickREx/toc.html&quot;&gt;Quick REx&lt;/a&gt;&lt;/strong&gt; website, or install it in Eclipse using the following update-site URL : &lt;a href=&quot;http://www.bastian-bergerhoff.com/eclipse/features&quot;&gt;http://www.bastian-bergerhoff.com/eclipse/features&lt;/a&gt;.&lt;/p&gt;</description>
		<pubDate>Fri, 01 Feb 2013 10:00:00 +0100</pubDate>
		<dc:creator>Xavier Gouchet</dc:creator>
	</item>
	<item>
		<title>Taming the LogCat</title> 
		<link>https://www.xgouchet.fr/android/index.php?article20/taming-the-logcat</link>
		<guid>https://www.xgouchet.fr/android/index.php?article20/taming-the-logcat</guid>
		<description>&lt;p&gt;
A couple of days ago, a question popped on StackOverflow, asking how to link a log line in LogCat to the source code, just like it happens when you Log an exception.
&lt;/p&gt;

&lt;p&gt;The first answers where to add a fake Exception. Naturally, there will be the line you want, but also a lot of noise in your LogCat.&lt;/p&gt;

&lt;p&gt;Then someone proposed a method to simulated an exception Log, without the whole stacktrace (see the &lt;a href=&quot;http://stackoverflow.com/questions/8067528/is-there-any-way-to-access-automatically-any-log-in-logcat-by-a-double-click/12242852#12242852&quot;&gt;answer here&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;The solution works fine, but can be quite verbose.  With a little bit of try and error, I found out that the most important part is  the &quot;at (file.java:42)&quot;. It doesn&#039;t matter where it is in the message. You can even have mor than one, it only takes into account the last one.&lt;/p&gt;

&lt;p&gt;So I worked out a LogLink class to use this systme anywhere and seamlessly. Here&#039;s an example of how it works : &lt;/p&gt;

&lt;pre class=&quot;code&quot;&gt;&lt;code  class=&quot;java&quot;&gt;
	// can be one of INSERT_FIRST, INSERT_LAST or INSERT_NONE
	// default value is INSERT_LAST, and you can call it only once
	LogUtils.setInsertMode(LogUtils.INSERT_LAST); 
	
	// also exist as v, d, w, e and wtf 
	LogUtils.i(&quot;MyClass&quot;, &quot;A message&quot;);
&lt;/code&gt;&lt;/pre&gt;
&lt;/blockquote&gt;

&lt;p&gt;The previous code will output the following output &lt;/p&gt;

&lt;p&gt;MyClass &amp;emsp; &amp;emsp; A message at (MyClass.java:42)&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;You can see and download the &lt;a href=&quot;https://gist.github.com/xgouchet/7139586&quot;&gt;LogUtils class here&lt;/a&gt; &lt;/p&gt;</description>
		<pubDate>Wed, 30 Jan 2013 08:49:00 +0100</pubDate>
		<dc:creator>Xavier Gouchet</dc:creator>
	</item>
</channel>
</rss>