<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>¿Rocapal or Lapacor?</title>
	<atom:link href="http://blog.rocapal.org/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://blog.rocapal.org</link>
	<description>Looking for a challenge</description>
	<lastBuildDate>Fri, 24 May 2013 11:23:26 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>RPI Camera Board</title>
		<link>http://blog.rocapal.org/?p=614</link>
		<comments>http://blog.rocapal.org/?p=614#comments</comments>
		<pubDate>Fri, 24 May 2013 11:23:26 +0000</pubDate>
		<dc:creator>rocapal</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.rocapal.org/?p=614</guid>
		<description><![CDATA[It&#8217;s a great pleasure have this cool gadget. This is the new RPI Camera Board, the essential part in every RPI project! The Raspberry Pi Camera Module is a custom designed add-on for Raspberry Pi. It attaches to Raspberry Pi by way of one of the two small sockets on the board upper surface. This interface [...]]]></description>
				<content:encoded><![CDATA[<p>It&#8217;s a great pleasure have this cool gadget. This is the new <a href="http://uk.farnell.com/raspberry-pi/rpi-camera-board/raspberry-pi-camera-board-5mp/dp/2302279">RPI Camera Board</a>, the essential part in every RPI project! The Raspberry Pi Camera Module is a custom designed add-on for Raspberry Pi. It attaches to Raspberry Pi by way of one of the two small sockets on the board upper surface. This interface uses the dedicated CSI interface, which was designed especially for interfacing to cameras. The CSI bus is capable of extremely high data rates, and it exclusively carries pixel data.</p>
<p style="text-align: center;"><a href="http://blog.rocapal.org/wp-content/uploads/2013/05/IMG_20130523_115254.jpg"><img class="aligncenter size-medium wp-image-616" alt="IMG_20130523_115254" src="http://blog.rocapal.org/wp-content/uploads/2013/05/IMG_20130523_115254-300x225.jpg" width="300" height="225" /></a></p>
<p>Some of its features:</p>
<ul>
<li><span style="line-height: 12.986111640930176px;">5 Megapixel Sensor 2592 x 1944</span></li>
<li><span style="line-height: 12.986111640930176px;">Supports 1080p30 / 720p60 / 640x480p Video</span></li>
<li><span style="line-height: 12.986111640930176px;">25mm x 20mm x 9mm Footprint</span></li>
<li><span style="font-size: 13px; line-height: 19px;">You can see all the config options and possibilities that this camera has: </span><a style="font-size: 13px; line-height: 19px;" href="https://github.com/raspberrypi/userland/blob/master/host_applications/linux/apps/raspicam/RaspiCamDocs.odt?raw=true">RaspyCamDocs</a></li>
</ul>
<p>Finally, I want to show you how this camera takes the picture in not very good conditions of light</p>
<p style="text-align: center;"><a href="http://blog.rocapal.org/wp-content/uploads/2013/05/image1024.jpg"><img class="size-medium wp-image-617 aligncenter" title="click to show the original size" alt="image1024" src="http://blog.rocapal.org/wp-content/uploads/2013/05/image1024-300x225.jpg" width="300" height="225" /></a></p>
<p style="text-align: center;">
]]></content:encoded>
			<wfw:commentRss>http://blog.rocapal.org/?feed=rss2&#038;p=614</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Always Parcelable, never Serializable (in Android)</title>
		<link>http://blog.rocapal.org/?p=560</link>
		<comments>http://blog.rocapal.org/?p=560#comments</comments>
		<pubDate>Tue, 21 May 2013 10:20:30 +0000</pubDate>
		<dc:creator>rocapal</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.rocapal.org/?p=560</guid>
		<description><![CDATA[&#8220;The final conclusion of Android Team is that Serializable in JAVA is far too slow to satisfy Android’s interprocess-communication requirements. So the team built the Parcelable solution&#8221;. Just read this sentence is enough to forget Serializable mechanism. But, I want to show you how the faster is Parcelable in comparison with Serializable. We are going to measure the time [...]]]></description>
				<content:encoded><![CDATA[<p style="text-align: justify;"><em>&#8220;The final conclusion of Android Team is that Serializable in JAVA is far too slow to satisfy Android’s interprocess-communication requirements. So the team built the Parcelable solution&#8221;. </em>Just read this sentence is enough to forget Serializable mechanism. But, I want to show you how the faster is Parcelable in comparison with Serializable. We are going to measure the time it takes to pass a structure in Android using the intent when we start a new activity.</p>
<p style="text-align: justify;">We have around 340 nodes into ArrayList structure. Each node is a simple class that contains two String attributes and one Double attribute.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
</pre></td><td class="code"><pre class="java" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> Foo  <span style="color: #009900;">&#123;</span>  <span style="color: #666666; font-style: italic;">//implements Parcelable or Serializable</span>
	<span style="color: #000000; font-weight: bold;">private</span> <span style="color: #003399;">String</span> mVar1<span style="color: #339933;">;</span>
	<span style="color: #000000; font-weight: bold;">private</span> <span style="color: #003399;">Double</span> mVar2
	<span style="color: #000000; font-weight: bold;">private</span> <span style="color: #003399;">String</span> mVar3<span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>This is the way how we pass the date if the structure is Serializable</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
</pre></td><td class="code"><pre class="java" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">// Code of Activity1</span>
<span style="color: #003399;">ArrayList</span> array <span style="color: #339933;">=</span> fillArray<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
Intent popupIntent <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Intent<span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">this</span>, Activity2.<span style="color: #000000; font-weight: bold;">class</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
popupIntent.<span style="color: #006633;">putExtra</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;key_array&quot;</span>, array<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
startActivity<span style="color: #009900;">&#40;</span>popupIntent<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// Code of Activity2</span>
Intent i <span style="color: #339933;">=</span> getIntent<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #003399;">ArrayList</span> array <span style="color: #339933;">=</span> i.<span style="color: #006633;">getSerializableExtra</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;key_array&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>And this is the way how we pass the date if the structure is Parcelable</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
</pre></td><td class="code"><pre class="java" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">//Code of Activity1</span>
<span style="color: #003399;">ArrayList</span> array <span style="color: #339933;">=</span> fillArray<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
Intent popupIntent <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Intent<span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">this</span>, Activity2.<span style="color: #000000; font-weight: bold;">class</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
popupIntent.<span style="color: #006633;">putParcelableArrayListExtra</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;key_array&quot;</span>, array<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
startActivity<span style="color: #009900;">&#40;</span>popupIntent<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">//Code of Activity2</span>
Intent i <span style="color: #339933;">=</span> getIntent<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #003399;">ArrayList</span> array <span style="color: #339933;">=</span> i.<span style="color: #006633;">getParcelableArrayListExtra</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;key_array&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>Finally, you can see the times of this experiment. I&#8217;ve measured the time it takes to pass the structure in both cases (Serializable and Parcelable). The results are overwhelming.</p>
<div align="center"><table  width="500px"  style="width:500px;"  class="easy-table easy-table-default " border="0">
<thead>
<tr><th  style="text-align:center" >Elements</th>
<th  style="text-align:center" >Serializable Time(ms)</th>
<th  style="text-align:center" >Parcelable Time(ms)</th>
</tr>
</thead>
<tbody>
<tr><td  style="text-align:center" >340</td>
<td  style="text-align:center" >3134</td>
<td  style="text-align:center" >231</td>
</tr>

<tr><td  style="text-align:center" >332</td>
<td  style="text-align:center" >2708</td>
<td  style="text-align:center" >157</td>
</tr>

<tr><td  style="text-align:center" >342</td>
<td  style="text-align:center" >3360</td>
<td  style="text-align:center" >159</td>
</tr>

<tr><td  style="text-align:center" >341</td>
<td  style="text-align:center" >3151</td>
<td  style="text-align:center" >186</td>
</tr>
</tbody></table></div>
<p style="text-align: center;">
<p style="text-align: center;"><strong>We can conclude that Parcelable is around 15 times faster than Serializable!!</strong></p>
<p style="text-align: justify;">Implement parcelable structure requires a little effort because is needed implement two methods for the serialization of the object, but it&#8217;s highly recommended do it.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.rocapal.org/?feed=rss2&#038;p=560</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WorldTripLogger working!!</title>
		<link>http://blog.rocapal.org/?p=538</link>
		<comments>http://blog.rocapal.org/?p=538#comments</comments>
		<pubDate>Sun, 05 May 2013 16:06:17 +0000</pubDate>
		<dc:creator>rocapal</dc:creator>
				<category><![CDATA[arduino]]></category>
		<category><![CDATA[floss]]></category>

		<guid isPermaLink="false">http://blog.rocapal.org/?p=538</guid>
		<description><![CDATA[We tried the WorldTripLogger one day before MrHicks46 began his world trip on his motorcycle. We have noticed that the vibrations will be a little bit of a problem because some pictures have some wrong lines in the image, but most of the pictures are very good!. One measure of WorldTripLogger has the following data: DateTime: [...]]]></description>
				<content:encoded><![CDATA[<p style="text-align: justify;">We tried the <a href="http://www.youtube.com/watch?feature=player_embedded&amp;v=mPAgRaiswbY">WorldTripLogger</a> one day before <a href="http://www.mrhicks46.com/">MrHicks46</a> began his world trip on his motorcycle. We have noticed that the vibrations will be a little bit of a problem because some pictures have some wrong lines in the image, but most of the pictures are very good!. One measure of WorldTripLogger has the following data:</p>
<ul>
<li><span style="line-height: 12.986111640930176px;"><strong>DateTime:</strong> 2013/05/04 11:33 (UTC+0)</span></li>
<li><strong>Temperature:</strong> 20.62 ºC</li>
<li><strong>Altitude:</strong> 1174.70 m</li>
<li><strong>Speed:</strong> 78.2 km/h</li>
<li><strong>Picture:</strong></li>
</ul>
<p style="text-align: center;"><a href="http://blog.rocapal.org/wp-content/uploads/2013/05/13050411.33I.jpg"><img class="size-full wp-image-539 aligncenter" alt="WorldTripLogger" src="http://blog.rocapal.org/wp-content/uploads/2013/05/13050411.33I.jpg" width="640" height="480" /></a></p>
<p>&nbsp;</p>
<ul>
<li><strong><span style="font-size: 13px; line-height: 19px;">Location:</span></strong></li>
</ul>
<p>&nbsp;</p>
<p style="text-align: center;"><a href="http://goo.gl/maps/E6BMD"><img class=" wp-image-542  aligncenter" alt="Map" src="http://blog.rocapal.org/wp-content/uploads/2013/05/mapa.png" width="640" height="407" /></a></p>
<p>&nbsp;</p>
<p>OMG! It&#8217;s amazing! <img src='http://blog.rocapal.org/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.rocapal.org/?feed=rss2&#038;p=538</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Show your RTSP video in Android with VLC</title>
		<link>http://blog.rocapal.org/?p=506</link>
		<comments>http://blog.rocapal.org/?p=506#comments</comments>
		<pubDate>Wed, 27 Mar 2013 16:01:18 +0000</pubDate>
		<dc:creator>rocapal</dc:creator>
				<category><![CDATA[android]]></category>
		<category><![CDATA[floss]]></category>

		<guid isPermaLink="false">http://blog.rocapal.org/?p=506</guid>
		<description><![CDATA[If you have developed an Android app with video streaming, I&#8217;m sure you notice that Android use a pre-load of video buffer that fills in 10 seconds. This delay is hardcode in the source code. It&#8217;s very hard create a real time app to show video with this delay. There are several solutions out of [...]]]></description>
				<content:encoded><![CDATA[<p style="text-align: justify;">If you have developed an Android app with video streaming, I&#8217;m sure you notice that Android use a pre-load of video buffer that fills in 10 seconds. This delay is hardcode in the source code. It&#8217;s very hard create a real time app to show video with this delay.</p>
<p style="text-align: justify;">There are several solutions out of android to show video streaming. Some of them provide SDK to develop. But if you don&#8217;t want develop to other SDK, you can use VLC for android. Thanks to the intent&#8217;s communication of Android, we can interact with VLC Android app.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
</pre></td><td class="code"><pre class="java" style="font-family:monospace;">Intent i <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Intent<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;org.videolan.vlc.VLCApplication.gui.video.VideoPlayerActivity&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
i.<span style="color: #006633;">setAction</span><span style="color: #009900;">&#40;</span>Intent.<span style="color: #006633;">ACTION_VIEW</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>		
i.<span style="color: #006633;">setData</span><span style="color: #009900;">&#40;</span>Uri.<span style="color: #006633;">parse</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;rtsp://your_url:554/&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
startActivity<span style="color: #009900;">&#40;</span>i<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p style="text-align: justify;">If you are interested to know how I get these lines, keep reading.<br />
Maybe, you ask yourself &#8220;how do I find the correct name of activity and parameters?&#8221;. Well, this is not magic. In general, if you want interact with a specific android application and you have access to source code (FLOSS blessed!), follow these steps.</p>
<p><em><strong>1. Download the source code</strong></em></p>
<p>In our case, we download VLC for android source code by git</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">git clone</span> git:<span style="color: #000000; font-weight: bold;">//</span>git.videolan.org<span style="color: #000000; font-weight: bold;">/</span>vlc-ports<span style="color: #000000; font-weight: bold;">/</span>android.git</pre></td></tr></table></div>

<p><em><strong>2. Let&#8217;s see AndroidManifest.xml file</strong></em></p>
<p style="text-align: justify;">Take a moment to see and analyze the <a href="http://git.videolan.org/?p=vlc-ports/android.git;a=blob;f=vlc-android/AndroidManifest.xml;h=914deb71b828333049d86c2df0596c24be543ffb;hb=HEAD">AndrodManifest.xml</a> file of VLC for Android project. Quickly you see that exist one activity declared in the manifest that have a lot of intent-filter. The activity is &#8220;.gui.video.VideoPlayerActivity&#8221;. If you keep looking, you notice that one intent-filter declared the protocols that support this activity and the action of the intent</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
</pre></td><td class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;activity</span> <span style="color: #000066;">android:name</span>=<span style="color: #ff0000;">&quot;.gui.video.VideoPlayerActivity&quot;</span> </span>
<span style="color: #009900;">          <span style="color: #000066;">android:configChanges</span>=<span style="color: #ff0000;">&quot;orientation|screenSize&quot;</span> </span>
<span style="color: #009900;">          <span style="color: #000066;">android:theme</span>=<span style="color: #ff0000;">&quot;@android:style/Theme.NoTitleBar.Fullscreen&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
   <span style="color: #808080; font-style: italic;">&lt;!--  This filter captures protocols without type info  --&gt;</span>
   <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;intent-filter<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
       <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;action</span> <span style="color: #000066;">android:name</span>=<span style="color: #ff0000;">&quot;android.intent.action.VIEW&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
       <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;category</span> <span style="color: #000066;">android:name</span>=<span style="color: #ff0000;">&quot;android.intent.category.DEFAULT&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
       <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;category</span> <span style="color: #000066;">android:name</span>=<span style="color: #ff0000;">&quot;android.intent.category.BROWSABLE&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
&nbsp;
       <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;data</span> <span style="color: #000066;">android:scheme</span>=<span style="color: #ff0000;">&quot;rtmp&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
       <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;data</span> <span style="color: #000066;">android:scheme</span>=<span style="color: #ff0000;">&quot;rtmpe&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
       <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;data</span> <span style="color: #000066;">android:scheme</span>=<span style="color: #ff0000;">&quot;rtp&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
       <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;data</span> <span style="color: #000066;">android:scheme</span>=<span style="color: #ff0000;">&quot;rtsp&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span></pre></td></tr></table></div>

<p style="text-align: justify;">So, we have the name of the activity (VideoPlayerActivity) and the action of the intent (action.VIEW).</p>
<p><em><strong>3. Let&#8217;s see JAVA source code</strong></em></p>
<p style="text-align: justify;">Well, just we have to know how send the data. In our case, we want to send the URI that represents the url of video rtsp. Normally, the data in the intents is sent using setData method.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="java" style="font-family:monospace;">i.<span style="color: #006633;">setData</span><span style="color: #009900;">&#40;</span>Uri.<span style="color: #006633;">parse</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;rtsp://your_url:5554/&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p style="text-align: justify;">But it&#8217;s possible that the developer of the other application use the putExtra methods to send the data. Also, you have to know the name of param.<span style="font-size: 13px; line-height: 19px;"><br />
</span></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="java" style="font-family:monospace;">i.<span style="color: #006633;">putExtra</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;URL_STREAMING&quot;</span>, Uri.<span style="color: #006633;">parse</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;rtsp://your_url:5554/&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p style="text-align: justify;">Let&#8217;s see how VLC for Android app implement this feature. Take a look at <a href="http://git.videolan.org/?p=vlc-ports/android.git;a=blob;f=vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java;h=62905130670fd5a751d062f5ebca96026e524dc4;hb=HEAD">VideoPlayerActivity file</a>. If you search by <em>getIntent()</em> (you know, it&#8217;s the method that android developers uses to know the Intent sent), you get the <em>load()</em> method. If you pay attention in this method, you can see the following lines that say you how the date is sent.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
</pre></td><td class="code"><pre class="java" style="font-family:monospace;"><span style="color: #003399;">Cursor</span> cursor <span style="color: #339933;">=</span> managedQuery<span style="color: #009900;">&#40;</span>getIntent<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">getData</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>, <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #003399;">String</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#123;</span> MediaStore.<span style="color: #006633;">Video</span>.<span style="color: #006633;">Media</span>.<span style="color: #006633;">DATA</span> <span style="color: #009900;">&#125;</span>, <span style="color: #000066; font-weight: bold;">null</span>, <span style="color: #000066; font-weight: bold;">null</span>, <span style="color: #000066; font-weight: bold;">null</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
mLocation <span style="color: #339933;">=</span> getIntent<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">getData</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">getPath</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p style="text-align: justify;">Also, you can see they use <em>getExtras()</em> to get optional parameters in the intent call.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="java" style="font-family:monospace;">itemTitle <span style="color: #339933;">=</span> getIntent<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">getExtras</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">getString</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;itemTitle&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p style="text-align: justify;">So, you can send the uri of rtsp video and the title that you want VLC android show in the screen. The source code would:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
</pre></td><td class="code"><pre class="java" style="font-family:monospace;">Intent i <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Intent<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;org.videolan.vlc.VLCApplication.gui.video.VideoPlayerActivity&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
i.<span style="color: #006633;">setAction</span><span style="color: #009900;">&#40;</span>Intent.<span style="color: #006633;">ACTION_VIEW</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>		
i.<span style="color: #006633;">setData</span><span style="color: #009900;">&#40;</span>Uri.<span style="color: #006633;">parse</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;rtsp://your_url:5554/&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
i.<span style="color: #006633;">putExtra</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;itemTitle&quot;</span>, <span style="color: #0000ff;">&quot;your video title&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
startActivity<span style="color: #009900;">&#40;</span>i<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p style="text-align: justify;">As a general rule, if you get access to source code or at least access to AndroidManifest file you&#8217;ll know how interact with this android application.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.rocapal.org/?feed=rss2&#038;p=506</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Android SDK 64bit and Debian amd64</title>
		<link>http://blog.rocapal.org/?p=464</link>
		<comments>http://blog.rocapal.org/?p=464#comments</comments>
		<pubDate>Wed, 13 Feb 2013 22:57:01 +0000</pubDate>
		<dc:creator>rocapal</dc:creator>
				<category><![CDATA[android]]></category>

		<guid isPermaLink="false">http://blog.rocapal.org/?p=464</guid>
		<description><![CDATA[As you know, it&#8217;s possible download the Android SDK for 32 and 64 bits architecture.  If you choose 64bit architecture you notice that some binaries are compiled to 32bit architecture 1 2 3 vega:$/android/sdk/platform-tools$ file aapt aapt: ELF 32-bit LSB executable, Intel 80386, version 1 &#40;SYSV&#41;, dynamically linked &#40;uses shared libs&#41;, for GNU/Linux 2.6.8, not [...]]]></description>
				<content:encoded><![CDATA[<p>As you know, it&#8217;s possible download the Android SDK for 32 and 64 bits architecture.  If you choose 64bit architecture you notice that some binaries are compiled to 32bit architecture</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666;">vega:$</span><span style="color: #000000; font-weight: bold;">/</span>android<span style="color: #000000; font-weight: bold;">/</span>sdk<span style="color: #000000; font-weight: bold;">/</span>platform-tools$ <span style="color: #c20cb9; font-weight: bold;">file</span> aapt
aapt: ELF <span style="color: #000000;">32</span>-bit LSB executable, Intel <span style="color: #000000;">80386</span>, version <span style="color: #000000;">1</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>SYSV<span style="color: #7a0874; font-weight: bold;">&#41;</span>, dynamically 
linked <span style="color: #7a0874; font-weight: bold;">&#40;</span>uses shared libs<span style="color: #7a0874; font-weight: bold;">&#41;</span>, <span style="color: #000000; font-weight: bold;">for</span> GNU<span style="color: #000000; font-weight: bold;">/</span>Linux 2.6.8, not stripped</pre></td></tr></table></div>

<p>Installing ia32-libs package was enough to solve this problem, but this package doesn&#8217;t install correctly in debian sid. It has been replace by <a href="http://wiki.debian.org/Multiarch">Debian-Multiarch</a></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;">vega:<span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>rocapal<span style="color: #000000; font-weight: bold;">/</span>android<span style="color: #000000; font-weight: bold;">/</span>sdk<span style="color: #000000; font-weight: bold;">/</span>platform-tools$ <span style="color: #c20cb9; font-weight: bold;">aptitude</span> <span style="color: #c20cb9; font-weight: bold;">install</span> ia32-libs
Se instalarán los siguiente paquetes NUEVOS:
ia32-libs<span style="color: #7a0874; font-weight: bold;">&#123;</span>b<span style="color: #7a0874; font-weight: bold;">&#125;</span>
<span style="color: #000000;">0</span> paquetes actualizados, <span style="color: #000000;">1</span> nuevos instalados, <span style="color: #000000;">0</span> para eliminar y <span style="color: #000000;">7</span> sin actualizar.
Necesito descargar <span style="color: #000000;">114</span> kB de ficheros. Después de desempaquetar se usarán <span style="color: #000000;">114</span> kB.
No se satisfacen las dependencias de los siguientes paquetes:
ia32-libs : Depende: ia32-libs-i386 que es un paquete virtual.
Las acciones siguientes resolverán estas dependencias
&nbsp;
Mantener los paquetes siguientes en la versión actual:
<span style="color: #000000;">1</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> ia32-libs <span style="color: #7a0874; font-weight: bold;">&#91;</span>Sin instalar<span style="color: #7a0874; font-weight: bold;">&#93;</span>
&nbsp;
¿Acepta esta solución? <span style="color: #7a0874; font-weight: bold;">&#91;</span>Y<span style="color: #000000; font-weight: bold;">/</span>n<span style="color: #000000; font-weight: bold;">/</span>q<span style="color: #000000; font-weight: bold;">/</span>?<span style="color: #7a0874; font-weight: bold;">&#93;</span></pre></td></tr></table></div>

<p>So, the solution is to install the following packages (and its dependencies)</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666;">$ </span><span style="color: #c20cb9; font-weight: bold;">aptitude</span> <span style="color: #c20cb9; font-weight: bold;">install</span> lib32stdc++<span style="color: #000000;">6</span> lib32z1</pre></td></tr></table></div>

<p>Also you can see <a href="http://wiki.debian.org/Multiarch">Debian-Multiarch</a> that replaces to ia32-libs package. Just you have to add i386 architecture in dpkg system to install i386 dependecies that you need.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">dpkg</span> <span style="color: #660033;">--add-architecture</span> i386
$ <span style="color: #c20cb9; font-weight: bold;">aptitude</span> update
$ <span style="color: #c20cb9; font-weight: bold;">aptitude</span> upgrade</pre></td></tr></table></div>

<p>Enjoy android coding!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.rocapal.org/?feed=rss2&#038;p=464</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Polynomial Regression</title>
		<link>http://blog.rocapal.org/?p=423</link>
		<comments>http://blog.rocapal.org/?p=423#comments</comments>
		<pubDate>Fri, 04 May 2012 14:28:41 +0000</pubDate>
		<dc:creator>rocapal</dc:creator>
				<category><![CDATA[codigo]]></category>
		<category><![CDATA[floss]]></category>
		<category><![CDATA[libresoft]]></category>
		<category><![CDATA[machine-learning]]></category>

		<guid isPermaLink="false">http://blog.rocapal.org/?p=423</guid>
		<description><![CDATA[Polynomial Regression is a form of linear regression model but fits a non-linear relationship between the value X and Y. Basically we have to add new features to the final equation. But what features? It&#8217;s simple we can add the X1 feature as new feature: X1^2 or X1^3. If we have some input features (X1,X2,X3) [...]]]></description>
				<content:encoded><![CDATA[<p style="text-align: justify;"><a href="http://en.wikipedia.org/wiki/Polynomial_regression">Polynomial Regression</a> is a form of linear regression model but fits a non-linear relationship between the value X and Y. Basically we have to add new features to the final equation. But what features? It&#8217;s simple we can add the X1 feature as new feature: X1^2 or X1^3. If we have some input features (X1,X2,X3) also we can add new features as X1*X2 or X1^2*X3^2. So, the polynomial regression model is:</p>
<p style="text-align: center;"><img class="aligncenter" title="polinomial regression model" src="http://upload.wikimedia.org/wikipedia/en/math/8/2/a/82a06600a40dc780c38133bbffd6e222.png" alt="" width="482" height="23" /></p>
<p style="text-align: justify;">As you can see in the following figure you can get a linear regression (red line) or you can get a non-linear regression (blue and  yellow) if you add more features to your equation. The type of curve of non-linear regression model depends of the grade of your polynomial. If the grade of the polynomial is near 1 the model fits to traditional linear regression model. Instead, if the grade of the polynomial is high the model fits to training points.</p>
<p style="text-align: left;"><a href="http://blog.rocapal.org/wp-content/uploads/2012/04/polynomial1.png"><img class="wp-image-424 aligncenter" title="polynomial1" src="http://blog.rocapal.org/wp-content/uploads/2012/04/polynomial1.png" alt="polynomial1" width="685" height="468" /></a></p>
<p style="text-align: justify;"><a href="http://en.wikipedia.org/wiki/Overfitting#Machine_learning">OverFitting</a> is the term that it&#8217;s used to describe when your linear regression model don&#8217;t have capacity to predict because the model fits very near of the training points. This fact can happen if the model is very complex or the grade of equation is high. You notice that over-fitting is bad for your model and you should avoid it because the predictions will be very similar or equals to the training points.</p>
<p style="text-align: center;"><a href="http://blog.rocapal.org/wp-content/uploads/2012/04/polynomial2.png"><img class="aligncenter  wp-image-432" title="polynomial2" src="http://blog.rocapal.org/wp-content/uploads/2012/04/polynomial2.png" alt="polynomial2" width="722" height="531" /></a></p>
<p style="text-align: justify;">You can play in live with this concept about polynomial regression in the following link: <a href="http://www.arachnoid.com/polysolve/index.html">http://www.arachnoid.com/polysolve/index.html</a></p>
<p style="text-align: justify;">Also you can get the source code of this example from my <a href="http://git.libresoft.es/rocapal/tree/ml/polynomial_regression">GIT repository</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.rocapal.org/?feed=rss2&#038;p=423</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Making screencast for Android classes</title>
		<link>http://blog.rocapal.org/?p=402</link>
		<comments>http://blog.rocapal.org/?p=402#comments</comments>
		<pubDate>Mon, 23 Apr 2012 13:30:06 +0000</pubDate>
		<dc:creator>rocapal</dc:creator>
				<category><![CDATA[android]]></category>
		<category><![CDATA[floss]]></category>
		<category><![CDATA[master-sl]]></category>

		<guid isPermaLink="false">http://blog.rocapal.org/?p=402</guid>
		<description><![CDATA[I need to record some screencast with audio for my online classes of Android. It&#8217;s a good way to explain all the topics about programming and android development. Slides, exercises, moodle and screencast is a cool combination to create high-quality online courses. Also I use a digital tablet to write in the desktop/slides to clarify [...]]]></description>
				<content:encoded><![CDATA[<p style="text-align: justify;">I need to record some screencast with audio for my online classes of Android. It&#8217;s a good way to explain all the topics about programming and android development. Slides, exercises, moodle and screencast is a cool combination to create high-quality online courses. Also I use a <a href="http://www.amazon.es/Wacom-CTL-470K-ITES-Tableta-Bamboo-Pen/dp/B005ZRYADG/ref=sr_1_7?ie=UTF8&amp;qid=1335187470&amp;sr=8-7">digital tablet</a> to write in the desktop/slides to clarify the explication. Finally I&#8217;m used to manage <a href="http://www.openshotvideo.com/">openShot</a> as video editor, it&#8217;s simple and very powerful.</p>
<p style="text-align: justify;">I use the following ffmpeg command to record screencast (audio+video) of the desktop and Android emulator:</p>
<pre style="text-align: justify;">ffmpeg -f alsa -i plughw:0 -f x11grab -s 1680x1050
-r 24 -b 200k -bf 2 -g 300 -i :0.0
-ar 11050 -ab 64k -acodec libmp3lame
-vcodec libxvid -aspect 1.555 -sameq outputFile.avi</pre>
<p style="text-align: justify;">To avoid problems with the audio recording you must configurate your android emulator with the following keys:</p>
<pre style="text-align: justify;">Audio PlayBack Support =  NO / FALSE
Audio Recording Support = NO / FALSE</pre>
<p style="text-align: center;"><a href="http://blog.rocapal.org/wp-content/uploads/2012/04/android-emulator.png"><img class="aligncenter  wp-image-410" title="android-emulator" src="http://blog.rocapal.org/wp-content/uploads/2012/04/android-emulator.png" alt="android-emulator" width="500" height="526" /></a></p>
<p style="text-align: justify;">
]]></content:encoded>
			<wfw:commentRss>http://blog.rocapal.org/?feed=rss2&#038;p=402</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Multi-variable linear regression</title>
		<link>http://blog.rocapal.org/?p=351</link>
		<comments>http://blog.rocapal.org/?p=351#comments</comments>
		<pubDate>Thu, 19 Apr 2012 10:07:56 +0000</pubDate>
		<dc:creator>rocapal</dc:creator>
				<category><![CDATA[codigo]]></category>
		<category><![CDATA[floss]]></category>
		<category><![CDATA[libresoft]]></category>
		<category><![CDATA[machine-learning]]></category>

		<guid isPermaLink="false">http://blog.rocapal.org/?p=351</guid>
		<description><![CDATA[I continue working with machine learning algorithms. In a previous post I talked about linear regression with one variable and I described different algorithms to predict hypothesis. In this case, I&#8217;m playing with linear regression but, with some features. Linear regression only have one input feature and one output feature. For example, you can predict the [...]]]></description>
				<content:encoded><![CDATA[<p style="text-align: justify;">I continue working with machine learning algorithms. In a <a href="http://blog.rocapal.org/?p=312">previous post</a> I talked about linear regression with one variable and I described different algorithms to predict hypothesis.</p>
<p style="text-align: justify;">In this case, I&#8217;m playing with linear regression but, with some features. Linear regression only have one input feature and one output feature. For example, you can predict the price of a house give the house&#8217;s size. But imagine that you want predict the price of a house using size and rooms features. When you have more than one input feature is called &#8216;multi-variable linear regression&#8217;.</p>
<p style="text-align: justify;">In the following figure we can see the two input features (size and rooms), the training data (red dots), and the predictions (blue dots). In this case, we can represent the information with a 3D model. If your model have more than three features you must research the way to represent all the data.</p>
<p><a href="http://blog.rocapal.org/wp-content/uploads/2012/04/multi-linear-regression1.png"><img class="aligncenter  wp-image-360" title="multi-linear-regression" src="http://blog.rocapal.org/wp-content/uploads/2012/04/multi-linear-regression1.png" alt="multi-linear-regression" width="662" height="477" /></a></p>
<p>&nbsp;</p>
<pre>For a house with <strong>70m</strong> and  <strong>2 rooms</strong>, we predict a price of <strong>143496.23€</strong>
For a house with <strong>100m</strong> and <strong>3 rooms</strong>, we predict a price of <strong>203095.22€</strong>
For a house with <strong>175m</strong> and <strong>4 rooms</strong>, we predict a price of <strong>363570.19€</strong></pre>
<p style="text-align: justify;">It&#8217;s important notice that in this case we are working in 3D space, so the regression model is represented by a plane (instead of line, as one-variable linear regression model). In the following figures you can see how the predictions dots are on the plane. We obtain always a plane regression if we are using three variables and none of them are quadratic or cubic features. Thanks to <a href="http://matplotlib.sourceforge.net/mpl_toolkits/mplot3d/api.html">mplot3d</a> library you can render 3D graphics and move the perspective of the figure to see the regression plane from different points of view.</p>
<p>&nbsp;</p>
<p style="text-align: center;"><a href="http://blog.rocapal.org/wp-content/uploads/2012/04/multi-linear-regression-2.png"><img class="wp-image-373 aligncenter" title="multi-linear-regression-plane" src="http://blog.rocapal.org/wp-content/uploads/2012/04/multi-linear-regression-2.png" alt="multi-linear-regression-plane" width="492" height="405" /></a></p>
<div style="text-align: center;"><a href="http://blog.rocapal.org/wp-content/uploads/2012/04/multi-linear-regression-3.png"><img class="wp-image-374 aligncenter" title="multi-linear-regression-plane2" src="http://blog.rocapal.org/wp-content/uploads/2012/04/multi-linear-regression-3.png" alt="multi-linear-regression-plane2" width="488" height="407" /></a></div>
<p style="text-align: center;"><a href="http://blog.rocapal.org/wp-content/uploads/2012/04/multi-linear-regression-3.png"><br />
</a></p>
<div>You can get the source code of this example from my <a href="http://git.libresoft.es/rocapal/tree/ml/linear_regression_multivariable">GIT repository</a></div>
<div></div>
<div></div>
]]></content:encoded>
			<wfw:commentRss>http://blog.rocapal.org/?feed=rss2&#038;p=351</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Playing with machine learning: Linear Regression</title>
		<link>http://blog.rocapal.org/?p=312</link>
		<comments>http://blog.rocapal.org/?p=312#comments</comments>
		<pubDate>Tue, 17 Apr 2012 13:28:10 +0000</pubDate>
		<dc:creator>rocapal</dc:creator>
				<category><![CDATA[floss]]></category>
		<category><![CDATA[libresoft]]></category>
		<category><![CDATA[machine-learning]]></category>

		<guid isPermaLink="false">http://blog.rocapal.org/?p=312</guid>
		<description><![CDATA[Since two months ago I&#8217;m researching about machine learning and its algorithms. The goal is get a good unsupervised and clustering algorithm to analyze every android applications and predict what application you want to install or use in a particular time. The first step is learn and understand the theory of machine learning. For this,  I began [...]]]></description>
				<content:encoded><![CDATA[<p style="text-align: justify;">Since two months ago I&#8217;m researching about machine learning and its algorithms. The goal is get a good unsupervised and clustering algorithm to analyze every android applications and predict what application you want to install or use in a particular time. The first step is learn and understand the theory of machine learning. For this,  I began to study the <a href="http://www.ml-class.org/">Machine Learning Course of Stanford</a>. It&#8217;s a great and practical course with videos and material to help understand the classes.</p>
<p style="text-align: justify;">The first model that I have studied is <a href="http://en.wikipedia.org/wiki/Linear_regression">linear regression</a>. This model consist in have a relation between two or more variables. For example, in my example I have a training data about the prices of the houses and its size in square meters. This training data is used to build a linear regression model to predict the prices of the house give the size of the house. As you  can see in the following figure, the black dots show the training data (I did web crawling to get real data). The blue line represents the trend line of the model, and the red dots show the predicts for two size of houses.</p>
<p style="text-align: center;"><a href="http://blog.rocapal.org/wp-content/uploads/2012/04/linear_regression.png"><img class="aligncenter  wp-image-314" title="linear_regression" src="http://blog.rocapal.org/wp-content/uploads/2012/04/linear_regression.png" alt="linear_regression" width="594" height="347" /></a></p>
<p>You can see the prediction values that are represented by red dots in the figure.</p>
<pre>For a house with <strong>100 meters</strong>, we predict a price of <strong>202906.39 euros</strong>
For a house with <strong>175 meters</strong>, we predict a price of <strong>354343.54 euros</strong></pre>
<p style="text-align: justify;">You can use Octave or R to practice and implement machine learning algorithms. Personally, I prefer to use a great and FLOSS library that I found, <a href="http://scikit-learn.org/stable/index.html">scitik-learn</a>. This library has several implementations of <a href="http://scikit-learn.org/stable/modules/linear_model.html">linear models</a>: LinearRegression, RidgeRegression, Lasso, Elastic Net, &#8230;. For this example, I have used the SGDRegressor model but, I want to test other models more smooth like Lasso or Elastic models.</p>
<p style="text-align: left;">You can get the source code of this example in my <a href="http://git.libresoft.es/rocapal/tree/ml/linear_regression">GIT repository</a></p>
<p style="text-align: left;">
]]></content:encoded>
			<wfw:commentRss>http://blog.rocapal.org/?feed=rss2&#038;p=312</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How decompile an Android Application</title>
		<link>http://blog.rocapal.org/?p=277</link>
		<comments>http://blog.rocapal.org/?p=277#comments</comments>
		<pubDate>Fri, 18 Nov 2011 09:49:29 +0000</pubDate>
		<dc:creator>rocapal</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.rocapal.org/?p=277</guid>
		<description><![CDATA[Decompile is a process to revert the compile operation. I main, decompile converts the low level code in high level code. The Android application is compiled in APK container that groups files as: xml, images and class. APK containers are actually ZIP containers. An interest thing is can see the xml configuration or some source [...]]]></description>
				<content:encoded><![CDATA[<p style="text-align: justify;"><a href="http://en.wikipedia.org/wiki/Decompiler">Decompile</a> is a process to revert the compile operation. I main, decompile converts the low level code in high level code. The Android application is compiled in <a href="http://en.wikipedia.org/wiki/APK_(file_format)">APK</a> container that groups files as: xml, images and class. APK containers are actually ZIP containers. An interest thing is can see the xml configuration or some source code of others applications. If this applications are Free Software is not a problem, but if this applications are privated we can&#8217;t see its configuration. The next application help you to decompile an APK file to see xml configuration and source code.</p>
<p style="text-align: justify;">Some tools I&#8217;ve found:</p>
<ul>
<li><a href="http://code.google.com/p/android-apktool/">APKTool</a>: Decompile all the configuration XML and resources as images. It&#8217;s great to view AndroidManifest.xml or some layout xml. The source code is decompiled to &#8220;smali&#8221;. This assembler language is based in dalvik but it&#8217;s not translate to JAVA.</li>
<li><a href="http://code.google.com/p/dex2jar/">dex2jar</a>: If we unzip the APK file we find a .dex files. This tools translate .dex file to JAR file with all the class files of the project. So, you can use any class2java decompiler to view source code</li>
<li><a href="http://www.varaneckas.com/jad">JAD Java Decompiler</a>: It&#8217;s widely used through command line and very useful to make scripts by automatic process</li>
<li><a href="http://java.decompiler.free.fr/?q=jdgui">JDGUI</a>: Graphic decompiler and integrated with eclipse. It&#8217;s not aÂ efficientÂ solution to run process in background.</li>
</ul>
<div>Currently, I&#8217;m interesting in decompile Android applications because I want to know the data imported/exported by them. And this is possible if I can analyze the AndroidManifest.xml and the source code.</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.rocapal.org/?feed=rss2&#038;p=277</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
