<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress.com" -->
<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/"
	>

<channel>
	<title>j2me &amp;laquo; WordPress.com Tag Feed</title>
	<link>http://en.wordpress.com/tag/j2me/</link>
	<description>Feed of posts on WordPress.com tagged "j2me"</description>
	<pubDate>Sun, 29 Nov 2009 08:43:47 +0000</pubDate>

	<generator>http://en.wordpress.com/tags/</generator>
	<language>en</language>

<item>
<title><![CDATA[J2ME Namaste Project: 6^ Parte - La classe Player]]></title>
<link>http://picard72.wordpress.com/2009/11/28/j2me-namaste-project-6-parte-la-classe-player/</link>
<pubDate>Sat, 28 Nov 2009 18:26:20 +0000</pubDate>
<dc:creator>picard72</dc:creator>
<guid>http://picard72.wordpress.com/2009/11/28/j2me-namaste-project-6-parte-la-classe-player/</guid>
<description><![CDATA[Dopo qualche gg. di tempo prendiamo adesso in esame la classe che gestirà il comportamento del playe]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Dopo qualche gg. di tempo <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  prendiamo adesso in esame la classe che gestirà il comportamento del player nell&#8217;ambito del gioco.</p>
<p>Poichè il nostro gioco è uno shoot &#8216;em up le azioni che il giocatore può compiere possono essere schematizzate nel modo seguente:</p>
<ol>
<li>Movimento nelle quatto direzioni (su, giù, destra, sinistra)</li>
<li>Fare fuoco</li>
<li>Acquisire rifornimenti o powerups.</li>
</ol>
<p>Poichè ogni nostro livello ha un&#8217;ampiezza di 128 x 128 pixel, occorrerà gestire il fatto che lo sprite del giocatore non può oltrepassare il bordo inferiore [superiore] dello schermo.</p>
<p>Nel nostro gioco ciascun livello viene completato quando il giocatore riesce ad attraversare ciascun quadro per tutta la lua lunghezza.</p>
<p>Non appena lo sprite del giocatore oltrepassa il limite superiore dello schermo il nuovo livello verrà automaticamente mostrato a video andando a rimpiazzare il precedente.</p>
<p>Vediamo adesso di codificare le regole fissate in precedenza:</p>
<pre>import java.io.DataInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.Vector;

import javax.microedition.lcdui.Image;
import javax.microedition.lcdui.game.LayerManager;
import javax.microedition.lcdui.game.Sprite;

public class PlayerSprite extends Sprite
{
 //final static byte DELTA_MOVE = 3;
 final static byte DELTA_MOVE = 1;
 final static byte MOVE_FORWARD = 1;
 final static byte MOVE_BACK = 2;
 final static byte MOVE_LEFT = 3;
 final static byte MOVE_RIGHT = 4;

 // Player properties
 private byte mLastMove = -1;
 private Bullet playerBullet;
 private int numOfBullets = 0;
 private int numOfLives = 0;
 private int playerStartx = 0;
 private int playerStarty = 0;
 private boolean havePowerUps = false;
</pre>
<p>Anzitutto dichiariamo la classe PlayerSprite come derivata dalla classe Sprite che il package J2ME ci mette a disposizione in modo da ridefinire (override) i metodi che ci interessano.</p>
<p>Definiamo poi una serie di variabili di classe il cui significato è abbastanza esplicativo e verrà immediato una volta illustrati i metodi in cui vengono impiegate.</p>
<p>Di particolare c&#8217;è solo la variabile playerBullet, che è un oggetto della classe Bullet, che vedremo in seguito.</p>
<p>Questi sono i metodi che gestiscono il movimento del giocatore:</p>
<pre>public void moveForward()
 {
 setPosition(getX(), getY() - DELTA_MOVE);
 mLastMove = MOVE_FORWARD;
 }

 public void moveBack()
 {
 setPosition(getX(), getY() + DELTA_MOVE);
 mLastMove = MOVE_BACK;
 }

 public void moveLeft()
 {
 setPosition(getX() - DELTA_MOVE, getY());
 mLastMove = MOVE_LEFT;
 }

 public void moveRight()
 {
 setPosition(getX() + DELTA_MOVE, getY());
 mLastMove = MOVE_RIGHT;
 }
</pre>
<p>Ed esattamente, in base alla direzione scelta dal giocatore la sua posizione varia di DELTA_MOVE pixel per volta, ed al termine di ciascun passo viene memorizzata l&#8217;ultima scelta del giocatore (mLastMove).</p>
<p>Questi metodi invece sono dei test che verificano se il giocatore stia cercanddi oltrepassare il bordo inferiore dello schermo o quello superiore (termine del livello):</p>
<pre>public boolean reachLowerLimit()
 {
 if (getY() &#60;= 105)
 {
 return false;
 }
 return true;
 }

 public boolean reachEndOfLevel()
 {
 if (getY() &#62; 1)
 {
 return false;
 }
 return true;
 }
</pre>
<p>Nel caso in cui il giocatore dovesse oltreppassare uno dei confini dello schermo, esso deve rimbalzato indietro alla posizione precedente, questo requisito viene soddisfatto dal metodo undo:</p>
<pre>public void undo()
 {
 if (mLastMove == MOVE_LEFT)
 {
 setPosition(getX() + DELTA_MOVE, getY());
 }

 if (mLastMove == MOVE_RIGHT)
 {
 setPosition(getX() - DELTA_MOVE, getY());
 }

 if (mLastMove == MOVE_FORWARD)
 {
 setPosition(getX(), getY() + DELTA_MOVE);
 }

 if (mLastMove == MOVE_BACK)
 {
 setPosition(getX(), getY() - DELTA_MOVE);
 }
 }
</pre>
<p>Quando il giocatore attacca, facendo fuoco, accadono 2 cose fondamentali:</p>
<ol>
<li>Un nuovo proiettile viene accodato</li>
<li>Un nemico che si trovasse lungo il percorso del proiettile verrà colpito e la sua reistenza verrò abbassata di un punto. Naturalemnte se la resistenza del nemico raggiunge zero, questa condizione decreterà la sua morte.</li>
</ol>
<p>Stabiliamo anche le seguenti regole:</p>
<ul>
<li>Un giocatore non può attaccare nuovamente se il proiettile non ha completato il suo percorso colpendo il nemico, ovvero giungendo in prossimità del bordo superiore dello schermo. La frequenza di fuoco del giocatore cioè è pari a 1. Si può anche interpretare come un fucile che spari un colpo per volta <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </li>
<li>Se il giocatore viene colpito muore e gli viene sottratta una vita dal numero di quelle disponibili</li>
</ul>
<p>Questo metodo accoda un nuovo proiettile nel cannone del giocatore se la prima delle suddette regole viene rispettata:</p>
<pre>public void encodeBullet(LayerManager layerManager)
 {
 if ( playerBullet == null )
 {    
 try {
 playerBullet = new Bullet(Image.createImage("/fire1.png"),layerManager);
 playerBullet.setPosition(getX() + 9, getY() - 10);
 } catch (IOException e) {
 // TODO Auto-generated catch block
 e.printStackTrace();
 }
 }
 }
</pre>
<p>Il metodo che segue invece gestisce l&#8217;attacco del giocatore in tutte le sue fasi: aggiorna la posizione del proiettile per ogni turno, accoda un nuovo proiettile nel caso in cui il giocatore possa attaccare, gestisce la collisione del proiettile con il nemico e ne diminuisce la resistenza nel caso in cui quest&#8217;ultimo venga colpito.</p>
<p>Se il nemico muore (vedi sopra) il suo sprite viene rimosso dallo schermo, analogamente se il proiettile termina la sua &#8220;vita utile&#8221;, anch&#8217;esso viene rimosso dallo schermo.</p>
<pre>public boolean attack(Vector enemies, LayerManager layerManager)
 {
 byte bulletSpeed = 2;

 if ( playerBullet != null )
 {
 playerBullet.setPosition(playerBullet.getX(), playerBullet.getY() - bulletSpeed);

 for (int kk = 0; kk &#60; enemies.size(); kk++)
 {
 if ( playerBullet.collidesWith((GameEnemy)enemies.elementAt(kk), true) )
 {
 layerManager.remove(playerBullet);
 playerBullet = null;
 int newStrength = ((GameEnemy)enemies.elementAt(kk)).getStrength() - 1;
 ((GameEnemy)enemies.elementAt(kk)).setStrength(String.valueOf(newStrength));

 if ( ((GameEnemy)enemies.elementAt(kk)).getStrength() &#60;=0 )
 {
 layerManager.remove((GameEnemy)enemies.elementAt(kk));
 ((GameEnemy)enemies.elementAt(kk)).removeZombieBullet(layerManager);
 enemies.removeElementAt(kk);
 }
 return true;
 }
 }

 if ( playerBullet.getY() &#60;= 3)
 {
 layerManager.remove(playerBullet);
 playerBullet = null;
 return false;
 }
 }

 return false;
 }
</pre>
<p>Seguono poi una serie di metodi di utilità per testare di volta in volta le proprirtà del giocatore o per inizializzare la sua posizione.</p>
<p>Ecco qui di seguito il codice della classe per intero, per qualsiasi dubbio o chiarimenti, chiedete pure <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<pre>import java.io.DataInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.Vector;

import javax.microedition.lcdui.Image;
import javax.microedition.lcdui.game.LayerManager;
import javax.microedition.lcdui.game.Sprite;

public class PlayerSprite extends Sprite
{
	//final static byte DELTA_MOVE = 3;
	final static byte DELTA_MOVE = 1;
	final static byte MOVE_FORWARD = 1;
	final static byte MOVE_BACK = 2;
	final static byte MOVE_LEFT = 3;
	final static byte MOVE_RIGHT = 4;

	// Player properties
	private byte mLastMove = -1;
	private Bullet playerBullet;
	private int numOfBullets = 0;
	private int numOfLives = 0;
	private int playerStartx = 0;
	private int playerStarty = 0;
	private boolean havePowerUps = false;

	public PlayerSprite(Image image, int frameWidth, int frameHeight)
	{
		super(image, frameWidth, frameHeight);
		initializeSprite(1);

		/*
		try {
        	InputStream is =
        	     getClass().getResourceAsStream("/cannon.wav");
        	playerSound = Manager.createPlayer(is, "audio/x-wav");
        }
        catch (MediaException pe)
        { pe.printStackTrace();}
        catch (IOException ioe)
        { ioe.printStackTrace();}
        */
	}

	public void initializeSprite(int level)
	{
		setFrame(0);
		this.setPlayerProperties(level);
		setPosition(playerStartx, playerStarty);
		this.defineCollisionRectangle(10, 20, 10, 20);
	}

	private void setPlayerProperties(int level)
	{
		int search = 0;
		String playerProps = null;
		try {
			playerProps = readPlayerProperties(level);
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		Vector playerProperties = new Vector();
		int yy = 0;

		do
		{
			yy = playerProps.indexOf(";", search);

			if (yy != -1)
			{
				playerProperties.addElement(playerProps.substring(search,yy));
				search = yy+1;
			}
		}	

		while (yy != -1);

		this.playerStartx = Integer.parseInt((String)playerProperties.elementAt(0));
		this.playerStarty = Integer.parseInt((String)playerProperties.elementAt(1));

		if (  ((String)playerProperties.elementAt(2)).equals("T")  )
		{
			this.havePowerUps = true;
		}
		else
		{
			this.havePowerUps = false;
		}
	}

		private String readPlayerProperties(int level) throws IOException
		{
			String filler = "0";
			if ( level &#60; 10 ) filler = "00";
		    InputStream file = getClass().getResourceAsStream("/player/level." + filler + level);
		    DataInputStream in = new DataInputStream(file);
		    String theBuf = "";
		    int y = 0;

		    try
		    {
		    	do
		    	{
		    		y = in.read();
		    		if ( y != -1 )
		    		{
		    			theBuf += (char) y;
		    		}
		    	} while ( y != -1);

		    } finally {
		        in.close();
		    }
		    return theBuf;
		}

	public void setLives (int lives)
	{
		this.numOfLives = lives;
	}

	public int getLives ()
	{
		return this.numOfLives;
	}

	public void moveForward()
	{
		setPosition(getX(), getY() - DELTA_MOVE);
		mLastMove = MOVE_FORWARD;
	}

	public void moveBack()
	{
		setPosition(getX(), getY() + DELTA_MOVE);
		mLastMove = MOVE_BACK;
	}

	public void moveLeft()
	{
		setPosition(getX() - DELTA_MOVE, getY());
		mLastMove = MOVE_LEFT;
	}

	public void moveRight()
	{
		setPosition(getX() + DELTA_MOVE, getY());
		mLastMove = MOVE_RIGHT;
	}

	public void undo()
	{
		if (mLastMove == MOVE_LEFT)
		{
			setPosition(getX() + DELTA_MOVE, getY());
		}

		if (mLastMove == MOVE_RIGHT)
		{
			setPosition(getX() - DELTA_MOVE, getY());
		}

		if (mLastMove == MOVE_FORWARD)
		{
			setPosition(getX(), getY() + DELTA_MOVE);
		}

		if (mLastMove == MOVE_BACK)
		{
			setPosition(getX(), getY() - DELTA_MOVE);
		}
	}

	public boolean reachLowerLimit()
	{
		if (getY() &#60;= 105)
		{
			return false;
		}
		return true;
	}

	public boolean reachEndOfLevel()
	{
		if (getY() &#62; 1)
		{
			return false;
		}
		return true;
	}

	public boolean bulletEncoded()
	{
		if ( playerBullet == null )
			return false;
		else
			return true;
	}

	public void encodeBullet(LayerManager layerManager)
	{
		if ( playerBullet == null )
		{
			try {
				playerBullet = new Bullet(Image.createImage("/fire1.png"),layerManager);
				playerBullet.setPosition(getX() + 9, getY() - 10);
			} catch (IOException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
		}
	}

	public void setAvailableBullets(int num)
	{
		this.numOfBullets = num;
	}

	public int getAvailableBullets()
	{
		return this.numOfBullets;
	}

	public boolean havePowerUps()
	{
		return this.havePowerUps;
	}

	public boolean attack(Vector enemies, LayerManager layerManager)
	{
		byte bulletSpeed = 2;

		if ( playerBullet != null )
		{
			playerBullet.setPosition(playerBullet.getX(), playerBullet.getY() - bulletSpeed);

			for (int kk = 0; kk &#60; enemies.size(); kk++)
			{
				if ( playerBullet.collidesWith((GameEnemy)enemies.elementAt(kk), true) )
				{
					layerManager.remove(playerBullet);
					playerBullet = null;
					int newStrength = ((GameEnemy)enemies.elementAt(kk)).getStrength() - 1;
					((GameEnemy)enemies.elementAt(kk)).setStrength(String.valueOf(newStrength));

					if ( ((GameEnemy)enemies.elementAt(kk)).getStrength() &#60;=0 )
					{
						layerManager.remove((GameEnemy)enemies.elementAt(kk));
						((GameEnemy)enemies.elementAt(kk)).removeZombieBullet(layerManager);
						enemies.removeElementAt(kk);
					}
					return true;
				}
			}

			if ( playerBullet.getY() &#60;= 3)
			{
				layerManager.remove(playerBullet);
				playerBullet = null;
				return false;
			}
		}

		return false;
	}

	public void implementPower(Powerup elementAt, GameLogic gameLogic)
	{
		if (elementAt.getType().equals("AMMO"))
		{
			this.setAvailableBullets(this.numOfBullets + elementAt.getAmount());
		}

		if (elementAt.getType().equals("TARGET"))
		{
			gameLogic.stageCompleted();
		}
	}

	/*
	private void stopBulletSound()
	{
		try {
			playerSound.stop();
		} catch (MediaException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}*/
}
</pre>
<p>&#160;</p>
<div id="_mcePaste" style="overflow:hidden;position:absolute;left:-10000px;top:3623px;width:1px;height:1px;">import java.io.DataInputStream;<br />
import java.io.IOException;<br />
import java.io.InputStream;<br />
import java.util.Vector;</p>
<p>import javax.microedition.lcdui.Image;<br />
import javax.microedition.lcdui.game.LayerManager;<br />
import javax.microedition.lcdui.game.Sprite;</p>
<p>public class PlayerSprite extends Sprite<br />
{<br />
//final static byte DELTA_MOVE = 3;<br />
final static byte DELTA_MOVE = 1;<br />
final static byte MOVE_FORWARD = 1;<br />
final static byte MOVE_BACK = 2;<br />
final static byte MOVE_LEFT = 3;<br />
final static byte MOVE_RIGHT = 4;</p>
<p>// Player properties<br />
private byte mLastMove = -1;<br />
private Bullet playerBullet;<br />
private int numOfBullets = 0;<br />
private int numOfLives = 0;<br />
private int playerStartx = 0;<br />
private int playerStarty = 0;<br />
private boolean havePowerUps = false;</p>
<p>public PlayerSprite(Image image, int frameWidth, int frameHeight)<br />
{<br />
super(image, frameWidth, frameHeight);<br />
initializeSprite(1);</p>
<p>/*<br />
try {<br />
InputStream is =<br />
getClass().getResourceAsStream(&#8220;/cannon.wav&#8221;);<br />
playerSound = Manager.createPlayer(is, &#8220;audio/x-wav&#8221;);<br />
}<br />
catch (MediaException pe)<br />
{ pe.printStackTrace();}<br />
catch (IOException ioe)<br />
{ ioe.printStackTrace();}<br />
*/<br />
}</p>
<p>public void initializeSprite(int level)<br />
{<br />
setFrame(0);<br />
this.setPlayerProperties(level);<br />
setPosition(playerStartx, playerStarty);<br />
this.defineCollisionRectangle(10, 20, 10, 20);<br />
}</p>
<p>private void setPlayerProperties(int level)<br />
{<br />
int search = 0;<br />
String playerProps = null;<br />
try {<br />
playerProps = readPlayerProperties(level);<br />
} catch (IOException e) {<br />
// TODO Auto-generated catch block<br />
e.printStackTrace();<br />
}<br />
Vector playerProperties = new Vector();<br />
int yy = 0;</p>
<p>do<br />
{<br />
yy = playerProps.indexOf(&#8220;;&#8221;, search);</p>
<p>if (yy != -1)<br />
{<br />
playerProperties.addElement(playerProps.substring(search,yy));<br />
search = yy+1;<br />
}<br />
}</p>
<p>while (yy != -1);</p>
<p>this.playerStartx = Integer.parseInt((String)playerProperties.elementAt(0));<br />
this.playerStarty = Integer.parseInt((String)playerProperties.elementAt(1));</p>
<p>if (  ((String)playerProperties.elementAt(2)).equals(&#8220;T&#8221;)  )<br />
{<br />
this.havePowerUps = true;<br />
}<br />
else<br />
{<br />
this.havePowerUps = false;<br />
}<br />
}</p>
<p>private String readPlayerProperties(int level) throws IOException<br />
{<br />
String filler = &#8220;0&#8243;;<br />
if ( level &#60; 10 ) filler = &#8220;00&#8243;;<br />
InputStream file = getClass().getResourceAsStream(&#8220;/player/level.&#8221; + filler + level);<br />
DataInputStream in = new DataInputStream(file);<br />
String theBuf = &#8220;&#8221;;<br />
int y = 0;</p>
<p>try<br />
{<br />
do<br />
{<br />
y = in.read();<br />
if ( y != -1 )<br />
{<br />
theBuf += (char) y;<br />
}<br />
} while ( y != -1);</p>
<p>} finally {<br />
in.close();<br />
}<br />
return theBuf;<br />
}</p>
<p>public void setLives (int lives)<br />
{<br />
this.numOfLives = lives;<br />
}</p>
<p>public int getLives ()<br />
{<br />
return this.numOfLives;<br />
}</p>
<p>public void moveForward()<br />
{<br />
setPosition(getX(), getY() &#8211; DELTA_MOVE);<br />
mLastMove = MOVE_FORWARD;<br />
}</p>
<p>public void moveBack()<br />
{<br />
setPosition(getX(), getY() + DELTA_MOVE);<br />
mLastMove = MOVE_BACK;<br />
}</p>
<p>public void moveLeft()<br />
{<br />
setPosition(getX() &#8211; DELTA_MOVE, getY());<br />
mLastMove = MOVE_LEFT;<br />
}</p>
<p>public void moveRight()<br />
{<br />
setPosition(getX() + DELTA_MOVE, getY());<br />
mLastMove = MOVE_RIGHT;<br />
}</p>
<p>public void undo()<br />
{<br />
if (mLastMove == MOVE_LEFT)<br />
{<br />
setPosition(getX() + DELTA_MOVE, getY());<br />
}</p>
<p>if (mLastMove == MOVE_RIGHT)<br />
{<br />
setPosition(getX() &#8211; DELTA_MOVE, getY());<br />
}</p>
<p>if (mLastMove == MOVE_FORWARD)<br />
{<br />
setPosition(getX(), getY() + DELTA_MOVE);<br />
}</p>
<p>if (mLastMove == MOVE_BACK)<br />
{<br />
setPosition(getX(), getY() &#8211; DELTA_MOVE);<br />
}<br />
}</p>
<p>public boolean reachLowerLimit()<br />
{<br />
if (getY() &#60;= 105)<br />
{<br />
return false;<br />
}<br />
return true;<br />
}</p>
<p>public boolean reachEndOfLevel()<br />
{<br />
if (getY() &#62; 1)<br />
{<br />
return false;<br />
}<br />
return true;<br />
}</p>
<p>public boolean bulletEncoded()<br />
{<br />
if ( playerBullet == null )<br />
return false;<br />
else<br />
return true;<br />
}</p>
<p>public void encodeBullet(LayerManager layerManager)<br />
{<br />
if ( playerBullet == null )<br />
{<br />
try {<br />
playerBullet = new Bullet(Image.createImage(&#8220;/fire1.png&#8221;),layerManager);<br />
playerBullet.setPosition(getX() + 9, getY() &#8211; 10);<br />
} catch (IOException e) {<br />
// TODO Auto-generated catch block<br />
e.printStackTrace();<br />
}<br />
}<br />
}</p>
<p>public void setAvailableBullets(int num)<br />
{<br />
this.numOfBullets = num;<br />
}</p>
<p>public int getAvailableBullets()<br />
{<br />
return this.numOfBullets;<br />
}</p>
<p>public boolean havePowerUps()<br />
{<br />
return this.havePowerUps;<br />
}</p>
<p>public boolean attack(Vector enemies, LayerManager layerManager)<br />
{<br />
byte bulletSpeed = 2;</p>
<p>if ( playerBullet != null )<br />
{<br />
playerBullet.setPosition(playerBullet.getX(), playerBullet.getY() &#8211; bulletSpeed);</p>
<p>for (int kk = 0; kk &#60; enemies.size(); kk++)<br />
{<br />
if ( playerBullet.collidesWith((GameEnemy)enemies.elementAt(kk), true) )<br />
{<br />
layerManager.remove(playerBullet);<br />
playerBullet = null;<br />
int newStrength = ((GameEnemy)enemies.elementAt(kk)).getStrength() &#8211; 1;<br />
((GameEnemy)enemies.elementAt(kk)).setStrength(String.valueOf(newStrength));</p>
<p>if ( ((GameEnemy)enemies.elementAt(kk)).getStrength() &#60;=0 )<br />
{<br />
layerManager.remove((GameEnemy)enemies.elementAt(kk));<br />
((GameEnemy)enemies.elementAt(kk)).removeZombieBullet(layerManager);<br />
enemies.removeElementAt(kk);<br />
}<br />
return true;<br />
}<br />
}</p>
<p>if ( playerBullet.getY() &#60;= 3)<br />
{<br />
layerManager.remove(playerBullet);<br />
playerBullet = null;<br />
return false;<br />
}<br />
}</p>
<p>return false;<br />
}</p>
<p>public void implementPower(Powerup elementAt, GameLogic gameLogic)<br />
{<br />
if (elementAt.getType().equals(&#8220;AMMO&#8221;))<br />
{<br />
this.setAvailableBullets(this.numOfBullets + elementAt.getAmount());<br />
}</p>
<p>if (elementAt.getType().equals(&#8220;TARGET&#8221;))<br />
{<br />
gameLogic.stageCompleted();<br />
}<br />
}</p>
<p>/*<br />
private void stopBulletSound()<br />
{<br />
try {<br />
playerSound.stop();<br />
} catch (MediaException e) {<br />
// TODO Auto-generated catch block<br />
e.printStackTrace();<br />
}<br />
}*/<br />
}</p>
</div>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[JAVA ME UI FRAMEWORKS-P2]]></title>
<link>http://phutan85.wordpress.com/2009/11/27/java-me-ui-frameworks-p2/</link>
<pubDate>Fri, 27 Nov 2009 01:42:41 +0000</pubDate>
<dc:creator>phutan85</dc:creator>
<guid>http://phutan85.wordpress.com/2009/11/27/java-me-ui-frameworks-p2/</guid>
<description><![CDATA[8. Kuix: Kuix(Kalmeo User Interface eXtensions) cung cấp hầu hết các phần tử đồ họa như button, text]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p><strong>8. Kuix:</strong></p>
<p>Kuix(Kalmeo User Interface eXtensions) cung cấp hầu hết các phần tử đồ họa như button, textfield, menu, tab… để tạo ra giao diện đồ họa và sử dụng XML/CSS để mô tả screen và các hoạt động người dùng trong ứng dụng.</p>
<p>Địa chỉ: <a href="http://www.kalmeo.org/projects/kuix">http://www.kalmeo.org/projects/kuix</a></p>
<p><strong>9. LWUIT(Lightweight UI Toolkit for Java ME) :</strong></p>
<p>LWUIT cung cấp các component  để tạo ra giao diện, với mô hình lập trình tương tự Swing. Các thành phần chính của nó bao gồm: layout, PLAF &#38; themes, Font, touch screen, animation, widgets, 3D, painter, modal dialog, external tool và I18N/L10N.</p>
<p>Địa chỉ: <a href="https://lwuit.dev.java.net/">https://lwuit.dev.java.net/</a></p>
<p><strong>10. MWT(Micro Window Toolkit):</strong></p>
<p>Lấy cảm hứng từ các framework AWT, Swing và SMT, MWT cung cấp một framework UI được thiết kế và tùy chỉnh cho các thiết bị nhỏ.</p>
<p>Địa chỉ: <a href="http://j2me-mwt.sourceforge.net/">http://j2me-mwt.sourceforge.net/</a></p>
<p><strong>11. Nextel:</strong></p>
<p>Nextel là công cụ mã nguồn mở chứa các thư viện để phát triển UI và RMS trên J2ME handset.</p>
<p>Các công cụ cửa sổ, OWT(Open Windowing Toolkit), sử dụng một mô hình container/component, và cung cấp giao diện cho phép các developer tạo ra các giao diện người dùng. Công cụ này được thiết ký dành riêng cho MIDP handsets. Và nó được xây dựng dựa trên Canvas.</p>
<p>Địa chỉ: <a href="http://nextel.sourceforge.net/">http://nextel.sourceforge.net/</a></p>
<p><strong>12. OpenBaseMovil:</strong></p>
<p>Ngoài cơ sở dữ liệu và scripting engine, OpenBaseMovil chứa một view khai báo định nghĩa ngôn ngữ. Với file XML bạn có thể thiết kế các view theo ý mình, và chúng hướng tới các script và data: bạn có thể duyệt một tập hợp các kết quả có ít hơn 10 dòng mã.</p>
<p>Địa chỉ: <a href="http://www.openbasemovil.org/about/">http://www.openbasemovil.org/about/</a></p>
<p><strong>13. Synclast:</strong></p>
<p>Synclast UI API là một công cụ mở rộng cho việc tạo ra giao diện người dùng tùy chỉnh màu sắc trên MIDP một cách trực quan.</p>
<p>Đia chỉ: <a href="http://www.synclast.com/ui_api.jsp">http://www.synclast.com/ui_api.jsp</a></p>
<p><strong>14. Thinlet:</strong></p>
<p>Thinlet là một công cụ GUI, một lớp Java đơn giãn, phân tích  hierarchy và các property của GUI, xử lý các tương tác ngườ diùng và gọi ở mức logic business. Nó tách biệt giữa phần trình bày đồ họa với các phương code java.</p>
<p>Địa chỉ: <a href="http://thinlet.sourceforge.net/home.html">http://thinlet.sourceforge.net/home.html</a></p>
<p><strong>15. TWUIK:</strong></p>
<p>TWUIK Rich Media Engine là một công nghệ UI kết hợp cả graphic, animation, rich media và các tương tác triển khai trên một phạm vi rộng lớn hỗ trợ các thiết bị J2ME.</p>
<p>Địa chỉ: <a href="http://www.tricastmedia.com/twuik/">http://www.tricastmedia.com/twuik/</a></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Enhancement on Soft-Key Detection]]></title>
<link>http://leahayes.wordpress.com/2009/11/26/enhancement-on-soft-key-detection/</link>
<pubDate>Thu, 26 Nov 2009 20:19:16 +0000</pubDate>
<dc:creator>Lea Hayes</dc:creator>
<guid>http://leahayes.wordpress.com/2009/11/26/enhancement-on-soft-key-detection/</guid>
<description><![CDATA[With many thanks to Graham over at the Nokia Discussion forums I came across an interesting Wiki art]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>With many thanks to Graham over at the Nokia Discussion forums I came across an interesting Wiki article (<a href="http://wiki.forum.nokia.com/index.php/Platform_independent_key_events_processing" target="_blank">Platform independent key events processing</a>) which provides a class that tries to determine common non-standard keycodes for a variety of handsets. The second handset that I tested was an LG KS360, unfortunately this detection class was unable to detect the soft key buttons.</p>
<p>I have combined my welcome screen based soft-key detection into that class as a fail-safe, and this seems to be working great. So, where possible the correct keycodes are detected by working out the device vendor, and then where all else fails, accept the first non-standard keycode that is returned from the welcome screen for the left soft-key.</p>
<p>I have also added a <code><span style="color:#008000;">SOFTKEY_GUESSED</span></code><span style="color:#008000;"> </span>field which indicates if the left soft-key value was guessed. If it was, then you can decide whether or not to allow other non-standard keys to represent the right soft-key. You might decide against guessing the right soft-key in more critical scenarios where data could potentially be lost by pressing another unrelated button on the keypad.</p>
<p>The combination of these two techniques seems to provide a much better solution.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[JAVA ME UI FRAMEWORKS-P1]]></title>
<link>http://phutan85.wordpress.com/2009/11/26/java-me-ui-frameworks-p1/</link>
<pubDate>Thu, 26 Nov 2009 10:21:13 +0000</pubDate>
<dc:creator>phutan85</dc:creator>
<guid>http://phutan85.wordpress.com/2009/11/26/java-me-ui-frameworks-p1/</guid>
<description><![CDATA[Sau đây tôi xin giới thiệu một số framework J2ME dựa trên Canvas(low-level UI). Bạn có thể dùng chún]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Sau đây tôi xin giới thiệu một số framework J2ME dựa trên Canvas(low-level UI). Bạn có thể dùng chúng để tạo ra các giao diễn đẹp thay vì phải sử dụng các lớp trong high-level UI của MIDP như: Form, List, TextBox…</p>
<p><strong>1 .Apime:</strong></p>
<p>Apime là một framework cung cấp nhiều chức năng cho J2ME/MIDP. Nhân(core) của nó là UI, với các components cơ bản được tạo ra theo cấu trúc swing. Ngoài ra nó còn có các lớp dùng để quản lý file và tùy chỉnh skins, internationalization, keyboard cho nhiều loại ngôn ngữ khác nhau…</p>
<p>Địa chỉ: <a href="http://www.java4ever.com/index.php?section=j2me&#38;project=apime&#38;menu=main&#38;lang=_en">http://www.java4ever.com/index.php?section=j2me&#38;project=apime&#38;menu=main&#38;lang=_en</a>.</p>
<p><strong>2. Fire(Flexible Interface Rendering Engine):</strong></p>
<p>Tập hợp các thành phần cơ bản của Fire cung cấp tất cả các chức năng của các thành phần Java ME GUI có sẵn trong MIDP 2.0 như Form, Items… cộng với một số thành phần giao diện, theme, animation, popup menu và các thành phần layout đẹp mắt.</p>
<p>Địa chỉ: <a href="http://sourceforge.net/projects/fire-j2me/">http://sourceforge.net/projects/fire-j2me/</a></p>
<p><strong>3. J2ME GUI:</strong></p>
<p>Một thư viện GUI lightweight cung cấp tất cả các thành phần giao diện tương tự như MIDP. Ngoài ra nó còn có thể được mở  rộng tùy theo nhu cầu phát triển. Hiệu suất cao trên cả những thiết bị có cấu hình thấp, với các style tùy chỉnh, và tương thích với nhiều loại thiết bị.</p>
<p>Địa chỉ: <a href="http://www.garcer.com/">http://www.garcer.com/</a></p>
<p><strong>4. J2ME Lightweight Visual Component Library(LwVCL):</strong></p>
<p>LwVCL hỗ trợ cả java(J2SE/J2ME Profile) và .NET platform.</p>
<p>Địa chỉ: <a href="http://www.lwvcl.com/j2me.php">http://www.lwvcl.com/j2me.php</a></p>
<p><strong>5. J2ME Polish:</strong></p>
<p>J2ME Polish chứa bộ công cụ LUSH để tùy biến giao diện mà không thay đổi mã nguồn ứng dụng. Việc thiết kế các hiệu ứng và chuyển động được đặt trong file CSS bên ngoài, tương tự như Web. Ngoài ra, còn có một designer WYSIMYG cho thiết kế giao diện.</p>
<p>Địa chỉ: <a href="http://www.j2mepolish.org/">http://www.j2mepolish.org/</a></p>
<p><strong>6. J4ME:</strong></p>
<p>J4ME là một thư viện mã nguồn mỡ dùng để build các ứng dụng J2ME. Nó giải quyết nhiều hạn chế của J2ME: UI, Logging, GPS và các phương thức nằm bên ngoài J2ME.</p>
<p>Địa chỉ: <a href="http://code.google.com/p/j4me/">http://code.google.com/p/j4me/</a></p>
<p><strong>7. jMobileCore:</strong></p>
<p>Thư viện jMobileCore là một tool mạnh để tạo các ứng dụng trên J2ME. Nó hỗ trợ phát triển các thành phần giao diện, truy cập dữ liệu nhanh và truyền thông tin cậy và đơn giãn hóa việc tạo ra các ứng dụng đa luồng.</p>
<p>Địa chỉ: <a href="http://jmobilecore.sourceforge.net/">http://jmobilecore.sourceforge.net/</a></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[MIDP 2 Game Classes-P2]]></title>
<link>http://phutan85.wordpress.com/2009/11/24/midp-2-game-classes-p2/</link>
<pubDate>Tue, 24 Nov 2009 15:42:56 +0000</pubDate>
<dc:creator>phutan85</dc:creator>
<guid>http://phutan85.wordpress.com/2009/11/24/midp-2-game-classes-p2/</guid>
<description><![CDATA[II. GameCanvas: Lớp Canvas được thiết kế cho các ứng dụng hướng sự kiện(event-driven), đó là màn hìn]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p><strong>II. GameCanvas:</strong></p>
<p>Lớp Canvas được thiết kế cho các ứng dụng hướng sự kiện(event-driven), đó là màn hình được cập nhật khi người dùng nhấn một phím hay một soft-key. Tuy nhiên, các ứng dụng game có xu hướng hướng thời gian(time-driven) và tiếp tục update screen cho dù người dùng có nhấn phím hay không, và lớp GameCanvas cung cấp cơ sở giao diện cho người dùng game, ngoài các đặc điểm kế thừa từ lớp Canvas, nó còn có các đặc điểm nổi bật hơn lớp Canvas. Đầu tiên, ứng dụn game được điều khiển một cách chính xác khi display được update, thay vì phải đợi system sofware gọi phương thức paint(). Thứ hai, nó điều khiển được vùng màn hình  được update. Thứ 3, nó cung cấp các khả năng đặc biệt: đó là bộ đệm graphics off-screen và khả năng query trạng thái phím.</p>
<p><strong>2.1. Key Polling:</strong></p>
<p>Lớp GameCanvas cung cấp khả năng thu nhận trạng thái phím thay thế cho implement các phương thức callback để xử lý cho mỗi sự kiện phím. Key polling tạo ra sự logic trong việc xử lý phím và thực thi tại thời điểm thích hợp trong vòng lặp game. Đồng thời, nó cho phép detect việc nhấn nhiều phím tại 1 thời điểm trên thiết bị hỗ trợ chúng.</p>
<p>Phương thức getKeyStates() trả về trạng thái phím với một giá trị integer, mà mỗi bit của nó tương ứng với một specific key được nhấn hay đã được nhấn ở lần trước đó của phương thức getKeyStates(). Ví dụ:</p>
<p>int keyStates = getKeyStates();</p>
<p>if ((keyStates &#38; UP_PRESSED) != 0) yPosition&#8211;;</p>
<p>if ((keyStates &#38; DOWN_PRESSED) != 0) yPosition++;</p>
<p>if ((keyStates &#38; FIRE_PRESSED) != 0) fireRocket();</p>
<p><strong>2.2. Screen Buffer:</strong></p>
<p>Không giống như lớp Canvas(chia sẻ tài nguyên screen với các ứng dụng khác), mỗi đối tượng GameCanvas sẽ có một screen-buffer riêng, để developer có thể vẽ lên nó tại bất kỳ thời điểm nào sử dụng đối tượng Graphics. Mỗi đối tượng Graphics được tạo ra bằng cách gọi phương thức getGraphics().</p>
<p>Nó tối thiểu được việc sử dụng bộ nhớ heap và tránh được lỗi bị flicker khi vẽ lại màng hình. Bạn chỉ cần gọi phương thức flushGraphics() để hiển thị đối tượng Graphics này ra màn hình. Kỹ thuật này thức chất là nó vẽ một image tạm thời từ đối tượng display thực tế, khi gọi phương thức flushGraphics() thì nó hiển thị đối tượng image tạm thời này lên màn hình. Nó có thể flush toàn bộ hay một vùng buffer. Các phương thức này sẽ không làm gì nếu GameCanvas không biểu diễn currently.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[MIDP 2 Game Classes-P1]]></title>
<link>http://phutan85.wordpress.com/2009/11/24/midp-2-game-classes-p1/</link>
<pubDate>Tue, 24 Nov 2009 15:37:32 +0000</pubDate>
<dc:creator>phutan85</dc:creator>
<guid>http://phutan85.wordpress.com/2009/11/24/midp-2-game-classes-p1/</guid>
<description><![CDATA[Ngày nay, với sự phổ biến của J2ME và sự bùng nổ của các loại game trên điện thoại di động  đã thôi ]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Ngày nay, với sự phổ biến của J2ME và sự bùng nổ của các loại game trên điện thoại di động  đã thôi thúc các nhà sản xuất tùy chỉnh lại các lớp để hổ trợ cho việc phát triển game. Và vấn đề chính ở đây chính là tính linh động(portability). Ví dụ, sử dụng lớp Sprite trong Siemens thì sẽ gặp rắc rối trong việc cài đặt cho các loại điện thoại Nokia, để khắc phục vấn đề này, bạn phải re-implement lớp Sprite.</p>
<p>Với MIDP 2.0, các vấn đề về tính linh động của game được giải quyết với 5 lớp sau:</p>
<ul>
<li>GameCanvas</li>
<li>Sprite</li>
<li>Layer</li>
<li>LayerManager</li>
<li>TiledLayer</li>
</ul>
<p>Trong đó, lớp Layer là lớp trừu tượng, làm superclass cho các lớp: Sprite, LayerManager, và TiledLayer. Cả 5 lớp này nằm trong gói java.microedition.lcdui.game.</p>
<p>Không chỉ giải quyết được vấn đề về portability, mà nó còn làm cho code tối ưu hơn, nhỏ gọn hơn vì bạn không cần phải implement các lớp custom như  Sprite, bởi các lớp này giờ là một phần underlying Java Enviroment trên mobile handset.</p>
<p><!--Session data--></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[JavaME Library you might need]]></title>
<link>http://trinisoftinc.wordpress.com/2009/11/24/javame-library-you-might-need/</link>
<pubDate>Tue, 24 Nov 2009 08:22:43 +0000</pubDate>
<dc:creator>Akintayo Olusegun</dc:creator>
<guid>http://trinisoftinc.wordpress.com/2009/11/24/javame-library-you-might-need/</guid>
<description><![CDATA[I have this javame library I have been compiling for a while. It has a lot of small small code snipp]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>I have this javame library I have been compiling for a while. It has a lot of small small code snippets and classes I use often, there is a database part where I have tried as much as possible to encapsulate parts of the saving/retrieving parts of RMS, there is also the UI part, which is what I want to talk about today.</p>
<p>This part contains a TickerForm, which is a form that can show scrollable contents pulled from database or URL at intervals(I am yet to finish it) and the second thing is the Controllable form. This form has a Controller that you can use to service the form(just like posting a form through POST). You call the submit() method of the form and the service method of the controller is called. The service method stores the values of items of the form in a Properties object(which is basically a key-value pair). A code is worth more than a thousand words they say, so here we are</p>
<p><code>/*<br />
 * To change this template, choose Tools &#124; Templates<br />
 * and open the template in the editor.<br />
 */<br />
package com.trinisoft.atpay.forms;</p>
<p>import com.trinisoft.atpay.MainForm;<br />
import com.trinisoft.atpay.helpers.RecordStores;</p>
<p>import com.trinisoft.mlib.db.decorator.StoreDecorator;<br />
import com.trinisoft.mlib.login.LoginForm;<br />
import com.trinisoft.mlib.login.db.UserClass;<br />
import com.trinisoft.mlib.ui.Form;<br />
import com.trinisoft.mlib.util.Controller;<br />
import com.trinisoft.mlib.util.Properties;</p>
<p>import java.io.IOException;<br />
import javax.microedition.lcdui.Alert;<br />
import javax.microedition.lcdui.AlertType;<br />
import javax.microedition.lcdui.Command;<br />
import javax.microedition.lcdui.CommandListener;<br />
import javax.microedition.lcdui.Display;<br />
import javax.microedition.lcdui.Displayable;<br />
import javax.microedition.lcdui.TextField;<br />
import javax.microedition.rms.RecordStoreException;</p>
<p>/**<br />
 *<br />
 * @author trinisoftinc<br />
 */<br />
public class RegisterForm extends Form {</p>
<p>    TextField username, password, cpassword;<br />
    Command ok, cancel;<br />
    LoginForm loginForm;<br />
    RecordStores recordStores;<br />
    MainForm mainForm;<br />
    Display display;</p>
<p>    public RegisterForm(LoginForm loginForm, final RecordStores recordStores, MainForm mainForm, Display display) {<br />
        super("Register", new Controller() {</p>
<p>            public boolean service(Properties properties) {<br />
                String username = properties.getParameter("Username").toString();<br />
                String password = properties.getParameter("Password").toString();<br />
                String cpassword = properties.getParameter("Confirm Password").toString();</p>
<p>                if (password.equals(cpassword)) {<br />
                    UserClass userClass = new UserClass();<br />
                    userClass.setUsername(username);<br />
                    userClass.setPassword(password);<br />
                    try {<br />
                        new StoreDecorator(userClass).save(recordStores.getUserRecordStore());<br />
                        properties.setParameter("response-code", new Integer(200));<br />
                        properties.setParameter("response-text", "Password Mismatch");<br />
                    } catch (RecordStoreException ex) {<br />
                        ex.printStackTrace();<br />
                    } catch (IOException ex) {<br />
                        ex.printStackTrace();<br />
                    }<br />
                } else {<br />
                    properties.setParameter("response-code", new Integer(500));<br />
                    properties.setParameter("response-text", "Password Mismatch");<br />
                }<br />
                return true;<br />
            }<br />
        });<br />
        this.loginForm = loginForm;<br />
        this.recordStores = recordStores;<br />
        this.mainForm = mainForm;<br />
        this.display = display;<br />
        init();<br />
    }</p>
<p>    private void init() {<br />
        username = new TextField("Username", "", 255, TextField.ANY);<br />
        password = new TextField("Password", "", 255, TextField.PASSWORD);<br />
        cpassword = new TextField("Confirm Password", "", 255, TextField.PASSWORD);<br />
        ok = new Command("Submit", Command.OK, 0);<br />
        cancel = new Command("Quit", Command.EXIT, 0);</p>
<p>        append(username);<br />
        append(password);<br />
        append(cpassword);<br />
        addCommand(ok);<br />
        addCommand(cancel);</p>
<p>        setCommandListener(new CommandListener() {</p>
<p>            public void commandAction(Command c, Displayable d) {<br />
                if (c.equals(ok)) {<br />
                    submit();<br />
                    if(getResponseCode() == 200) {<br />
                        display.setCurrent(loginForm);<br />
                    } else {<br />
                        Alert l = new Alert("Error Occurred",getResponseText(),null,AlertType.ERROR);<br />
                        display.setCurrent(l,d);<br />
                    }<br />
                } else if (c.equals(cancel)) {<br />
                    mainForm.notifyDestroyed();<br />
                }<br />
            }<br />
        });<br />
    }<br />
}<br />
</code><br />
You should draw your attention to two places, the contructor and the commandAction in the init() method. In the super constructor, you pass in a Controller, the controller have a service method, which handles the forms submit() and stores response-code and reponse-text keys and values in the Properties passed to it. These keys are used in the commandAction to get the response code and value. Any other value(or object for that matter) that you want to send back as response can be stored in the Properties object.</p>
<p>I think this suite of classes would be useful for anyone interested in Java ME development. Try it out and let me know your feedbacks.</p>
<p>Code hosted at www.gitorious.org/~trinisoftinc</p>
<p>ciao</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Pengenalan j2me]]></title>
<link>http://pr0j0.wordpress.com/2009/11/20/pengenalan-j2me/</link>
<pubDate>Fri, 20 Nov 2009 18:36:15 +0000</pubDate>
<dc:creator>pr0j0</dc:creator>
<guid>http://pr0j0.wordpress.com/2009/11/20/pengenalan-j2me/</guid>
<description><![CDATA[Apa Itu J2ME? J2ME merupakan sebuah kombinasi yang terbentuk antara sekumpulan interface Java yang s]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p><span style="font-weight:bold;">Apa Itu J2ME?</span></p>
<p>J2ME merupakan sebuah kombinasi yang terbentuk antara sekumpulan <em>interface</em> Java yang sering disebut dengan Java API (<em>Application Programming Interface</em>) dengan JVM (<em>Java Virtual Machine</em>) yang di desain khusus untuk alat, yaitu JVM dengan ruang terbatas. Kombinasi tersebut kemudian digunakan untuk melakukan pembuatan aplikasi-aplikasi yang dapat berjalan diatas alat (dalam hal ini <em>mobile device</em>).</p>
<p>Mungkin anda bertanya, apakah kita, sebagai pengembang aplikasi (<em>developer/programmer</em>), harus melakukan instalasi JVM dan Java API ke dalam alat yang akan kita gunakan? Jawabannya: &#8220;TIDAK&#8221;. Masing-masing dari perusahaan alat telah menyediakan JVM (dan sekumpulan Java API yang diperlukan) di dalam alat bersangkutan. Hal ini, membuat kita sebagai developer, hanya perlu berkonsentrasi dalam pengembangan aplikasinya dan memasukkannya ke dalam alat tersebut.</p>
<p>J2ME memiliki beberapa keterbatasan terutama jika diaplikasikan pada ponsel. J2ME sangat tergantung pada perangkat yang digunakan bisa dari segi merk ponsel, kemampuan ponsel, keterbatan memori pada ponsel, masalah pengijinan hak akses pada file-file tertentu pada ponsel dan dukungan terhadap teknologi J2ME.</p>
<p>J2ME sendiri pada dasarnya terdiri dari tiga buah bagian, yaitu: konfigurasi, profile, dan paket-paket opsional, seperti yang di tunjukkan pada gambar 1.</p>
<p><a href="http://pr0j0.wordpress.com/files/2009/11/arsitektur-j2me.gif"><img class="aligncenter size-full wp-image-8" title="arsitektur j2me" src="http://pr0j0.wordpress.com/files/2009/11/arsitektur-j2me.gif" alt="" width="272" height="282" /></a></p>
<p style="text-align:center;"><span style="font-weight:bold;">Gambar 1. Bagian-bagian di dalam platform J2ME</span></p>
<p style="text-align:center;"><span style="font-weight:bold;">(Sumber <a title="http://developers.sun.com/mobility/configurations/articles/cdc/" href="http://developers.sun.com/mobility/configurations/articles/cdc/">http://developers.sun.com/mobility/configurations/articles/cdc/</a>)</span></p>
<p style="text-align:left;">Berikut ini penjelasan dari masing-masing bagian tersebut.</p>
<p style="text-align:left;"><strong>1. Profile</strong></p>
<p style="text-align:left;">Profile merupakan bagian perluasan dari konfigurasi. Artinya, selain sekumpulan kelas yang terdapat pada konfigurasi, terdapat juga kelas-kelas spesifik yang didefinisikan lagi di dalam profile. Dengan kata lain, profile akan membantu secara fungsional yaitu dengan menyediakan kelas-kelas yang tidak terdapat dilevel konfigurasi.</p>
<p style="text-align:left;">Adapun profile yang sangat populer penggunaanya adalah profile yang disediakan oleh Sun Microsystems, yaitu yang dinamakan dengan MIDP (<em>Mobile Information Device Profile</em>). Gambar 2 menunjukkan perbandingan antara MIDP 1.0 dengan MIDP 2.0. Sebagai tambahan pengetahuan bagi Anda, berikut ini beberapa profile yang tersedia untuk kebutuhan-kebutuhan spesifik lainnya:</p>
<ul>
<li>PDAP (<em>Personal Digital Assistant Profile</em>), yaitu profile untuk PDA yang memperluas fungsi-fungsi pada konfigurasi CLDC dan digunakan khusus untuk menambahkan kemampuan-kemampuan lebih apabila dibandingkan dengan penggunaan profile MIDP.</li>
<li><em>Foundation Profile</em>, yaitu profil yang digunakan untuk konfigurasi CDC. Profile ini menambahkan beberapa kelas dari J2SE ke dalam konfigurasi CDC, dan berperan juga sebagai pondasi untuk membentuk profile baru lainnya.</li>
<li><em>Personal Profile</em>, yaitu profile yang mendefinisikan ulang Personal Java sebagai profil yang dapat digunakan sebagai profil dalam J2ME. Profil ini merupakan hasil perluasan dari <em>Foundation Profile</em>.</li>
<li><em>RMI Profile</em>, yaitu profil yang menambahkan dukungan RMI (<em>Remote Method Invocation</em>) ke dalam konfigurasi CDC.</li>
</ul>
<p style="text-align:center;"><a href="http://pr0j0.wordpress.com/files/2009/11/tabel-perbandingan-midp.jpg"><img class="aligncenter size-medium wp-image-9" title="tabel perbandingan midp" src="http://pr0j0.wordpress.com/files/2009/11/tabel-perbandingan-midp.jpg?w=300" alt="" width="300" height="238" /></a></p>
<p style="text-align:center;"><strong>Gambar 2. Perbandingan antara MIDP 1.0 dan MIDP 2.0</strong></p>
<p style="text-align:center;"><strong>(Sumber <a title="http://arie8011.blogspot.com/2009/04/sekilas-java-dan-j2me-java-2-micro.html" href="http://arie8011.blogspot.com/2009/04/sekilas-java-dan-j2me-java-2-micro.html">http://arie8011.blogspot.com/2009/04/sekilas-java-dan-j2me-java-2-micro.html</a>)</strong></p>
<p style="text-align:left;"><strong>2.  Konfigurasi</strong></p>
<p style="text-align:left;">Konfigurasi merupakan bagian yang berisi JVM dan beberapa <em>library</em> kelas lainnya. Perlu diperhatikan bahwa JVM yang dimaksud di sini bukanlah JVM tradisional seperti yang terdapat pada J2SE, melainkan JVM yang sudah didesain secara khusus untuk alat.</p>
<p style="text-align:left;">Terdapat dua buah konfigurasi yang disediakan oleh Sun Microsystems, yaitu CLDC (<em>Connected Limited Device Configuration</em>) dan CDC (<em>Connected Device Configuration</em>). Target alat dari konfigurasi CLDC adalah alat-alat kecil, seperti telepon selular, PDA, dan pager. Pada sisi yang lain, CDC, merupakan superset dari CLDC sehingga semua kelas yang didefinisikan di dalam CLDC akan ada juga dalam CDC. Gambar 3 menunjukkan perbandingan antara CLDC dengan CDC.</p>
<p style="text-align:center;"><a href="http://pr0j0.wordpress.com/files/2009/11/perbandngan-cldc-cdc.jpg"><img class="aligncenter size-medium wp-image-12" title="perbandngan cldc -cdc" src="http://pr0j0.wordpress.com/files/2009/11/perbandngan-cldc-cdc.jpg?w=300" alt="" width="300" height="87" /></a><strong>Gambar 3. Perbandingan antara CLDC dengan CDC</strong></p>
<p style="text-align:center;"><strong>(Sumber <a title="http://arie8011.blogspot.com/2009/04/sekilas-java-dan-j2me-java-2-micro.html" href="http://arie8011.blogspot.com/2009/04/sekilas-java-dan-j2me-java-2-micro.html">http://arie8011.blogspot.com/2009/04/sekilas-java-dan-j2me-java-2-micro.html</a>)</strong></p>
<p style="text-align:left;"><strong>3.  Paket-Paket Opsional</strong></p>
<p style="text-align:left;">Paket-paket opsional merupakan paket-paket tambahan yang dibutuhkan oleh aplikasi sehingga pada saat proses deployment paket-paket tersebut perlu didistribusikan juga sebagai bagian dari aplikasi bersangkutan. Sebagai catatan bahwa paket-paket opsional  ini bukan merupakan paket yang dibuat oleh perusahaan alat yang digunakan]</p>
<p style="text-align:left;">
<p style="text-align:left;">Referensi:</p>
<ol>
<li>Tuntunan pemrograman Java untuk Handphone, karya mas Budi Raharjo dkk.</li>
<li><a title="http://arie8011.blogspot.com/2009/04/sekilas-java-dan-j2me-java-2-micro.html" href="http://arie8011.blogspot.com/2009/04/sekilas-java-dan-j2me-java-2-micro.html">http://arie8011.blogspot.com/2009/04/sekilas-java-dan-j2me-java-2-micro.html</a></li>
<li><a title="http://developers.sun.com/mobility/configurations/articles/cdc/" href="http://developers.sun.com/mobility/configurations/articles/cdc/">http://developers.sun.com/mobility/configurations/articles/cdc/</a></li>
</ol>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[iPhone not Charging.]]></title>
<link>http://trinisoftinc.wordpress.com/2009/11/20/iphone-not-charging/</link>
<pubDate>Fri, 20 Nov 2009 13:19:27 +0000</pubDate>
<dc:creator>Akintayo Olusegun</dc:creator>
<guid>http://trinisoftinc.wordpress.com/2009/11/20/iphone-not-charging/</guid>
<description><![CDATA[I have this problem with my iPhone, Whenever I run the battery down to less than 20%, the phone won]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>I have this problem with my iPhone, Whenever I run the battery down to less than 20%, the phone won&#8217;t charge again when I plug it in my MAC. But if I plug it in windows it will charge, if and only of the windows box is not been used. If the windows PC is in use, then no charging for iPhone. Of recent, the iPhone started behaving very funny too. Sometimes, the MAC will charge it sometimes it won&#8217;t. So I decided to look for reasons why.</p>
<p>First I note that when the battery is below 20%, before you plug it in, shut it down first, then plug it in and everything will be fine. Next, The iPhone will charge if iTunes is not running before you plug it in. If iTunes is running, then you have to close iTunes and open it again, and iPhone is charging. Next I also noticed that most of the electric chargers that ship with the iPhone will not work for you once you jailbreak the iPhone.</p>
<p>The iPhone is a great product, but when people complain about the battery, I think it goes beyond the mere fact that it runs down quickly, the battery of the iPhone is generally shitty, You will be surprised at the vast amount of people who have posted online about this(google is your friend) and yet, apple seems to not want to do anything about it! Although this problem of not charging seems to be experienced by mostly people who jailbroke their iPhones.</p>
<p>Anyway, after about 4hours, today I now know exactly the voodoos I have to invoke to make the iPhone charge anytime anyday anywhere&#8230;..I pity the less tech savvy people who use jail broken iPhones.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Condor - 1º Demo liberado ]]></title>
<link>http://projetocondor.wordpress.com/2009/11/20/condor-1%c2%ba-demo-liberado/</link>
<pubDate>Fri, 20 Nov 2009 00:49:53 +0000</pubDate>
<dc:creator>projetocondor</dc:creator>
<guid>http://projetocondor.wordpress.com/2009/11/20/condor-1%c2%ba-demo-liberado/</guid>
<description><![CDATA[Olá a todos, e com muita satisfação que liberamos o 1º demo do nosso jogo, para que todos ja possam ]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Olá a todos, e com muita satisfação que liberamos o 1º demo do nosso jogo, para que todos ja possam ver como está ficando. Para jogar basta baixar os arquivos e mandar para o celular pelo cabo ou pelo cartão de memória. Bom é isso, estão aí os links:</p>
<p>Memoria Matemática:</p>
<p><a class="aligncenter" title="http://rapidshare.com/files/309439901/Memoria2.jar.html" href="http://rapidshare.com/files/309439901/Memoria2.jar.html" target="_self">http://rapidshare.com/files/309439901/Memoria2.jar.html</a></p>
<p>Jogo das Contas:</p>
<p><a class="aligncenter" title="http://rapidshare.com/files/309442573/MidContas.jar.html" href="http://rapidshare.com/files/309442573/MidContas.jar.html" target="_self">http://rapidshare.com/files/309442573/MidContas.jar.html</a></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Implementasi Mobile Banking dengan PHP dan J2ME]]></title>
<link>http://wahyudisetiawan.wordpress.com/2009/11/20/implementasi-mobile-banking-dengan-php-dan-j2me/</link>
<pubDate>Thu, 19 Nov 2009 22:49:35 +0000</pubDate>
<dc:creator>admin</dc:creator>
<guid>http://wahyudisetiawan.wordpress.com/2009/11/20/implementasi-mobile-banking-dengan-php-dan-j2me/</guid>
<description><![CDATA[Berdasarkan kebutuhan nasabah dalam melakukan transaksi perbankan yang semakin meningkat dan dalam m]]></description>
<content:encoded><![CDATA[Berdasarkan kebutuhan nasabah dalam melakukan transaksi perbankan yang semakin meningkat dan dalam m]]></content:encoded>
</item>
<item>
<title><![CDATA[Generic soft key detection in J2ME]]></title>
<link>http://leahayes.wordpress.com/2009/11/18/generic-soft-key-detection-in-j2me/</link>
<pubDate>Wed, 18 Nov 2009 21:10:33 +0000</pubDate>
<dc:creator>Lea Hayes</dc:creator>
<guid>http://leahayes.wordpress.com/2009/11/18/generic-soft-key-detection-in-j2me/</guid>
<description><![CDATA[As many of you are aware, the soft key buttons on a mobile phone are general purpose buttons that ar]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>As many of you are aware, the soft key buttons on a mobile phone are general purpose buttons that are reused over and over again. On most handsets there are two of these directly beneath the screen (one on the left, and one on the right).</p>
<p>In a recent project I needed to be able to detect when the left and right soft keys were being pressed, but unfortunately, J2ME does not define a standard key code. Instead it is up to the developer to specify different codes for all of the different phones in their target audience.</p>
<p>Two solutions came to mind:</p>
<ol>
<li>Compile the application for each target handset (perhaps overkill given that this be the only difference).</li>
<li>Get the user to specify which button is which (even if they do not realize this!).</li>
</ol>
<p><!--more--><br />
I decided to go with option #2 so that my application would work for the majority of handsets. Instead of asking the user to configure the keys directly, I created a welcome screen.</p>
<p>The welcome screen contains a nice greeting, but more importantly the text &#8220;Continue&#8221; in the bottom left corner. The user will instinctively press the soft key button that is nearest that text, and so the key code is known for the rest of the application. I decided to filter out all known keys so that the user does not press the &#8220;FIRE&#8221; button, etc.</p>
<div id="attachment_26" class="wp-caption aligncenter" style="width: 246px"><a href="http://leahayes.wordpress.com/files/2009/11/j2me_welcome_screen.png"><img class="size-full wp-image-26" title="Welcome Screen for J2ME" src="http://leahayes.wordpress.com/files/2009/11/j2me_welcome_screen.png" alt="Screenshot of Welcome Screen" width="236" height="313" /></a><p class="wp-caption-text">Welcome Screen for J2ME</p></div>
<p>Once the key code of the left soft key is known, we can assume that any other non-standard button that is pressed is the second soft-key.</p>
<p><strong>Please note</strong> that this does mean that other unknown buttons will also behave as the second soft key.</p>
<p>Here is a simplified version of the welcome screen that I used:</p>
<pre><span style="color:#0000ff;">public class</span> <span style="color:#008080;">WelcomeCanvas</span> <span style="color:#0000ff;">extends </span><span style="color:#008080;">Canvas</span> {
   <span style="color:#0000ff;">public </span>WelcomeCanvas() {
      setFullScreenMode(<span style="color:#0000ff;">true</span>);
   }

   <span style="color:#0000ff;">protected void</span> paint(<span style="color:#008080;">Graphics</span> g) {
      g.setColor(<span style="color:#ff0000;">0x336699</span>);
      g.fillRect(<span style="color:#ff0000;">0</span>, <span style="color:#ff0000;">0</span>, getWidth(), getHeight());
      g.setColor(<span style="color:#ff0000;">0xFFFFFF</span>);
      g.setFont(<span style="color:#008080;">Font</span>.getFont(
         <span style="color:#008080;">Font</span>.FACE_SYSTEM, <span style="color:#008080;">Font</span>.STYLE_PLAIN, <span style="color:#008080;">Font</span>.SIZE_LARGE));
      g.drawString(<span style="color:#666699;">"Welcome!"</span>, getWidth() / <span style="color:#ff0000;">2</span>, getHeight() / <span style="color:#ff0000;">2</span>,
         <span style="color:#008080;">Graphics</span>.HCENTER&#124;<span style="color:#008080;">Graphics</span>.TOP);

      <span style="color:#008000;">// The all important continue text!</span>
      g.setFont(<span style="color:#008080;">Font</span>.getDefaultFont());
      g.drawString(<span style="color:#666699;">"Continue"</span>, <span style="color:#ff0000;">2</span>, getHeight() - <span style="color:#ff0000;">2</span>,
         <span style="color:#008080;">Graphics</span>.BOTTOM&#124;<span style="color:#008080;">Graphics</span>.LEFT);
   }
   <span style="color:#0000ff;">protected void</span> keyPressed(<span style="color:#0000ff;">int</span> keyCode) {
      <span style="color:#0000ff;">if</span> (!<span style="color:#008080;">SoftCommandCanvas</span>.isKnownKey(<span style="color:#0000ff;">this</span>, keyCode)) {
         <span style="color:#008080;">SoftCommandCanvas</span>.KEY_SOFT_LEFT = keyCode;
         continuePressed();
      }
   }

   <span style="color:#0000ff;">protected void</span> continuePressed() {
      <span style="color:#008000;">// Do something!</span>
   }
}</pre>
<p>Here is an example of how you can detect which soft key is being pressed in another canvas:</p>
<pre><span style="color:#0000ff;">public class</span> <span style="color:#008080;">SoftCommandCanvas</span> <span style="color:#0000ff;">extends</span> <span style="color:#008080;">Canvas</span> {
   <span style="color:#008000;">// The default value here works for Nokia handsets.</span>
   <span style="color:#0000ff;">public static int</span> KEY_SOFT_LEFT = <span style="color:#ff0000;">-6</span>;

   <span style="color:#0000ff;">public</span> SoftCommandCanvas() {
      setFullScreenMode(<span style="color:#0000ff;">true</span>);
   }

   <span style="color:#0000ff;">public static boolean</span> isKnownKey(<span style="color:#008080;">Canvas</span> canvas, <span style="color:#0000ff;">int</span> keyCode) {
      <span style="color:#0000ff;">return</span> (keyCode &#62;= KEY_NUM0 &#38;&#38; keyCode &#60;= KEY_NUM9) &#124;&#124;
         keyCode == KEY_POUND &#124;&#124; keyCode == KEY_STAR &#124;&#124;
         canvas.getGameAction(keyCode) != <span style="color:#ff0000;">0</span>;
   }

   <span style="color:#0000ff;">protected void</span> keyPressed(<span style="color:#0000ff;">int</span> keyCode) {
      <span style="color:#0000ff;">if</span> (!isKnownKey(<span style="color:#0000ff;">this</span>, keyCode)) {
         <span style="color:#0000ff;">if</span> (keyCode == KEY_SOFT_LEFT)
            fireLeftSoftCommand();
         <span style="color:#0000ff;">else</span>
            fireRightSoftCommand();
      }
      <span style="color:#0000ff;">else</span>
         <span style="color:#0000ff;">super</span>.keyPressed(keyCode);
   }

   <span style="color:#0000ff;">protected void</span> fireLeftSoftCommand() {
      <span style="color:#008000;">// Do something!</span>
   }

   <span style="color:#0000ff;">protected void</span> fireRightSoftCommand() {
      <span style="color:#008000;">// Do something!</span>
   }
}</pre>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Java ME EA on MAC]]></title>
<link>http://trinisoftinc.wordpress.com/2009/11/18/java-me-ea-on-mac/</link>
<pubDate>Wed, 18 Nov 2009 14:20:46 +0000</pubDate>
<dc:creator>Akintayo Olusegun</dc:creator>
<guid>http://trinisoftinc.wordpress.com/2009/11/18/java-me-ea-on-mac/</guid>
<description><![CDATA[This is my experience with the JavaME EA for MAC OS. I am using 10.5.8(Leopard). At first it was a G]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>This is my experience with the JavaME EA for MAC OS. I am using 10.5.8(Leopard).</p>
<p>At first it was a God sent that we now have a tool from sun. Using Netbeans and mpp-sdk kinda sucks, but it was all I have got. After the download, which went without incidents, I ran the EA for the first time and it blew all the whistles and knock all the bells. I immediately opened a sample app and run it, It ran well without incidents. Then out of the blue, I got the first error.</p>
<p>When trying to run ANY application, it will return with an exception/error message that it can not connect to device 0, or any of the devices I used at that. I googled and all the responses were not helping me at all. At last I did the unthinkable, guess what that is? I restarted my MAC. I have not done that in a looooooong while so it took some time before the system actually finished the restarting process and voila, my EA was back online. But not for long!</p>
<p>Next, EA takes it upon itself to just DIE for no reason. I run an app, and the next thing is the EA has stopped working un-expectedly. I also tried googling, but no result. So I started fooling around. I went to tools and refresh the SDK under platforms and voila again, EA stops dying. But again, that was not all.</p>
<p>Next I noticed that after running an app for about 6 to 10 times, EA will stop working saying it has run of memory. I tried to close all applications while running EA but, duh! after about 6 to 10, sometimes 15 runs, it will stop working with the same out of memory error. The annoying thing is, it won’t even quit. I will have to use force quit(windows version of CTRL + ALT + DEL).</p>
<p>I am yet to solve this problem, and I don’t think I will ever solve it until the next version comes out. Looking back however to the days of mpp-sdk and Netbeans, I think I still prefer the EA, At least I can do Bluetooth without having to buy some licence from some people.</p>
<p>All in all, I give Sun +1 on this. It is really something all MAC developers have been asking for since time immemorial. All that remains is perfection. And if I remember correctly, in software, attaining perfection is an eternal process. No software is perfect until it is dead.</p>
<p>One thing I will give kudos to the EA guys for again is that, all projects created on Netbeans also works perfectly on EA, be it from windows or linux. +1 to you guys again on that.</p>
<p>Finally, EA is a good product. If you are a MAC J2ME developer, you will enjoy this IDE.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Into Android]]></title>
<link>http://kanizares.wordpress.com/2009/11/16/into_android/</link>
<pubDate>Mon, 16 Nov 2009 07:04:13 +0000</pubDate>
<dc:creator>kanizares</dc:creator>
<guid>http://kanizares.wordpress.com/2009/11/16/into_android/</guid>
<description><![CDATA[So i&#8217;ve decided it&#8217;s time to tell the world what I am doing because surely they are all ]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><h3>So i&#8217;ve decided it&#8217;s time to tell the world what I am doing because surely they are all intensely interested and can&#8217;t survive another day without knowing what Dave is up to next.</h3>
<p>Primarily I will be blogging about my new initiative to upgrade my mobile application development skills to keep up with the Joneses. You see, back in 2001 I began developing stuff in J2ME and have done so ever since, but the world spins at a bloody fast pace and this year I have felt like I have fallen off.</p>
<p>I was one of those VERY early adopters of Java for mobile phones, having started with tools such as Whiteboard SDK, MIDP 1.01 and the like. I even got my hands on a Motorola iDen i85s from a mate at Motorola Labs in Sydney (this phone is now a museum piece) so that I could run Java apps on an actual device as opposed to an <strong>extremely</strong> buggy emulator.</p>
<p>In 2002 I predicted that Java for mobile phones was going to be the future. Not all would have agreed (deluded Qualcomm BREW people for example). When I attempted to buy Nokia&#8217;s first Java handset (the 6230i) from a Sydney Telstra store, the pimply kid &#8211; ahem &#8211; salesman told me &#8220;Java, that&#8217;s just a gimmick. Now you really want THIS phone &#60;points me to other device that I don&#8217;t want&#62;&#8221;. Still, a billion Java phones later I reckon I was right.</p>
<p>Recently I have felt that despite their best efforts, Sun has failed to move to the next level with J2Me. It&#8217;s reaching the end of it&#8217;s road. Perhaps the mobile apps and games market has simply grown up and there are sweeping winds of change. So it&#8217;s time for me to grow up too.</p>
<p>First decision: which platform to move to. There appears to be 3 main contenders here:</p>
<ol>
<li><span style="color:#000000;">Apple iPhone SDK</span></li>
<li>Google Android</li>
<li>Symbian</li>
</ol>
<p>The winner for me was surprisingly obvious: <strong>Android.</strong> Here&#8217;s why:</p>
<ol>
<li>Symbian? No, forget it. Not cool enough by half.</li>
<li>iPhone? hmmm, C based. I haven&#8217;t written a line of code in C since Data Org class at UNSW in 1998.</li>
<li>Android is Java-based. So am I.</li>
<li>iPhone is limited in distribution. Yes yes, I know, 2 billion apps downloaded&#8230;I don&#8217;t care. iPhone&#8217;s OS and platform will always be limited by the fact it only runs on one set of devices: Apple&#8217;s. It is the same thing that limits Mac OS from ever being as widely used as Windows. Those who use iPhone&#8217;s love them and download heaps of content, but they will soon be swamped in number by more open platforms that are just as good if not better.</li>
<li>Android will be that platform swamps iPhone. <em>Mark my words, it will happen</em>. Not in 2010, maybe not in 2011, but by 2012 it will be dominant. It will also run into many of the same fragmentation problems that plagued J2ME, but with the benefit of hindsight Google can be prepared for that.</li>
</ol>
<p>So Android it is, and my adventures in learning Android will be told for young and old.<a href="http://developer.android.com/index.html"><img class="size-full wp-image-4 alignleft" title="Google android" src="http://kanizares.wordpress.com/files/2009/11/android.jpg" alt="Google Android" width="124" height="124" /></a></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[J2ME Semineri]]></title>
<link>http://duyurular.wordpress.com/2009/11/13/j2me-semineri/</link>
<pubDate>Fri, 13 Nov 2009 11:56:13 +0000</pubDate>
<dc:creator>duyurular</dc:creator>
<guid>http://duyurular.wordpress.com/2009/11/13/j2me-semineri/</guid>
<description><![CDATA[Seminer Konuları Giriş Mobil teknolojilerin tarihi ve gelişimi Neden mobil teknolojiler Güncel Mobil]]></description>
<content:encoded><![CDATA[Seminer Konuları Giriş Mobil teknolojilerin tarihi ve gelişimi Neden mobil teknolojiler Güncel Mobil]]></content:encoded>
</item>
<item>
<title><![CDATA[Game Projects]]></title>
<link>http://ltty.wordpress.com/2009/11/13/game-projects/</link>
<pubDate>Fri, 13 Nov 2009 11:23:55 +0000</pubDate>
<dc:creator>L&#039;tty</dc:creator>
<guid>http://ltty.wordpress.com/2009/11/13/game-projects/</guid>
<description><![CDATA[Hey guys, a lot of things are going on at the moment. I am working on a few different gaming project]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Hey guys,</p>
<p>a lot of things are going on at the moment. I am working on a few different gaming projects with some really interesting people.</p>
<p>A first version of my Super Koopa War, where the player fights Goombas, Shyguys and Monty Moles and tries to defeat Super Mario, will be released for J2ME phones in the near future. A few things regarding usability, balancing and game fun are still to do, before the Demo will be released on the bolg. This little game shall serve as tutorial on how to implement a mobile game with a nice architecture (entity system, event system, collision detection, physics and a nice animation concept) in J2ME.</p>

<p style="text-align:left;">Additionally, we are working on a second (top secret) project, either for the iPhone or for the PSP, since we have the PSP DevKit now at University.</p>
<p style="text-align:left;">To provide you guys with new stuff, I posted a new tutorial at the publications section. It is a simple Solar System in 3D. Also a first person camera has been implemented to show how things work in the source code. This example does not use OpenGL functions. Matrices, vectors and calculations are done manually. This should give an impression on what OpenGL does when someone calls gluLookAt() or glRotate(). So camera, transformations and rotations are calculated and applied by hand. Feel free to download the example and play around with it.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Ericsson Labs promovează OpenStreetMap]]></title>
<link>http://mapguy.wordpress.com/2009/11/12/ericsson-labs-promoveaza-openstreetmap/</link>
<pubDate>Thu, 12 Nov 2009 21:39:25 +0000</pubDate>
<dc:creator>mapguy</dc:creator>
<guid>http://mapguy.wordpress.com/2009/11/12/ericsson-labs-promoveaza-openstreetmap/</guid>
<description><![CDATA[Am fost surprins să citesc de faptul că Ericsson Labs oferă suport pentru hărțile OSM în propria lib]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p style="text-align:justify;">Am fost surprins să citesc de faptul că Ericsson Labs oferă suport pentru hărțile OSM în propria librărie Mobile Maps. Spre deosebire de Google Maps librăriile de la EL oferă suport pentru randarea dinamică a datelor vectoriale, personalizarea hărților și suport pentru majoritatea telefoanelor de pe piață, datorită faptului că sunt dezvoltate pentru Java ME și Android.</p>
<p style="text-align:justify;">Sunt oferite cu titlu de două aplicații (<a href="https://labs.ericsson.com/applications/guidu">Guidu</a> și <a href="https://labs.ericsson.com/applications/photocaching">Photocaching</a>) care folosesc această librărie <span style="text-decoration:line-through;">dar din păcate documentație este unul din punctele slabe deocamdată (pentru un astfel de produs e nevoie de un tutorial bine pus la punct)</span>. Am găsit în cele din urmă și două tutoriale (câte unul pentru fiecare platformă suportată) care pot fi încercate la adresa <a href="https://labs.ericsson.com/apis/mobile-maps/android-getting-started">https://labs.ericsson.com/apis/mobile-maps/android-getting-started</a> sau <a href="https://labs.ericsson.com/apis/mobile-maps/documentation/getting-started-tutorial">https://labs.ericsson.com/apis/mobile-maps/documentation/getting-started-tutorial</a>.</p>
<p style="text-align:justify;">
<div id="attachment_710" class="wp-caption aligncenter" style="width: 247px"><a href="http://mapguy.wordpress.com/files/2009/11/mobilemapsandroid.png"><img class="size-medium wp-image-710" title="Exemplu Mobile Maps pe emulatorul Android" src="http://mapguy.wordpress.com/files/2009/11/mobilemapsandroid.png?w=237" alt="Exemplu Mobile Maps pe emulatorul Android" width="237" height="300" /></a><p class="wp-caption-text">Exemplu Mobile Maps pe emulatorul Android</p></div>
<div id="attachment_711" class="wp-caption aligncenter" style="width: 253px"><a href="http://mapguy.wordpress.com/files/2009/11/mobilemapsj2me.jpg"><img class="size-full wp-image-711" title="Mobile Maps + J2ME" src="http://mapguy.wordpress.com/files/2009/11/mobilemapsj2me.jpg" alt="Mobile Maps + J2ME" width="243" height="324" /></a><p class="wp-caption-text">Mobile Maps + J2ME</p></div>
<p style="text-align:justify;">Sursa: <a href="https://labs.ericsson.com/apis/mobile-maps/blog/openstreetmap-android">https://labs.ericsson.com/apis/mobile-maps/blog/openstreetmap-android</a>.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Brew Platform]]></title>
<link>http://juragansapi.wordpress.com/2009/11/11/brew-platform/</link>
<pubDate>Wed, 11 Nov 2009 06:18:33 +0000</pubDate>
<dc:creator>juragansapi</dc:creator>
<guid>http://juragansapi.wordpress.com/2009/11/11/brew-platform/</guid>
<description><![CDATA[QUALCOMM telah menjadi suatu perusahaan penting dalam Code Division Multiple Access (CDMA) teknologi]]></description>
<content:encoded><![CDATA[QUALCOMM telah menjadi suatu perusahaan penting dalam Code Division Multiple Access (CDMA) teknologi]]></content:encoded>
</item>
<item>
<title><![CDATA[Pengembangan Aplikasi Dengan J2ME]]></title>
<link>http://juragansapi.wordpress.com/2009/11/10/pengembangan-aplikasi-dengan-j2me/</link>
<pubDate>Tue, 10 Nov 2009 10:54:54 +0000</pubDate>
<dc:creator>juragansapi</dc:creator>
<guid>http://juragansapi.wordpress.com/2009/11/10/pengembangan-aplikasi-dengan-j2me/</guid>
<description><![CDATA[Dewasa ini, handphone adalah sebuah barang biasa dimana setiap orang sudah memiliki sebagai alat kom]]></description>
<content:encoded><![CDATA[Dewasa ini, handphone adalah sebuah barang biasa dimana setiap orang sudah memiliki sebagai alat kom]]></content:encoded>
</item>
<item>
<title><![CDATA[Śledzik mobilny: pierwsze screeny]]></title>
<link>http://nkbb.pl/2009/11/10/sledzik-mobilny-pierwsze-screeny/</link>
<pubDate>Tue, 10 Nov 2009 10:05:43 +0000</pubDate>
<dc:creator>domino00</dc:creator>
<guid>http://nkbb.pl/2009/11/10/sledzik-mobilny-pierwsze-screeny/</guid>
<description><![CDATA[Projekt mobilny powoli nabiera rozpędu. Powstają elementy API mobilnego jak również poszczególne fun]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Projekt mobilny powoli nabiera rozpędu. Powstają elementy API mobilnego jak również poszczególne funkcjonalności i projekty interface&#8217;u. W ostatnich dniach udało się nawet uruchomić testowo niektóre funkcjonalności. Choć do zakończenia projektu i testów zewnętrznych jeszcze daleko to widać już znaczące postępy. Niewątpliwie listopad bedzie bardzo pracowity <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<div id="attachment_48" class="wp-caption alignleft" style="width: 184px"><img class="size-medium wp-image-48" title="sledzik_iphone_logowanie" src="http://nkbb.wordpress.com/files/2009/11/sledzik_iphone_logowanie.jpg?w=174" alt="sledzik_iphone_logowanie" width="174" height="300" /><p class="wp-caption-text">Śledzik mobilny: ekran logowania</p></div>
<div id="attachment_49" class="wp-caption alignleft" style="width: 184px"><img class="size-medium wp-image-49" title="sledzik_iphone_loading" src="http://nkbb.wordpress.com/files/2009/11/sledzik_iphone_loading.jpg?w=174" alt="sledzik_iphone_loading" width="174" height="300" /><p class="wp-caption-text">Śledzik mobilny: loading</p></div>
<div id="attachment_50" class="wp-caption alignleft" style="width: 184px"><img class="size-medium wp-image-50" title="sledzik_iphone_sledza_mnie" src="http://nkbb.wordpress.com/files/2009/11/sledzik_iphone_sledza_mnie.jpg?w=174" alt="Śledzik mobilny: followers" width="174" height="300" /><p class="wp-caption-text">Śledzik mobilny: followers</p></div>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[NOKIA 3230]]></title>
<link>http://hpbekas.wordpress.com/2009/11/10/nokia-3230/</link>
<pubDate>Tue, 10 Nov 2009 07:48:57 +0000</pubDate>
<dc:creator>rofiq hidayat</dc:creator>
<guid>http://hpbekas.wordpress.com/2009/11/10/nokia-3230/</guid>
<description><![CDATA[( SUDAH LAKU )Kondisi: Ok, Kelengkapan: Hp+cas+mmr rsdv 128mb+hf tanpa dusbuku Mulus: 90%, Harga: Rp]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><div class="wp-caption aligncenter" style="width: 360px">( SUDAH LAKU )<img title="NOKIA 3230" src="http://www.welectronics.com/gsm/Nokia/Nokia3230.jpg" alt="DENPHONE CELL" width="350" height="500" /><p class="wp-caption-text">Kondisi: Ok, Kelengkapan: Hp+cas+mmr rsdv 128mb+hf tanpa dusbuku Mulus: 90%, Harga: Rp 550.000</p></div>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[nadszedł czas na porządną naukę JSP i nie tylko]]></title>
<link>http://threemode.wordpress.com/2009/11/09/nadszedl-czas-na-porzadna-nauke-jsp-i-nie-tylko/</link>
<pubDate>Mon, 09 Nov 2009 16:23:31 +0000</pubDate>
<dc:creator>m4ck7</dc:creator>
<guid>http://threemode.wordpress.com/2009/11/09/nadszedl-czas-na-porzadna-nauke-jsp-i-nie-tylko/</guid>
<description><![CDATA[W końcu zabrałem się za czytanie książek o JSP. Póki co ustawiłem Tomcat&#8217; a i bazę danych MySQ]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>W końcu zabrałem się za czytanie książek o JSP. Póki co ustawiłem Tomcat&#8217; a i bazę danych MySQL. Mam zamiar stworzyć galerię zdjęć dodawanych za pomocą komórki tzn. jeszcze będę musiał napisać aplikacje J2ME by móc cokolwiek wysyłać z komórki ale mam nadzieje że się uda dość szybko to zrobić. Przede mną jeszcze rozwikłanie zagadki jak to ze sobą połączyć i jak wykorzystuje się połączenie z internetem w komórkach do przesyłania danych. A potem jak aplikacja ma odbierać te dane i gdzie je składować. Tak więc troszkę jest :] Ale przynajmniej ciekawi mnie to.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Starting your developing jurney with J2ME]]></title>
<link>http://stakisko.wordpress.com/2009/11/06/25/</link>
<pubDate>Fri, 06 Nov 2009 11:19:13 +0000</pubDate>
<dc:creator>stakisko</dc:creator>
<guid>http://stakisko.wordpress.com/2009/11/06/25/</guid>
<description><![CDATA[Heya there&#8230; this is the first tutorial on my J2ME developing series. Have fun&#8230; So, to st]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Heya there&#8230; this is the first tutorial on my J2ME developing series. Have fun&#8230;</p>
<p>So, to start up, beginning to experimenting with mobile along with java development, j2me pulled my eyes. j2me is the sun&#8217;s implementation on java for the mobile industry. Nowadays, almost every cellphone, smartphone, PDA, etc&#8230; manufacturer provides java support, the all known .jar files which you can find everywhere in the web.<!--more--></p>
<p>So, to start up, beginning to experimenting with mobile along with java development, j2me pulled my eyes. j2me is the sun&#8217;s implementation on java for the mobile industry. Nowadays, almost every cellphone, smartphone, PDA, etc&#8230; manufacturer provides java support, the all known .jar files which you can find everywhere in the web.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Explaining Java Technology]]></title>
<link>http://tecnoesis.wordpress.com/2009/11/06/explaining-java-technology/</link>
<pubDate>Fri, 06 Nov 2009 08:49:10 +0000</pubDate>
<dc:creator>Rajani Ramsagar</dc:creator>
<guid>http://tecnoesis.wordpress.com/2009/11/06/explaining-java-technology/</guid>
<description><![CDATA[   Module 1 &#8211; Explaining Java Technology.   Objective: Upon completion of reading this post, y]]></description>
<content:encoded><![CDATA[   Module 1 &#8211; Explaining Java Technology.   Objective: Upon completion of reading this post, y]]></content:encoded>
</item>
<item>
<title><![CDATA[Signal Framework 0.4-beta]]></title>
<link>http://mobileswdev.wordpress.com/2009/11/05/signal-framework-0-4-beta/</link>
<pubDate>Thu, 05 Nov 2009 19:35:04 +0000</pubDate>
<dc:creator>Marek</dc:creator>
<guid>http://mobileswdev.wordpress.com/2009/11/05/signal-framework-0-4-beta/</guid>
<description><![CDATA[A new release of the Signal Framework is available and includes the following changes: Bugfixes, Doc]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><div>
<div>
<p>A new release of the Signal Framework is <a href="https://sourceforge.net/projects/signal/files/Signal%20Framework/0.4-beta/signal-0.4-beta-dist.zip/download">available</a> and includes the following changes:</p>
<ul>
<li>Bugfixes,</li>
<li>Documentation updates,</li>
<li>Package names changed to reflect the new website domain.</li>
</ul>
</div>
</div>
</div>]]></content:encoded>
</item>

</channel>
</rss>
