Top Banner
Marlon Luz ext- [email protected] @marlonluz Novas ferramentas da Nokia para a plataforma S40 1
24

Marlon Luz [email protected] @marlonluz Novas ferramentas da Nokia para a plataforma S40 1.

Apr 21, 2015

Download

Documents

Internet User
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Marlon Luz ext-marlon.luz@nokia.com @marlonluz Novas ferramentas da Nokia para a plataforma S40 1.

1

Marlon [email protected]@marlonluz

Novas ferramentas da Nokia para a plataforma S40

Page 2: Marlon Luz ext-marlon.luz@nokia.com @marlonluz Novas ferramentas da Nokia para a plataforma S40 1.

2

• 100k+ apps, 13m downloads/dia

• Brasil: 125m downloads (total), 48m 2012, 400k

por/dia, 55% em S40, 73% das compras são aplicativos Java ME

Nokia Store, S40 e Java ME

339 milhões de aparelhos vendidos em 2011

Page 3: Marlon Luz ext-marlon.luz@nokia.com @marlonluz Novas ferramentas da Nokia para a plataforma S40 1.

3

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

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

Page 4: Marlon Luz ext-marlon.luz@nokia.com @marlonluz Novas ferramentas da Nokia para a plataforma S40 1.

4

On-Device Debugging for Series 40

Page 5: Marlon Luz ext-marlon.luz@nokia.com @marlonluz Novas ferramentas da Nokia para a plataforma S40 1.

5

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 6: Marlon Luz ext-marlon.luz@nokia.com @marlonluz Novas ferramentas da Nokia para a plataforma S40 1.

6

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 7: Marlon Luz ext-marlon.luz@nokia.com @marlonluz Novas ferramentas da Nokia para a plataforma S40 1.

7

Demo

On-Device Debugging for Series 40

Page 8: Marlon Luz ext-marlon.luz@nokia.com @marlonluz Novas ferramentas da Nokia para a plataforma S40 1.

8

Mapas no Série 40

Page 9: Marlon Luz ext-marlon.luz@nokia.com @marlonluz Novas ferramentas da Nokia para a plataforma S40 1.

9

Nokia Maps API para Java ME

• Fornece acesso ao poderoso servidor Nokia Maps

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

Page 10: Marlon Luz ext-marlon.luz@nokia.com @marlonluz Novas ferramentas da Nokia para a plataforma S40 1.

10

Nokia Maps API para Java ME

Page 11: Marlon Luz ext-marlon.luz@nokia.com @marlonluz Novas ferramentas da Nokia para a plataforma S40 1.

11

Mostrando um Mapaimport 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 12: Marlon Luz ext-marlon.luz@nokia.com @marlonluz Novas ferramentas da Nokia para a plataforma S40 1.

12

Mostrando Objetos em um Mapa

// 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 13: Marlon Luz ext-marlon.luz@nokia.com @marlonluz Novas ferramentas da Nokia para a plataforma S40 1.

13

Fazendo uma Busca

// 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 14: Marlon Luz ext-marlon.luz@nokia.com @marlonluz Novas ferramentas da Nokia para a plataforma S40 1.

14

Criando Rotas// 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 15: Marlon Luz ext-marlon.luz@nokia.com @marlonluz Novas ferramentas da Nokia para a plataforma S40 1.

15

Demo

Mapas no Série 40

Page 16: Marlon Luz ext-marlon.luz@nokia.com @marlonluz Novas ferramentas da Nokia para a plataforma S40 1.

16

Gestures API

Page 17: Marlon Luz ext-marlon.luz@nokia.com @marlonluz Novas ferramentas da Nokia para a plataforma S40 1.

17

Gestures API

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

Page 18: Marlon Luz ext-marlon.luz@nokia.com @marlonluz Novas ferramentas da Nokia para a plataforma S40 1.

18

Suporte a touch com Java ME

• 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 19: Marlon Luz ext-marlon.luz@nokia.com @marlonluz Novas ferramentas da Nokia para a plataforma S40 1.

19

Como usar a Gesture API – Passo 1

• 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 20: Marlon Luz ext-marlon.luz@nokia.com @marlonluz Novas ferramentas da Nokia para a plataforma S40 1.

20

Como usar a Gesture API – Passo 2

• 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 21: Marlon Luz ext-marlon.luz@nokia.com @marlonluz Novas ferramentas da Nokia para a plataforma S40 1.

21

GestureAction em mais detalhes

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 22: Marlon Luz ext-marlon.luz@nokia.com @marlonluz Novas ferramentas da Nokia para a plataforma S40 1.

22

Demo

Gestures API

Page 23: Marlon Luz ext-marlon.luz@nokia.com @marlonluz Novas ferramentas da Nokia para a plataforma S40 1.

23

INTERAÇÃO

Nokia Developerhttp://www.developer.nokia.com

Twitter: @nokiadev_brasil

Grupo Devs S40 Brasil no Nokia DeveloperNokiaDev_S40_Brasil

http://www.developer.nokia.com/Community/Discussion/group.php?groupid=114

Page 24: Marlon Luz ext-marlon.luz@nokia.com @marlonluz Novas ferramentas da Nokia para a plataforma S40 1.

Marlon [email protected]

@marlonluz

Obrigado!