JavaME no mundo real

1,541 views

Published on

Published in: Technology, Education
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,541
On SlideShare
0
From Embeds
0
Number of Embeds
591
Actions
Shares
0
Downloads
14
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

JavaME no mundo real

  1. 1. JavaME no mundo real: novasferramentas Java paraSérie 40 da Nokia<br />Awdren Fontão<br />Instituto NOKIA de Tecnologia – INdT<br />Manaus - Amazonas<br />
  2. 2. Ovi Loja - Oportunidade global<br />2<br />+<br />175MAparelhosSymbian<br />C/ Qt & Web<br />500MAparelhosSérie 40<br />C/ Java ME<br />
  3. 3. Série 40<br />
  4. 4. Série 40 – Mudança de paradigma - I<br />Nokia C3 – Série 40<br />QWERTY<br />Wi-Fi<br />Aplicativos<br />Plano de Dados<br />E-mail<br />Java ME MIDP 2.1<br />4<br />
  5. 5. Série 40 – Mudança de paradigma - II<br />Nokia X3 -02<br />Touch screen<br />Wi-Fi<br />Aplicativos<br />Câmera de 5mpx<br />E-mail<br />Java ME MIDP 2.1<br />5<br />
  6. 6. Mapas no Série 40<br />6<br />
  7. 7. Java ME Location API – Agora com Mapas<br /><ul><li>Fornece acesso ao poderoso servidor Ovi Maps
  8. 8. Funcionalidades incluídas:</li></ul>Mapping<br />Searching<br />Routing<br />7<br />
  9. 9. Java ME Location API – Agora com Mapas<br /><ul><li>Licença de Desenvolvedor: 1000 requisições/IP em 24 hs
  10. 10. Licença Registrada: 50000 requisições/IP em 24 hs (c/ ads)
  11. 11. Licença Premium será anunciada em breve</li></ul>8<br />
  12. 12. Mostrando um Mapa<br />import com.nokia.maps.map.MapCanvas;<br />public class MapMIDlet extends MIDlet { <br /> protected void startApp() throws MIDletStateChangeException { <br /> Display display = Display.getDisplay(this); <br />MapCanvasmapCanvas = new MapCanvas( display );<br />display.setCurrent(mapCanvas); <br /> }<br /> protected void destroyApp(boolean unconditional) throws MIDletStateChangeException { } <br /> protected void pauseApp() { } <br />}<br />9<br />
  13. 13. Mostrando Objetos em um Mapa<br />// mapFactory comes from MapCanvas<br />MapFactory mapFactory = mapCanvas.getMapFactory();<br />GeoCoordinate coord = new GeoCoordinate( 10, 10, 0 ); <br />MapStandardMarker marker = mapFactory.createStandardMarker(coord, 10, null );<br />map.addMapObject( marker );<br />10<br />
  14. 14. Fazendo uma Busca<br />// mapFactory comes from MapCanvas<br />SearchManager searchManager = SearchManager.getInstance();<br />searchManager.geocode("Germany,Berlin", null );<br />Location[] locations = searchManager.getLocations(); <br />//loop through locations[] showing them on a map<br />MapFactory mapFactory = mapCanvas.getMapFactory();<br />for(int i=0; i < locations.length; i++) {<br /> MapStandardMarker marker = mapFactory.createStandardMarker(locations[i].getDisplayPosition(), 10, null );<br /> map.addMapObject( marker );<br />}<br />11<br />
  15. 15. Criando Rotas<br />// mapFactory comes from MapCanvas<br />SearchManager searchManager = SearchManager.getInstance();<br />searchManager.geocode("Germany, Berlin", null );<br />Location[] locations = searchManager.getLocations(); <br />MapFactory mapFactory = mapCanvas.getMapFactory();<br />WaypointParameterList waypoints = new WaypointParameterList();<br />waypoints.addLocation(locations[0]);<br />waypoints.addLocation(locations[1]);<br />RouteManager rm = RouteManager.getInstance();<br />RoutingMode[] modes = { new RoutingMode() }; <br />rm.calculateRoute(waypoints, modes);<br />12<br />
  16. 16. Mapas no Série 40<br />Demo<br />13<br />
  17. 17. Gestures API<br />14<br />
  18. 18. Gestures API<br /><ul><li>Gestos
  19. 19. Single Tap
  20. 20. Long Press
  21. 21. Long Press Repeated
  22. 22. Drag
  23. 23. Drop
  24. 24. Flick</li></ul>15<br />
  25. 25. Suporte a touch com Java ME<br /><ul><li>Métodos de Canvas</li></ul>booleanCanvas.hasPointerMotionEvents()<br />void pointerPressed(int x, int y)<br />void pointerDragged(int x, int y)<br />void pointerReleased(int x, int y)<br />16<br />
  26. 26. Como usar a Gesture API – Passo 1<br /><ul><li>CrieumaGestureInteractiveZone</li></ul>// Create a GestureInteractiveZone for all Gesture Types<br />GestureInteractiveZonegiz = <br /> new GestureInteractiveZone( GestureInteractiveZone.GESTURE_ALL );<br />// set bounding rectangle of zone.<br />giz.setRectangle( x, y, width, height);<br />17<br />
  27. 27. Como usar a Gesture API – Passo 2<br /><ul><li>CrieumaGestureListener</li></ul>// Define a GestureListener<br />Class GestureCanvas extends Canvas implements GestureListener<br />{<br /> protected void paint(Graphics g) { … }<br /> public void gestureAction( Object container, <br />GestureInteractiveZone zone, GestureEvent event) {<br /> ...<br /> }<br />}<br />18<br />
  28. 28. GestureAction em mais detalhes<br />public void gestureAction( Object container, <br />GestureInteractiveZone zone, GestureEvent event) {<br /> switch( event.getType() ) {<br /> case GestureInteractiveZone.GESTURE_TAP:<br /> ...; <br /> break;<br /> case GestureInteractiveZone.GESTURE_LONG_PRESS:<br /> case GestureInteractiveZone.GESTURE_LONG_PRESS_REPEATED:<br /> case GestureInteractiveZone.GESTURE_DRAG:<br /> case GestureInteractiveZone.GESTURE_DROP:<br /> case GestureInteractiveZone.GESTURE_FLICK:<br /> }<br />}<br />19<br />
  29. 29. Gestures API<br />Demo<br />20<br />
  30. 30. On-Device Debugging for Series 40<br />21<br />
  31. 31. On-Device Debugging for Series 40<br />22<br /><ul><li>Acrescenta a habilidade de depurar aplicações diretamente no telefone
  32. 32. Funciona em dispositivos com a versão Série 40 6th Edition e6th Edition FP1
  33. 33. Funciona com Eclipse e NetBeans</li></li></ul><li>On-Device Debugging for Series 40<br />23<br /><ul><li>Depurador completo, incluindo breakpoints e valor de variáveis
  34. 34. Suporte de monitoramento a nível de usuário
  35. 35. Aplicações anexadas ao depurador remotamente
  36. 36. Sobre conexão IP ou Bluetooth
  37. 37. Debug em apenas um click na IDE</li></li></ul><li>On-Device Debugging for Series 40<br />Demo<br />24<br />
  38. 38. Alcance o próximobilhão de usuários<br />developers.nokia.com/pt/<br />
  39. 39. 26<br />developers.nokia.com/pt/Distribute/<br />
  40. 40. Até 20 de setembro de 2011<br />developers.nokia.com/pt/create4millions/<br />
  41. 41. Obrigado!<br />Awdren Fontão<br />awdren.fontao@indt.org.br<br />@awdren<br />

×