28
Company Confidential Awdren Fontão Instituto NOKIA de Tecnologia – INdT Manaus - Amazonas JavaME no mundo real: novas ferramentas Java para Série 40 da Nokia

JavaME no mundo real

Embed Size (px)

Citation preview

Page 1: JavaME no mundo real

Company Confidential

Awdren FontãoInstituto NOKIA de Tecnologia – INdTManaus - Amazonas

JavaME no mundo real: novas ferramentas Java para Série 40 da Nokia

Page 2: JavaME no mundo real

Company Confidential

2

Ovi Loja - Oportunidade global

175MAparelhos Symbian

C/ Qt & Web

500MAparelhos Série 40

C/ Java ME

+

Page 3: JavaME no mundo real

Série 40

Page 4: JavaME no mundo real

Company Confidential

4

Série 40 – Mudança de paradigma - INokia C3 – Série 40QWERTYWi-FiAplicativosPlano de DadosE-mailJava ME MIDP 2.1

Page 5: JavaME no mundo real

Company Confidential

5

Série 40 – Mudança de paradigma - II

Nokia X3 -02Touch screenWi-FiAplicativosCâmera de 5mpxE-mailJava ME MIDP 2.1

Page 6: JavaME no mundo real

Company Confidential

6

Mapas no Série 40

Page 7: JavaME no mundo real

Company Confidential

Java ME Location API – Agora com Mapas

7

• Fornece acesso ao poderoso servidor Ovi Maps

• Funcionalidades incluídas:–Mapping– Searching– Routing

Page 8: JavaME no mundo real

Company Confidential

Java ME Location API – Agora com Mapas

8

• Licença de Desenvolvedor: 1000 requisições/IP em 24 hs

• Licença Registrada: 50000 requisições/IP em 24 hs (c/ ads)

• Licença Premium será anunciada em breve

Page 9: JavaME no mundo real

Company Confidential

Mostrando um Mapa

9

import com.nokia.maps.map.MapCanvas;

public class MapMIDlet extends MIDlet {

protected void startApp() throws MIDletStateChangeException { Display display = Display.getDisplay(this);

MapCanvas mapCanvas = new MapCanvas( display ); display.setCurrent(mapCanvas); }

protected void destroyApp(boolean unconditional) throws MIDletStateChangeException { }

protected void pauseApp() { } }

Page 10: JavaME no mundo real

Company Confidential

Mostrando Objetos em um Mapa

10

// mapFactory comes from MapCanvas

MapFactory mapFactory = mapCanvas.getMapFactory();GeoCoordinate coord = new GeoCoordinate( 10, 10, 0 ); MapStandardMarker marker = mapFactory.createStandardMarker(coord, 10,

null );map.addMapObject( marker );

Page 11: JavaME no mundo real

Company Confidential

Fazendo uma Busca

11

// mapFactory comes from MapCanvas

SearchManager searchManager = SearchManager.getInstance();searchManager.geocode("Germany,Berlin", null );Location[] locations = searchManager.getLocations();

//loop through locations[] showing them on a map

MapFactory mapFactory = mapCanvas.getMapFactory();

for(int i=0; i < locations.length; i++) {MapStandardMarker marker = mapFactory.createStandardMarker(locations[i].getDisplayPosition(), 10, null );map.addMapObject( marker );

}

Page 12: JavaME no mundo real

Company Confidential

Criando Rotas

12

// mapFactory comes from MapCanvas

SearchManager searchManager = SearchManager.getInstance();searchManager.geocode("Germany, Berlin", null );Location[] locations = searchManager.getLocations();

MapFactory mapFactory = mapCanvas.getMapFactory();

WaypointParameterList waypoints = new WaypointParameterList();waypoints.addLocation(locations[0]);waypoints.addLocation(locations[1]);

RouteManager rm = RouteManager.getInstance();RoutingMode[] modes = { new RoutingMode() }; rm.calculateRoute(waypoints, modes);

Page 13: JavaME no mundo real

Company Confidential

13

Demo

Mapas no Série 40

Page 14: JavaME no mundo real

Company Confidential

14

Gestures API

Page 15: JavaME no mundo real

Company Confidential

Gestures API

15

• Gestos• Single Tap• Long Press• Long Press Repeated• Drag• Drop• Flick

Page 16: JavaME no mundo real

Company Confidential

Suporte a touch com Java ME

16

• Métodos de Canvasboolean Canvas.hasPointerMotionEvents()void pointerPressed(int x, int y)void pointerDragged(int x, int y)void pointerReleased(int x, int y)

Page 17: JavaME no mundo real

Company Confidential

Como usar a Gesture API – Passo 1

17

• Crie uma GestureInteractiveZone// Create a GestureInteractiveZone for all Gesture Types

GestureInteractiveZone giz = new GestureInteractiveZone( GestureInteractiveZone.GESTURE_ALL );

// set bounding rectangle of zone.giz.setRectangle( x, y, width, height);

Page 18: JavaME no mundo real

Company Confidential

Como usar a Gesture API – Passo 2

18

• Crie uma GestureListener// Define a GestureListenerClass GestureCanvas extends Canvas implements GestureListener{protected void paint(Graphics g) { … }

public void gestureAction( Object container, GestureInteractiveZone zone, GestureEvent event) {...}

}

Page 19: JavaME no mundo real

Company Confidential

GestureAction em mais detalhes

19

public void gestureAction( Object container, GestureInteractiveZone zone, GestureEvent event) {

switch( event.getType() ) {case GestureInteractiveZone.GESTURE_TAP:...; break;case GestureInteractiveZone.GESTURE_LONG_PRESS:case GestureInteractiveZone.GESTURE_LONG_PRESS_REPEATED:case GestureInteractiveZone.GESTURE_DRAG:case GestureInteractiveZone.GESTURE_DROP:case GestureInteractiveZone.GESTURE_FLICK:}

}

Page 20: JavaME no mundo real

Company Confidential

20

Demo

Gestures API

Page 21: JavaME no mundo real

Company Confidential

On-Device Debugging for Series 40

21

Page 22: JavaME no mundo real

Company Confidential

22

On-Device Debugging for Series 40

• Acrescenta a habilidade de depurar aplicações diretamente no telefone

• Funciona em dispositivos com a versão Série 40 6th Edition e 6th Edition FP1

• Funciona com Eclipse e NetBeans

Page 23: JavaME no mundo real

Company Confidential

23

On-Device Debugging for Series 40

• Depurador completo, incluindo breakpoints e valor de variáveis

• Suporte de monitoramento a nível de usuário

• Aplicações anexadas ao depurador remotamente

• Sobre conexão IP ou Bluetooth• Debug em apenas um click na IDE

Page 24: JavaME no mundo real

Company Confidential

24

Demo

On-Device Debugging for Series 40

Page 25: JavaME no mundo real

Company ConfidentialCompany Confidential

Alcance o próximo bilhão de usuários

developers.nokia.com/pt/

Page 26: JavaME no mundo real

Company Confidential

26

developers.nokia.com/pt/Distribute/

Page 27: JavaME no mundo real

Company Confidential

developers.nokia.com/pt/create4millions/

Até 20 de setembro de 2011

Page 28: JavaME no mundo real

Company Confidential

Awdren Fontã[email protected]

@awdren

Obrigado!