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

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

Embed Size (px)

Citation preview

1

Marlon [email protected]@marlonluz

Novas ferramentas da Nokia para a plataforma S40

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

3

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

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

4

On-Device Debugging for Series 40

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

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

7

Demo

On-Device Debugging for Series 40

8

Mapas no Série 40

9

Nokia Maps API para Java ME

• Fornece acesso ao poderoso servidor Nokia Maps

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

10

Nokia Maps API para Java ME

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() { }

}

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 );

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 );

}

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);

15

Demo

Mapas no Série 40

16

Gestures API

17

Gestures API

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

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)

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);

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) {...

}}

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:

}}

22

Demo

Gestures API

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

Marlon [email protected]

@marlonluz

Obrigado!