Toast notifications Tile notifications Raw notifications.

30

Transcript of Toast notifications Tile notifications Raw notifications.

Page 1: Toast notifications Tile notifications Raw notifications.
Page 2: Toast notifications Tile notifications Raw notifications.

Rodolpho CarmoLead EngineerTaos [email protected]@RodoCarmo

Push Notifications, Tiles, camera e sensores no WP7WPH302

Thiago MônacoArquiteto de Software

Grupo [email protected]

@thiagojmonaco

Page 3: Toast notifications Tile notifications Raw notifications.

Agenda

Casos de sucesso / Quem está usandoPush Notifications e Live Tiles

Push Notifications - ComponentesArquitetura de Push NotificationsLive Tiles – API para “local tile”Push Notifications - Novidades

Performance e melhores práticas

Page 4: Toast notifications Tile notifications Raw notifications.
Page 5: Toast notifications Tile notifications Raw notifications.

Casos de sucesso / Quem está usando

The Weather ChannelFlixsterHTC HubMSN CelebrityGold Price

FoursquareBeezAplicações nativas (me, people, Games Hub, Tiles de contatos, etc...)

Page 6: Toast notifications Tile notifications Raw notifications.

Push Notifications e Live TilesPush Notifications oferecem aos desenvolvedores um modo de enviar informação aos aplicativos no sentido nuvem -> telefone

Windows Phone tem a habilidade única de prover ao usuário informações da aplicação já na tela inicial, através dos Live Tiles

Page 7: Toast notifications Tile notifications Raw notifications.

Push Notification – ComponentesToast

notifications

Tile notifications

Tile notifications:

7

Count Background

Title

Title

Toast notifications

Tile notificationsTile “default” na tela inicialNovo “back tile”!

Raw notifications

Novo “deep toast”!

Page 8: Toast notifications Tile notifications Raw notifications.

Arquitetura de Push Notifications

Pacote enviado em post HTTP para a URI

Requisita URI PUSH

App com Push

habilitado

Serviço cliente de

Push (Microsoft)

Negociação cliente / servidor para Push

2

Envio de URI PUSH

para Serviço de

terceiro 4

5Push notification

enviado ao aparelho6

Serviço na nuvem (terceiro)

MPNS(Microsoft)

Windows Phone 7

13

Page 9: Toast notifications Tile notifications Raw notifications.

Live Tiles – API para “local tile”

App TilePágina inicial da app

Tile Secundário“notícias mundiais”

Tile Secundário“notícias locais”

Updates locais (não são push)Controle total das propriedades com apps no Foreground ou Background

MultiTile!

Crie, atualize ou removaLeva o usuário diretamente ao conteúdo desejado

Page 10: Toast notifications Tile notifications Raw notifications.

Live Tiles – API para “local tile”Novidade! Atualizações nos “back tiles”

Três propriedades disponíveis

“Gira” para mostrar a parte de trás em intervalos randômicos

Texto back

BackContent BackBackground

World News

BackTitle

Page 11: Toast notifications Tile notifications Raw notifications.

Push Notifications – Novidades!Suporte a Múltiplos tiles / “back tiles”

Múltiplos tiles para mostrar tempo por cidade, resultados de jogos, múltiplos vôos de uma mesma companhia, etc..Possível atualizar todos os tiles de sua aplicaçãoSem mudanças na API . Caso já usava, fique tranquilo!Envie o Tile ID para o serviço e use o novo atributo para atualizar diretamente

Page 12: Toast notifications Tile notifications Raw notifications.

Suporte ao “backtile”

<wp:Notification xmlns:wp="WPNotification">    <wp:Tile Id="/WorldNews.xaml?how=start">        <wp:BackgroundImage>http://www.contoso.com/wTile.png

</wp:BackgroundImage> <wp:Count>4</wp:Count> <wp:Title>World News Updates</wp:Title>        <wp:BackBackgroundImage>http://www.contoso.com/wBack.png

</wp:BackBackgroundImage> <wp:BackContent>Happy World News</wp:BackContent> <wp:BackTitle>World News</wp:BackTitle>    </wp:Tile></wp:Notification>

Page 13: Toast notifications Tile notifications Raw notifications.

Push Notifications – Novidades!Deep toast

Envie o usuário diretamente a uma página experiência específica de sua app, DIRETO DA TELA INICIAL!Uso da navegação Silverlight comum (OnNavigatedTo)Sem mudanças na API. Apenas um novo elemento para adicionar o link desejado

Page 14: Toast notifications Tile notifications Raw notifications.

Deep Toast

<wp:Notification xmlns:wp="WPNotification">    <wp:Toast>        <wp:Text1>Titulo</wp:Text1> <wp:Text2>Texto da atualização</wp:Text2> <wp:Param>/detailsPage.xaml?storyid=186435</wp:Param>    </wp:Toast></wp:Notification>

Page 15: Toast notifications Tile notifications Raw notifications.

demo

Push Notifications e Tile avançado

NameTitleGroup

Page 16: Toast notifications Tile notifications Raw notifications.

Câmera

Acesso a câmera “ao vivo”PhotoCameraSilverlight 4 Webcam

Exibir conteúdo em sua aplicaçãoVide Brush

Page 17: Toast notifications Tile notifications Raw notifications.

demo

Acesso à câmera

NameTitleGroup

Page 18: Toast notifications Tile notifications Raw notifications.

Sensor de Movimento - Motion

Sensor virtualGiroscópio + Bússola + Acelerômetro

VantagensMais precisoRespostas mais rápidas

Sempre prefira o Motion Sensor se disponível

Page 19: Toast notifications Tile notifications Raw notifications.

Acelerômetro

Mede aceleração no dispositivoBom para maiores acelerações

Disponível em todos os dispositivos

Page 20: Toast notifications Tile notifications Raw notifications.

Giroscópio

Mede a velocidade rotacional – X, Y, ZExtremamente sensívelPode indicar rotação mesmo parado

Opcional em telefones MangoIndisponível em telefones pré-Mango

Page 21: Toast notifications Tile notifications Raw notifications.

Bússola

Coordenas 3D para o polo norte magnéticoSujeito a interferências eletromagnéticasNecessita calibraçãoPode variar precisão em até 20 graus

Opcional em telefones MangoIncluso em alguns telefones pré-Mango

Page 22: Toast notifications Tile notifications Raw notifications.

Sensor de Movimento - Motion

Sensor virtualGiroscópio + Bússola + Acelerômetro

VantagensMais precisoRespostas mais rápidas

Sempre prefira o Motion Sensor se disponível

Page 23: Toast notifications Tile notifications Raw notifications.

Adaptação do Sensor de Movimento

Degradado = menor qualidade de aproximaçãoUtilize Motion.IsSupported

Acelerômetro Bússola Giroscópio MovimentoSim Sim Sim Completo

Sim Sim No Degradado

Sim No Sim Não Suportado

Sim No No Não Suportado

Page 24: Toast notifications Tile notifications Raw notifications.

Calibração dos Sensores

Evento de calibração dispardo quando necessário

Necessário para Bússula e Sensor de Movimento

Aplicação são responsáveisProver UI

Sem calibração = medições ruins

Page 25: Toast notifications Tile notifications Raw notifications.

demo

Utilizando sensores

NameTitleGroup

Page 26: Toast notifications Tile notifications Raw notifications.

Conteúdo RelacionadoVídeo aulas no MSDN Brasilhttp://msdn.microsoft.com/pt-br/windowsphone

Página do produtohttp://www.microsoft.com/windowsmobile/pt-br/default.mspx

Documentação http://msdn.microsoft.com/library/ff402535(VS.92).aspx

Windows Phone Brasilhttp://www.windowsphonebrasil.net

[email protected]@windowsphonebrasil.net

Page 27: Toast notifications Tile notifications Raw notifications.

Palestras RelacionadasWPH304 | MVVM avançado para o Windows Phone 7

WPH305 | XAML avançado para Windows Phone 7

WPH306 | Desenvolvendo Games para Windows Phone 7 com XNA e Visual Basic

WPH307 | Windows Phone 7: Development and Multitasking

WPH401 | Acesso a base de dados (local DB) no Windows Phone 7

QS39| Dicas e Truques para o exame 70-599 Pro: Designing and Developing Windows Phone Applications

Page 28: Toast notifications Tile notifications Raw notifications.

Recursos

Recursos para Desenvolvedores

http://msdn.microsoft.com/pt-br

Getthefreemobileappforyourphonehttp://gettag.mobi

Page 29: Toast notifications Tile notifications Raw notifications.

Não esqueça de preencher sua

avaliação onlinewww.teched.com.br/

avaliacao

Getthefreemobileappforyourphonehttp://gettag.mobi

Page 30: Toast notifications Tile notifications Raw notifications.

© 2011 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.

The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after

the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.