<?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>THE .NET WAY &#187; Java &#8211;  &#8211; The .Net Way</title>
	<atom:link href="http://www.thedotnetway.net/tag/java/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.thedotnetway.net</link>
	<description></description>
	<lastBuildDate>Fri, 03 Feb 2012 14:05:26 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Eclipse y Team Foundation Server</title>
		<link>http://www.thedotnetway.net/2010/06/22/eclipse-y-team-foundation-server/</link>
		<comments>http://www.thedotnetway.net/2010/06/22/eclipse-y-team-foundation-server/#comments</comments>
		<pubDate>Tue, 22 Jun 2010 14:47:09 +0000</pubDate>
		<dc:creator>Emilio Torrens</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[Herramientas]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[TFS]]></category>

		<guid isPermaLink="false">http://www.thedotnetway.net/2010/06/22/eclipse-y-team-foundation-server/</guid>
		<description><![CDATA[Que estés usando Eclipse para unos proyectos y Visual Studio para otros no es escusa para no usar Team Foundation Server para el seguimiento de los proyectos y como Repositorio de Código ya que puedes usar “Microsoft Visual Studio Team Explorer Everywhere 2010” con Eclipse. Para instalarlo en Eclipse solo tienes que seguir estos pasos:<a class="rmore" href="http://www.thedotnetway.net/2010/06/22/eclipse-y-team-foundation-server/">&#160;&#160; Read More ...</a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.thedotnetway.net/wp-content/uploads/2010/06/image2.png" target="_blank"><img style="border-bottom: 0px; border-left: 0px; margin: 0px 5px 0px 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" align="left" src="http://www.thedotnetway.net/wp-content/uploads/2010/06/image_thumb1.png" width="120" height="86" /></a> Que estés usando Eclipse para unos proyectos y Visual Studio para otros no es escusa para no usar <a href="http://en.wikipedia.org/wiki/Team_Foundation_Server" target="_blank">Team Foundation Server</a> para el seguimiento de los proyectos y como Repositorio de Código ya que puedes usar “Microsoft Visual Studio Team Explorer Everywhere 2010” con Eclipse.</p>
<p>Para instalarlo en Eclipse solo tienes que seguir estos pasos:</p>
<ul>
<li>Descargarlo desde <a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=af1f5168-c0f7-47c6-be7a-2a83a6c02e57&amp;displaylang=en#filelist" target="_blank">aquí</a>, descargas el archivo (TFSEclipsePlugin-UpdateSiteArchive-10.0.0.zip) </li>
<li>En Eclipse vas a Help/Install New Software</li>
<li>Opción Add, y Opción Archive donde&#160; seleccionas el archivo zip que has descargado.</li>
<li>Marcas la opción “Team Explorer Everywhere”</li>
<li>Next, next y reinicias Eclipse</li>
</ul>
<p>Listo, ya lo tienes instalado:)</p>
<p>En el menú contextual de los proyectos te aparecerá una nueva opción “Team”, para agregar el proyecto la primera vez utilizas la opción “Share”, una vez agregado tendrás el mismo menú que en Visual Studio</p>
<p>La primera vez que agregues un proyecto te pedirá un serial, marcas la opción “Use a full-featured trial version of Microsoft Visual Studio Team Explorer Everywhere” </p>
]]></content:encoded>
			<wfw:commentRss>http://www.thedotnetway.net/2010/06/22/eclipse-y-team-foundation-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Programando para Android</title>
		<link>http://www.thedotnetway.net/2010/06/02/programando-para-android/</link>
		<comments>http://www.thedotnetway.net/2010/06/02/programando-para-android/#comments</comments>
		<pubDate>Wed, 02 Jun 2010 10:23:02 +0000</pubDate>
		<dc:creator>Emilio Torrens</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Android]]></category>
		<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://www.thedotnetway.net/2010/06/02/programando-para-android/</guid>
		<description><![CDATA[Un par de cositas a tener en cuenta cuando programamos para Android con el Eclipse. Se te generara una clase que hereda de Activity que es donde esta el meollo, allí tenemos acceso a todos los objetos de la aplicación y es donde pondremos el código. 1: public class MyAppActivity extends Activity { 2: /**<a class="rmore" href="http://www.thedotnetway.net/2010/06/02/programando-para-android/">&#160;&#160; Read More ...</a>]]></description>
			<content:encoded><![CDATA[<p>Un par de cositas a tener en cuenta cuando programamos para Android con el Eclipse.</p>
<p>Se te generara una clase que hereda de Activity que es donde esta el meollo, allí tenemos acceso a todos los objetos de la aplicación y es donde pondremos el código.</p>
<div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; height: 181px; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper">
<div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet">
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum1">   1:</span> <span style="color: #0000ff">public</span> <span style="color: #0000ff">class</span> MyAppActivity <span style="color: #0000ff">extends</span> Activity {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum2">   2:</span>     <span style="color: #008000">/** Called when the activity is first created. */</span>       </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum3">   3:</span>     </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum4">   4:</span>     @Override</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum5">   5:</span>     <span style="color: #0000ff">public</span> <span style="color: #0000ff">void</span> onCreate(Bundle savedInstanceState) {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum6">   6:</span>         </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum7">   7:</span>         <span style="color: #0000ff">super</span>.onCreate(savedInstanceState);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum8">   8:</span>         setContentView(R.layout.main);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum9">   9:</span>     }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum10">  10:</span> }</pre>
<p><!--CRLF--></div>
</div>
<p>Los nombres (formularios, imágenes, controles en los formularios … ) son únicos para toda la aplicación, se genera una clase R.java donde tendrás campos estáticos con todos los Ids agrupados en clases:</p>
<ul>
<li>layout, los ids de los formularios </li>
<li>string, los ids de los recursos </li>
<li>drawable, los ids de las imágenes </li>
<li>id, los ids de los controles. </li>
</ul>
<p>Para cargar los formularios usaremos el método setContentView pasándole el id del formulario que tenemos en la clase R.java</p>
<div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper">
<div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet">
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum1">   1:</span> <span style="color: #0000ff">private</span> <span style="color: #0000ff">void</span> OnClickForm2() {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum2">   2:</span>     setContentView(R.layout.form2);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum3">   3:</span> }</pre>
<p><!--CRLF--></div>
</div>
<p>Para acceder a los controles utilizaremos el método FindViewById, usando los ids de la clase R.java, nos devolverá un objeto y hacemos cast al control.</p>
<div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper">
<div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet">
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum1">   1:</span> TextView textoCabecera = (TextView) findViewById(R.id.TextoCabecera);</pre>
<p><!--CRLF--></div>
</div>
<p>Para capturar los eventos en los controles tienes que hacerlo después de cargar el layout, accediendo al control por el Id.</p>
<div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper">
<div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet">
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum1">   1:</span> setContentView(R.layout.main);                </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum2">   2:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum3">   3:</span> <span style="color: #0000ff">try</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum4">   4:</span> {                </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum5">   5:</span>     <span style="color: #0000ff">this</span>.Boton1 = (Button)<span style="color: #0000ff">this</span>.findViewById(R.id.Boton1);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum6">   6:</span>     <span style="color: #0000ff">this</span>.Boton1.setOnClickListener(<span style="color: #0000ff">new</span> OnClickListener(){</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum7">   7:</span>         @Override</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum8">   8:</span>         <span style="color: #0000ff">public</span> <span style="color: #0000ff">void</span> onClick(View v) {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum9">   9:</span>             OnClickBoton1();</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum10">  10:</span>         }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum11">  11:</span>       });</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum12">  12:</span>         </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum13">  13:</span>     <span style="color: #0000ff">this</span>.Boton2 = (Button)<span style="color: #0000ff">this</span>.findViewById(R.id.Boton2);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum14">  14:</span>     <span style="color: #0000ff">this</span>.Boton2.setOnClickListener(<span style="color: #0000ff">new</span> OnClickListener(){</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum15">  15:</span>         @Override</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum16">  16:</span>         <span style="color: #0000ff">public</span> <span style="color: #0000ff">void</span> onClick(View v) {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum17">  17:</span>             OnClickBoton2();</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum18">  18:</span>         }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum19">  19:</span>       });</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum20">  20:</span> }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum21">  21:</span> <span style="color: #0000ff">catch</span>(Exception ex)</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum22">  22:</span> {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum23">  23:</span>     </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum24">  24:</span> }</pre>
<p><!--CRLF--></div>
</div>
<p>Y por ultimo, enviar notificaciones al usuario, aquí dejo un método para eso, lo único a tener en cuenta es el NOTIF_ID que es global y se incrementa después de cada notificación.</p>
<div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper">
<div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet">
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum1">   1:</span> <span style="color: #0000ff">public</span> <span style="color: #0000ff">void</span> Notify(String title, String text, <span style="color: #0000ff">int</span> iconID)</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum2">   2:</span> {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum3">   3:</span>     String ns = Context.NOTIFICATION_SERVICE;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum4">   4:</span>     NotificationManager mNotificationManager = (NotificationManager) getSystemService(ns);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum5">   5:</span>     <span style="color: #0000ff">int</span> icon = iconID;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum6">   6:</span>     CharSequence tickerText = title;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum7">   7:</span>     <span style="color: #0000ff">long</span> when = System.currentTimeMillis();</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum8">   8:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum9">   9:</span>     Notification notification = <span style="color: #0000ff">new</span> Notification(icon, tickerText, when);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum10">  10:</span>     </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum11">  11:</span>     Context context = getApplicationContext();</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum12">  12:</span>     CharSequence contentTitle = title;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum13">  13:</span>     CharSequence contentText = text;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum14">  14:</span>     Intent notificationIntent = <span style="color: #0000ff">new</span> Intent(<span style="color: #0000ff">this</span>, WindConditionsActivity.<span style="color: #0000ff">class</span>);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum15">  15:</span>     PendingIntent contentIntent = PendingIntent.getActivity(<span style="color: #0000ff">this</span>, 0, notificationIntent, 0);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum16">  16:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum17">  17:</span>     notification.setLatestEventInfo(context, contentTitle, contentText, contentIntent);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum18">  18:</span>             </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum19">  19:</span>     mNotificationManager.notify(NOTIF_ID, notification);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum20">  20:</span>     </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum21">  21:</span>     NOTIF_ID++;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum22">  22:</span> }</pre>
<p><!--CRLF--></div>
</div>
<p>Ahora no tengo mucho tiempo para programar Android, pero bueno a medida que descubra cosas nuevas las iré publicando <img src='http://www.thedotnetway.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.thedotnetway.net/2010/06/02/programando-para-android/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Android y Eclipse</title>
		<link>http://www.thedotnetway.net/2010/05/21/android-y-eclipse/</link>
		<comments>http://www.thedotnetway.net/2010/05/21/android-y-eclipse/#comments</comments>
		<pubDate>Fri, 21 May 2010 09:06:49 +0000</pubDate>
		<dc:creator>Emilio Torrens</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Android]]></category>
		<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://www.thedotnetway.net/2010/05/21/android-y-eclipse/</guid>
		<description><![CDATA[Desarrollar aplicaciones para Android con Eclipse es relativamente sencillo, solo hay que preparar el entorno y leer un poco aquí , sigue estos pasos para preparar el entorno. 1-&#160; Necesitas el Eclipse, si no lo tienes bájalo desde aquí (Yo uso Eclipse IDE for Java EE Developers) 2-&#160; Necesitas el SDK de Android, bájalo desde<a class="rmore" href="http://www.thedotnetway.net/2010/05/21/android-y-eclipse/">&#160;&#160; Read More ...</a>]]></description>
			<content:encoded><![CDATA[<p>Desarrollar aplicaciones para Android con Eclipse es relativamente sencillo, solo hay que preparar el entorno y leer un poco <a href="http://developer.android.com/guide/index.html" target="_blank">aquí</a> , sigue estos pasos para preparar el entorno.</p>
<p>1-&#160; Necesitas el Eclipse, si no lo tienes bájalo <a href="http://eclipse.org/downloads/" target="_blank">desde aquí</a> (Yo uso Eclipse IDE for Java EE Developers)     <br />2-&#160; Necesitas el <a href="http://es.wikipedia.org/wiki/Kit_de_desarrollo_de_software" target="_blank">SDK</a> de Android, <a href="http://developer.android.com/sdk/index.html" target="_blank">bájalo desde aquí</a>     <br />3-&#160; Necesitas el Plugin de Android para Eclipse, mas abajo pone como instalarlo.</p>
<p><a href="http://www.thedotnetway.net/wp-content/uploads/2010/05/image.png"><img style="border-right-width: 0px; margin: 0px 5px 0px 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" align="left" src="http://www.thedotnetway.net/wp-content/uploads/2010/05/image_thumb.png" width="158" height="91" /></a> Para instalar el SDK de Android, descomprimes lo que te hayas bajado directamente donde quieras que este el SDK (ya que el Manager te bajara allí los archivos) y ejecutas el SDK Setup.exe, vas a Paquetes Disponibles le das a Actualizar Todo y listo.</p>
<p>El único problema que me encontré en este paso fue con la conexión https, si te falla tienes que ir a Settins y marcar “Force https// … Sources”.</p>
<p>Para instalar el plugin en Eclipse, en Eclipse vas a “Help/Install New Software” y le das a “Add” una vez allí en Nombre pon el que quieras y en location:    <br /><a href="https://dl-ssl.google.com/android/eclipse/">https://dl-ssl.google.com/android/eclipse/</a> aceptas, instalas todo y listo.</p>
<p>Una vez instalado el plugin solo hay que configurar el path donde tienes el SDK, para eso vas a “Windows/Preferences/Android”, le pones el path donde tienes el SDK y le das a “Apply”.</p>
<p>Y ya esta, lo tienes listo, en “File/New/Other” ya te aparecerá la opción para crear nuevos Proyectos de Android.</p>
<table border="0" cellspacing="0" cellpadding="2" width="400">
<tbody>
<tr>
<td valign="top" width="100"><a href="http://www.thedotnetway.net/wp-content/uploads/2010/05/image1.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.thedotnetway.net/wp-content/uploads/2010/05/image_thumb1.png" width="120" height="75" /></a> </td>
<td valign="top" width="100"><a href="http://www.thedotnetway.net/wp-content/uploads/2010/05/image2.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.thedotnetway.net/wp-content/uploads/2010/05/image_thumb2.png" width="120" height="75" /></a> </td>
<td valign="top" width="100"><a href="http://www.thedotnetway.net/wp-content/uploads/2010/05/image3.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.thedotnetway.net/wp-content/uploads/2010/05/image_thumb3.png" width="120" height="75" /></a> </td>
<td valign="top" width="100"><a href="http://www.thedotnetway.net/wp-content/uploads/2010/05/image4.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.thedotnetway.net/wp-content/uploads/2010/05/image_thumb4.png" width="120" height="75" /></a> </td>
</tr>
</tbody>
</table>
]]></content:encoded>
			<wfw:commentRss>http://www.thedotnetway.net/2010/05/21/android-y-eclipse/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>XFire y Eclipse</title>
		<link>http://www.thedotnetway.net/2010/02/16/xfire-y-eclipse/</link>
		<comments>http://www.thedotnetway.net/2010/02/16/xfire-y-eclipse/#comments</comments>
		<pubDate>Tue, 16 Feb 2010 09:23:04 +0000</pubDate>
		<dc:creator>Emilio Torrens</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[WebServices]]></category>
		<category><![CDATA[WSDL]]></category>

		<guid isPermaLink="false">http://www.thedotnetway.net/2010/02/16/xfire-y-eclipse/</guid>
		<description><![CDATA[XFire te permite generar el código necesario para un cliente de webservice a partir de su WSDL &#160; Para usarlo con Eclipse debes instalar el Plugin, para eso vas al menú Help/Install New Software le das a Add en Name le pones XFire y en location le pones esta dirección “http://dist.codehaus.org/xfire/update/”, Ok, Finish y ya<a class="rmore" href="http://www.thedotnetway.net/2010/02/16/xfire-y-eclipse/">&#160;&#160; Read More ...</a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://xfire.codehaus.org/" target="_blank">XFire</a> te permite generar el código necesario para un cliente de <a href="http://es.wikipedia.org/wiki/Servicio_web" target="_blank">webservice</a> a partir de su <a href="http://es.wikipedia.org/wiki/WSDL" target="_blank">WSDL</a></p>
<p><a href="http://www.thedotnetway.net/wp-content/uploads/2010/02/image.png"><img style="border-right-width: 0px; margin: 0px 5px 0px 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" align="left" src="http://www.thedotnetway.net/wp-content/uploads/2010/02/image_thumb.png" width="152" height="90" /></a>&#160; Para usarlo con <a href="http://www.eclipse.org" target="_blank">Eclipse</a> debes instalar el Plugin, para eso vas al menú Help/Install New Software le das a Add en Name le pones XFire y en location le pones esta dirección “http://dist.codehaus.org/xfire/update/”, Ok, Finish y ya lo tienes instalado.</p>
<p><a href="http://www.thedotnetway.net/wp-content/uploads/2010/02/image1.png"><img style="border-right-width: 0px; margin: 0px 5px 0px 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" align="left" src="http://www.thedotnetway.net/wp-content/uploads/2010/02/image_thumb1.png" width="149" height="109" /></a>&#160; Para usarlo vas al proyecto, New/Other, buscas el Wizard de XFire y allí solo tienes que poner la dirección del WSDL y donde quieres que te genere el código y listo.</p>
<p>Con estos pocos pasos ya tienes todas las clases necesarias para acatar el servicio, además con XFire no he tenido problemas con los WSDL de ningún servicio.</p>
<p>Es importante que añadas <a href="http://www.findjar.com/jar/commons-httpclient/jars/commons-httpclient-3.0.jar.html" target="_blank">commons-httpclient-3.0.jar</a> y <a href="http://www.findjar.com/jar/commons-codec/jars/commons-codec-1.3.jar.html" target="_blank">commons-codec.jar</a> al proyecto ya que XFire las necesita.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.thedotnetway.net/2010/02/16/xfire-y-eclipse/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Generando clases en Java desde WSDL autogenerados (asmx)</title>
		<link>http://www.thedotnetway.net/2009/04/14/generando-clases-en-java-desde-wsdl-autogenerados-asmx/</link>
		<comments>http://www.thedotnetway.net/2009/04/14/generando-clases-en-java-desde-wsdl-autogenerados-asmx/#comments</comments>
		<pubDate>Tue, 14 Apr 2009 15:05:30 +0000</pubDate>
		<dc:creator>Emilio Torrens</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[WebServices]]></category>

		<guid isPermaLink="false">http://thedotnetway.wordpress.com/2009/04/14/generando-clases-en-java-desde-wsdl-autogenerados-asmx/</guid>
		<description><![CDATA[Tenemos un par de Clientes que usan Java y tienen que consumir los servicios web de nuestras aplicaciones (asmx), hemos tenido muchos problemas generando las clases desde Eclipse o el Intellij IDEA desde el wsdl autogenerado de los asmx. Al final hemos encontrado la solución, usar el XFIRE, usando ese framework de Java no hemos<a class="rmore" href="http://www.thedotnetway.net/2009/04/14/generando-clases-en-java-desde-wsdl-autogenerados-asmx/">&#160;&#160; Read More ...</a>]]></description>
			<content:encoded><![CDATA[<p>Tenemos un par de Clientes que usan Java y tienen que consumir los servicios web de nuestras aplicaciones (asmx), hemos tenido muchos problemas generando las clases desde Eclipse o el Intellij IDEA desde el wsdl autogenerado de los asmx.</p>
<p>Al final hemos encontrado la solución, usar el XFIRE, usando ese framework de Java no hemos tenido problemas</p>
<p>Aquí hay un quickstart de cómo utilizar el plugin en el Eclipse: </p>
<p><a href="http://xfire.codehaus.org/Eclipse+Plugin">http://xfire.codehaus.org/Eclipse+Plugin</a> </p>
<p>Documentación:</p>
<p><a href="http://xfire.codehaus.org/User's+Guide">http://xfire.codehaus.org/User&#8217;s+Guide</a> </p>
<p>Hay una nueva versión que se llama CXF</p>
<p> <a href="http://cxf.apache.org/">http://cxf.apache.org/</a>
<p>Aunque no la hemos probado, así que para ir sobre seguro usa o recomienda usar XFIRE</p>
]]></content:encoded>
			<wfw:commentRss>http://www.thedotnetway.net/2009/04/14/generando-clases-en-java-desde-wsdl-autogenerados-asmx/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Un poco de Java</title>
		<link>http://www.thedotnetway.net/2009/01/27/un-poco-de-java/</link>
		<comments>http://www.thedotnetway.net/2009/01/27/un-poco-de-java/#comments</comments>
		<pubDate>Tue, 27 Jan 2009 08:15:00 +0000</pubDate>
		<dc:creator>Emilio Torrens</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://thedotnetway.wordpress.com/2009/01/27/un-poco-de-java/</guid>
		<description><![CDATA[Tenia algunos problemas con un cliente que consumía un servicio mío mandando XML por HTTP-POST, el IIS bloqueaba sus peticiones y no había manera de ver porque, así que me hice un cliente exacto al suyo para poder debugear el tema. Por si os sirve, aquí os dejo el código Java: import java.io.*; import java.net.*;<a class="rmore" href="http://www.thedotnetway.net/2009/01/27/un-poco-de-java/">&#160;&#160; Read More ...</a>]]></description>
			<content:encoded><![CDATA[<p>Tenia algunos problemas con un cliente que consumía un servicio mío mandando XML por HTTP-POST, el IIS bloqueaba sus peticiones y no había manera de ver porque, así que me hice un cliente exacto al suyo para poder debugear el tema.</p>
<p>Por si os sirve, aquí os dejo el código Java:</p>
<div class="wlWriterEditableSmartContent" id="scid:57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:54751447-7dcd-4b9f-9325-0dc5448a9aec" style="display:inline;float:none;margin:0;padding:0;">
<pre style="background-color:#FFFFFF;white-space:pre-wrap;overflow:auto;font-family:Microsoft Sans Serif;font-size:11px;"><span style="color:#0000FF;">import</span><span style="color:#000000;"> java.io.</span><span style="color:#000000;">*</span><span style="color:#000000;">;
</span><span style="color:#0000FF;">import</span><span style="color:#000000;"> java.net.</span><span style="color:#000000;">*</span><span style="color:#000000;">;
</span><span style="color:#0000FF;">import</span><span style="color:#000000;"> java.util.Properties;
</span><span style="color:#0000FF;">import</span><span style="color:#000000;"> java.io.BufferedReader;
</span><span style="color:#0000FF;">import</span><span style="color:#000000;"> java.io.IOException;
</span><span style="color:#0000FF;">import</span><span style="color:#000000;"> java.io.InputStream;

</span><span style="color:#0000FF;">public</span><span style="color:#000000;"> </span><span style="color:#0000FF;">static</span><span style="color:#000000;"> String POST(String sURL, String sData)
   {
        </span><span style="color:#0000FF;">try</span><span style="color:#000000;">
        {
            URL url </span><span style="color:#000000;">=</span><span style="color:#000000;"> </span><span style="color:#0000FF;">new</span><span style="color:#000000;"> URL(sURL);
            URLConnection urlc </span><span style="color:#000000;">=</span><span style="color:#000000;"> url.openConnection();
            urlc.setRequestProperty(</span><span style="color:#000000;">"</span><span style="color:#000000;">Content-Type</span><span style="color:#000000;">"</span><span style="color:#000000;">,    </span><span style="color:#000000;">"</span><span style="color:#000000;">application/x-www-form-urlencoded</span><span style="color:#000000;">"</span><span style="color:#000000;">);
            urlc.setDoOutput(</span><span style="color:#0000FF;">true</span><span style="color:#000000;">);
            OutputStream os </span><span style="color:#000000;">=</span><span style="color:#000000;"> urlc.getOutputStream();

            </span><span style="color:#0000FF;">byte</span><span style="color:#000000;">[] postData </span><span style="color:#000000;">=</span><span style="color:#000000;"> sData.getBytes();
            os.write(postData);

            os.flush();
            os.close();

            InputStream is </span><span style="color:#000000;">=</span><span style="color:#000000;"> urlc.getInputStream();

            </span><span style="color:#0000FF;">return</span><span style="color:#000000;"> parseISToString(is);

        }
        </span><span style="color:#0000FF;">catch</span><span style="color:#000000;">(IOException ex)
        {
            </span><span style="color:#0000FF;">return</span><span style="color:#000000;"> ex.getMessage();
        }
   }

   </span><span style="color:#0000FF;">public</span><span style="color:#000000;"> </span><span style="color:#0000FF;">static</span><span style="color:#000000;"> String parseISToString(java.io.InputStream is)
   {

        java.io.DataInputStream din </span><span style="color:#000000;">=</span><span style="color:#000000;"> </span><span style="color:#0000FF;">new</span><span style="color:#000000;"> java.io.DataInputStream(is);
        StringBuffer sb </span><span style="color:#000000;">=</span><span style="color:#000000;"> </span><span style="color:#0000FF;">new</span><span style="color:#000000;"> StringBuffer();

        </span><span style="color:#0000FF;">try</span><span style="color:#000000;">
        {
            String line </span><span style="color:#000000;">=</span><span style="color:#000000;"> </span><span style="color:#0000FF;">null</span><span style="color:#000000;">;
            </span><span style="color:#0000FF;">while</span><span style="color:#000000;">((line</span><span style="color:#000000;">=</span><span style="color:#000000;">din.readLine()) </span><span style="color:#000000;">!=</span><span style="color:#000000;"> </span><span style="color:#0000FF;">null</span><span style="color:#000000;">)
            {
                sb.append(line</span><span style="color:#000000;">+</span><span style="color:#000000;">"</span><span style="color:#000000;">\n</span><span style="color:#000000;">"</span><span style="color:#000000;">);
            }
            </span><span style="color:#0000FF;">return</span><span style="color:#000000;"> sb.toString();
        }
        </span><span style="color:#0000FF;">catch</span><span style="color:#000000;">(Exception ex)
        {
            </span><span style="color:#0000FF;">return</span><span style="color:#000000;"> ex.getMessage();
        }

   }
</span></pre>
<p><!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --></div>
]]></content:encoded>
			<wfw:commentRss>http://www.thedotnetway.net/2009/01/27/un-poco-de-java/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

