Do servidor para celular(JME)
publicado em 13 Aug 2010 19:51 por Munif Gebara Junior
Continuação do projeto persistência no celular.
try {
List lista=Banco.getInstancia().listaProdutos();
os.write(lista.size());
for (Produto p:lista){
byte[] dados=p.toBytes();
os.write(dados.length);
os.write(dados);
}
} finally {
os.close();
}
PersistenciaME.zip (Projeto celular atualizado) tamanho:60634 bytes Upload em 03/08/2010 09:39
compracerta.zip (Projeto servidor) tamanho:5493799 bytes Upload em 03/08/2010 09:40
p04servidor1.zip (Video Servidor 1) tamanho:7163354 bytes Upload em 03/08/2010 09:42
p05servidor2.zip (Video Servidor 2) tamanho:2133127 bytes Upload em 03/08/2010 09:43
p06celularRecebendo.zip (Video Celular ) tamanho:3753185 bytes Upload em 03/08/2010 09:45
Now with MIDP 2 and the implementation of GameCanvas, everything is a lot more
cleaner, easier to use and more efficient. Aside from running in single thread the GameCanvas no longer waits for a keyPressed event instead it used the a technique called polling, meaning you can determine which keys where pressed at any point time by using the getKeysState() method provide by the GameCanvas. With the use of the buffer in GameCanvas the gaming technique called double buffering graphics is done automatically. All you have to do is call the flushGraphics() method to output the graphics to the display. Double Buffering is a technique that is used to avoid flickering on the display by simply drawing a temporary image off set from the actually display and when completed the image is then shown in visible display area.
Apresentação de JME utilizada em aulas. Precisa de uma atualização.