SlideShare a Scribd company logo
Live Tile, Background Agent e Push Notification

                 Luca Cestola
           luca.cestola@domusdotnet.org
                    @lucacestola
Un approccio differente

  Con Windows 8 la nostra applicazione ha diversi modi
  per comunicare attivamente informazioni all’utente.
  Dove?
  • Start screen
  • Lock screen
  Come?
  • Tiles
  • Toast
  • Badge
Start screen e Lock screen


  Start screen
  • È dove risiedono le Tiles delle applicazioni.
  • Si può organizzare la posizione e la grandezza delle
    Tiles e decidere quali includere o escludere.
  • Veicola informazioni che hanno a che fare con le
    nostre applicazioni
  Lock screen
  • In maniera ridotta, offre comunque la possibilità alle
    nostre applicazioni di comunicare con l’utente alcune
    informazioni utili.
Tiles: cos’è?

“Una tile è la rappresentazione di una app sullo start
screen” Rappresenta un punto di ingresso alla nostra
applicazione, ma è anche veicolo attivo di informazioni
verso l’utente.
  • Principale o secondaria
  • Due grandezze: Square o Wide
   •   Se esistono entrambe, l’utente può scegliere quale
       grandezza visualizzare.
  • Zero o più tile secondarie
   •   Ogni tile secondaria può offrire un diverso contenuto
       e punto di ingresso all’applicazione
Live Tiles: perché?


Investire del tempo nelle Live Tiles perché:
  • Rappresentano un elemento distintivo per la
    nostra app.
  • Posizionamento migliore sullo Start Screen
  • Una Live Tile è più accattivante (ed utile) di
    una statica
  • Se l’aspetto non è accattivante e le
    informazioni non sono utili l’utente la Tile verrà
    posizionata in fondo allo Start Screen 
Elementi grafici della tile


                              Template




  Brand grafico                         Badge
   o testuale                       (Numeric o Glyph)
Live Tiles: perché?


Caratteristiche da tenere in considerazione:
  • Non è solo una questione di «gradevolezza»
  • Contenuti nuovi e frequenti comunicano che la
    nostra applicazione è «viva»
  • Informazioni personalizzate tramite ciò che
    conosciamo dell’utente (app settings o info
    presenti sui social)
  • Informazioni contestualizzate (ad esempio
    localizzazione GPS)
Aspetto grafico: Dimensioni

Le tiles possono avere aspetti grafici
differenti. Si devono utilizzare i
template predefiniti.
  • Square Tile
   •   Contenuti e testo ridotti
   •   Possono contenere un badge e
       un glyph o un numero
  • Wide Tile
   •   Più spazio e di conseguenza
       più immagini o testo
Aspetto grafico: Coerenza
Aspetto grafico: Errori da evitare


Il brand o il nome dell’applicazione hanno un
loro apposito posizionamento, evitate di
ripetere tali informazioni in altre posizioni
Aspetto grafico: Templates


Tile template catalog:
http://msdn.microsoft.com/en-us/library/windows/apps/hh761491.aspx
Toast


• É una notifica popup che appare in alto a
  destra sullo schermo.
• Template come per le tiles
   http://msdn.microsoft.com/en-us/library/windows/apps/windows.ui.notifications.toasttemplatetype




• Uno è poco due sono troppi  da usare
  per comunicazioni importanti senza
  esagerare se non si vuole che l’utente le
  disabiliti.
Demo: Tiles


• Package.appxmanifest
• Tile primaria Square o Wide
• Tile secondarie
Aggiornamenti tramite notifica


I contenuti delle tiles possono essere
aggiornati tramite notifiche, in uno dei
seguenti modi:
• direttamente dall’ app
• da un Task in background
• da un Push Notification Message
Xml di notifica

La notifica avviene tramite uno specifico formato xml
http://msdn.microsoft.com/en-us/library/windows/apps/br212853.aspx




La libreria WnsRecipe installabile tramite NuGet offre un
model per semplificare la creazione delle notifiche per
Tile, Toast e Badge
Demo: Notifiche


•   Tile
•   Live tile
•   Toast
•   Badge
Background Tasks

 • Windows 8 consente alle Store App di eseguire
   operazioni anche se non sono correntemente attive
   (Running).
 • L’esecuzione del Background task, una volta
   registrato, è gestito dal sistema operativo
 • Tali operazioni sono eseguite in un host esterno
   all’applicazione (BackgroundTaskHost.exe) o
   all’interno della nostra App a seconda delle
   impostazioni o delle condizioni correnti della nostra
   App (Running, Suspended, Terminated)
 • I task sono attivati attraverso Trigger specifici per ogni
   tipologia di evento e possono avere delle precondizioni
Background Task: Triggers


 Background task trigger type   Trigger event             When the background task is triggered
 ControlChannelTrigger          ControlChannelTrigger     On incoming messages on the control channel.

 MaintenanceTrigger             MaintenanceTrigger        It’s time for maintenance background tasks.

 PushNotificationTrigger        PushNotificationTrigger   A raw notification arrives on the WNS channel.

 SystemEventTrigger             InternetAvailable         The Internet becomes available.

 SystemEventTrigger             SmsReceived               A new SMS message is received by an installed
                                                          mobile broadband device.
 SystemEventTrigger             UserAway                  The user becomes absent.

 SystemEventTrigger             UserPresent               The user becomes present.

 TimeTrigger                    TimeTrigger               A time event occurs.
Background Task: Task Conditions


 Background task condition   The condition that must be satisfied
 InternetAvailable           The Internet must be available.
 InternetNotAvailable        The Internet must be unavailable.
 SessionConnected            The session must be connected.
 SessionDisconnected         The session must be disconnected.
 UserNotPresent              The user must be away.
 UserPresent                 The user must be present.
Background Task: Host types


 Background task trigger type   Host executable
 TimeTrigger                    Cannot be specified (default system host)

 SystemTrigger                  Cannot be specified (default system host)

 MaintenanceTrigger             Cannot be specified (default system host)

 PushNotificationTrigger        Application provided exe OR Not specified
                                (default system host)
 ControlChannelTrigger          Application provided exe
Ciclo di vita di un Background Task
Demo: Background Task


• Background Task
• Task progress e completion
• Riassociazione handlers eventi
Push notification: WNS

  • Il Windows Push Notification Services (WNS)
    permette l’invio di notifiche alle nostre
    Windows Store App installate su un
    determinato device.
  • Tramite WNS un servizio cloud o classico può
    inviare alla nostra Store App notifiche
    toast, tile, badge o raw.
  • Il server ottiene un canale di comunicazione
    valido verso il WNS tramite il
    PackageSecurityidentifier ed il ClientSecret
    associati all’app.
Push notification: Come funziona?
Demo: Push Notifications


• Richiesta di un Canale per le notifiche al
  client
• Simulazione di invio di notifiche da server
Riferimenti e risorse

  • White papers
    http://msdn.microsoft.com/en-us/library/windows/apps/hh465413.aspx

  • Guidelines and checklist for tiles and badges
    http://msdn.microsoft.com/en-us/library/windows/apps/hh465403.aspx

  • Guidelines and checklist for background tasks
    http://msdn.microsoft.com/en-us/library/windows/apps/hh977043.aspx

  • Guidelines and checklist for push notifications
    http://msdn.microsoft.com/en-us/library/windows/apps/Hh761462.aspx

  • Samples
    http://code.msdn.microsoft.com/windowsapps
Grazie agli sponsor

More Related Content

PPTX
ALM Revolutions - Process Template Customization
PPTX
Tecniche innovative di marketing via web
PPTX
ALM Revolutions - Non si vive di solo check-out e check-in
DOC
Pbb1
PPT
Ppt clothes
PPT
Tubia method music therapy13pp
PPTX
ALM@Work - Lab management for everyone
PPT
World Environment Day 2012
ALM Revolutions - Process Template Customization
Tecniche innovative di marketing via web
ALM Revolutions - Non si vive di solo check-out e check-in
Pbb1
Ppt clothes
Tubia method music therapy13pp
ALM@Work - Lab management for everyone
World Environment Day 2012

Viewers also liked (19)

PPTX
ALM@Work - Typical developer day
PPT
Tubia method music therapy13pp
PPTX
ALM@Work - Team collaboration with visual studio alm 2012
PPTX
ALM@Work - Unit testing in Visual studio 2012
PDF
Retailing in pakistan
PPT
Wild business
PDF
Cee presentation
PDF
John A Chapman opportunities minerals space 20120131
PDF
Mitutoyo dal 1 11 al 19-12-14
PDF
School Management System Software
PPT
Jantar Mantar
PPTX
Application lifecycle management ... e quindi
PPTX
ASP.NET MVC: sfruttare la piattaforma al 100%
PPTX
Empezando a utilizar word press
PPT
Ximun, beñat eta sebas festak
PPTX
Practica 3
PPTX
Credo de un ganador
PDF
Osa photos website
ALM@Work - Typical developer day
Tubia method music therapy13pp
ALM@Work - Team collaboration with visual studio alm 2012
ALM@Work - Unit testing in Visual studio 2012
Retailing in pakistan
Wild business
Cee presentation
John A Chapman opportunities minerals space 20120131
Mitutoyo dal 1 11 al 19-12-14
School Management System Software
Jantar Mantar
Application lifecycle management ... e quindi
ASP.NET MVC: sfruttare la piattaforma al 100%
Empezando a utilizar word press
Ximun, beñat eta sebas festak
Practica 3
Credo de un ganador
Osa photos website
Ad

Similar to Push Notification, Live Tile e Background Agent (20)

PPTX
Lavorare con tile, badge e notification nelle applicazioni Windows 8
PPTX
L'EVOLUZIONE E LE NOVITÀ DI WINDOWS PHONE 8.1
PDF
Dal web a Windows 8: costruire app Metro immersiv - Daniele Bochiccio - whyMCA
PPTX
Universal Store Apps - Mobile day by DotNetCampania
PPTX
Mobile e Smart Client
PPTX
Advanced Push Notification Service
PPTX
Push Notification: come rendere vive le app su Windows Phone
PPT
Windows Phone 8.1 e i background tasks - Andrea Boschin - Codemotion Milan 2014
PPTX
UNIVERSAL APP IN TUTTE LE SALSE: PHONE, TABLET, PC, XBOX E IOT
PPTX
70-485: ADVANCED OF DEVELOPING WINDOWS STORE APPS USING C#
PPTX
WP7 Game Lab
PPTX
Contracts & Extensions: allargare i confini della propria applicazione (Win8@...
PPTX
Multitasking, background agents and local notifications
PPTX
Notify your Windows Store app with Service Bus Notification Hub
PPTX
Windows AppStudio, app without code
PDF
Corso WebApp iOS - Lezione 01: Think Touch Mobile
PDF
HCIM08 - Mobile Applications
PPTX
Notifiche Locali vs Notifiche Push - di Gabriele Coppola
PDF
Le basi per lo sviluppo su Windows Phone tool, SDK, il primo progetto
PPTX
Introduzione alle Universal App
Lavorare con tile, badge e notification nelle applicazioni Windows 8
L'EVOLUZIONE E LE NOVITÀ DI WINDOWS PHONE 8.1
Dal web a Windows 8: costruire app Metro immersiv - Daniele Bochiccio - whyMCA
Universal Store Apps - Mobile day by DotNetCampania
Mobile e Smart Client
Advanced Push Notification Service
Push Notification: come rendere vive le app su Windows Phone
Windows Phone 8.1 e i background tasks - Andrea Boschin - Codemotion Milan 2014
UNIVERSAL APP IN TUTTE LE SALSE: PHONE, TABLET, PC, XBOX E IOT
70-485: ADVANCED OF DEVELOPING WINDOWS STORE APPS USING C#
WP7 Game Lab
Contracts & Extensions: allargare i confini della propria applicazione (Win8@...
Multitasking, background agents and local notifications
Notify your Windows Store app with Service Bus Notification Hub
Windows AppStudio, app without code
Corso WebApp iOS - Lezione 01: Think Touch Mobile
HCIM08 - Mobile Applications
Notifiche Locali vs Notifiche Push - di Gabriele Coppola
Le basi per lo sviluppo su Windows Phone tool, SDK, il primo progetto
Introduzione alle Universal App
Ad

More from DomusDotNet (10)

PPTX
Unit testing in Visual Studio 2013
PPTX
Advanced ef code first 5.0 - EF@work
PDF
Sviluppare per Intel® Ultrabook™
PPTX
ALM@Work - Continuous delivery 101
PPTX
We Want Web - Web Applications con MVC 3
PPTX
WeWantWeb - WCF Data Services
PPTX
ALM Revolutions - What's new in visual studio ALM 11
PDF
Pomeriggio Entity Framework - WP7 e SQL Compact Edition
PPTX
Pomeriggio Entity Framework - Database First
PPTX
Pomeriggio Entity Framework - Code First
Unit testing in Visual Studio 2013
Advanced ef code first 5.0 - EF@work
Sviluppare per Intel® Ultrabook™
ALM@Work - Continuous delivery 101
We Want Web - Web Applications con MVC 3
WeWantWeb - WCF Data Services
ALM Revolutions - What's new in visual studio ALM 11
Pomeriggio Entity Framework - WP7 e SQL Compact Edition
Pomeriggio Entity Framework - Database First
Pomeriggio Entity Framework - Code First

Push Notification, Live Tile e Background Agent

  • 1. Live Tile, Background Agent e Push Notification Luca Cestola luca.cestola@domusdotnet.org @lucacestola
  • 2. Un approccio differente Con Windows 8 la nostra applicazione ha diversi modi per comunicare attivamente informazioni all’utente. Dove? • Start screen • Lock screen Come? • Tiles • Toast • Badge
  • 3. Start screen e Lock screen Start screen • È dove risiedono le Tiles delle applicazioni. • Si può organizzare la posizione e la grandezza delle Tiles e decidere quali includere o escludere. • Veicola informazioni che hanno a che fare con le nostre applicazioni Lock screen • In maniera ridotta, offre comunque la possibilità alle nostre applicazioni di comunicare con l’utente alcune informazioni utili.
  • 4. Tiles: cos’è? “Una tile è la rappresentazione di una app sullo start screen” Rappresenta un punto di ingresso alla nostra applicazione, ma è anche veicolo attivo di informazioni verso l’utente. • Principale o secondaria • Due grandezze: Square o Wide • Se esistono entrambe, l’utente può scegliere quale grandezza visualizzare. • Zero o più tile secondarie • Ogni tile secondaria può offrire un diverso contenuto e punto di ingresso all’applicazione
  • 5. Live Tiles: perché? Investire del tempo nelle Live Tiles perché: • Rappresentano un elemento distintivo per la nostra app. • Posizionamento migliore sullo Start Screen • Una Live Tile è più accattivante (ed utile) di una statica • Se l’aspetto non è accattivante e le informazioni non sono utili l’utente la Tile verrà posizionata in fondo allo Start Screen 
  • 6. Elementi grafici della tile Template Brand grafico Badge o testuale (Numeric o Glyph)
  • 7. Live Tiles: perché? Caratteristiche da tenere in considerazione: • Non è solo una questione di «gradevolezza» • Contenuti nuovi e frequenti comunicano che la nostra applicazione è «viva» • Informazioni personalizzate tramite ciò che conosciamo dell’utente (app settings o info presenti sui social) • Informazioni contestualizzate (ad esempio localizzazione GPS)
  • 8. Aspetto grafico: Dimensioni Le tiles possono avere aspetti grafici differenti. Si devono utilizzare i template predefiniti. • Square Tile • Contenuti e testo ridotti • Possono contenere un badge e un glyph o un numero • Wide Tile • Più spazio e di conseguenza più immagini o testo
  • 10. Aspetto grafico: Errori da evitare Il brand o il nome dell’applicazione hanno un loro apposito posizionamento, evitate di ripetere tali informazioni in altre posizioni
  • 11. Aspetto grafico: Templates Tile template catalog: http://msdn.microsoft.com/en-us/library/windows/apps/hh761491.aspx
  • 12. Toast • É una notifica popup che appare in alto a destra sullo schermo. • Template come per le tiles http://msdn.microsoft.com/en-us/library/windows/apps/windows.ui.notifications.toasttemplatetype • Uno è poco due sono troppi  da usare per comunicazioni importanti senza esagerare se non si vuole che l’utente le disabiliti.
  • 13. Demo: Tiles • Package.appxmanifest • Tile primaria Square o Wide • Tile secondarie
  • 14. Aggiornamenti tramite notifica I contenuti delle tiles possono essere aggiornati tramite notifiche, in uno dei seguenti modi: • direttamente dall’ app • da un Task in background • da un Push Notification Message
  • 15. Xml di notifica La notifica avviene tramite uno specifico formato xml http://msdn.microsoft.com/en-us/library/windows/apps/br212853.aspx La libreria WnsRecipe installabile tramite NuGet offre un model per semplificare la creazione delle notifiche per Tile, Toast e Badge
  • 16. Demo: Notifiche • Tile • Live tile • Toast • Badge
  • 17. Background Tasks • Windows 8 consente alle Store App di eseguire operazioni anche se non sono correntemente attive (Running). • L’esecuzione del Background task, una volta registrato, è gestito dal sistema operativo • Tali operazioni sono eseguite in un host esterno all’applicazione (BackgroundTaskHost.exe) o all’interno della nostra App a seconda delle impostazioni o delle condizioni correnti della nostra App (Running, Suspended, Terminated) • I task sono attivati attraverso Trigger specifici per ogni tipologia di evento e possono avere delle precondizioni
  • 18. Background Task: Triggers Background task trigger type Trigger event When the background task is triggered ControlChannelTrigger ControlChannelTrigger On incoming messages on the control channel. MaintenanceTrigger MaintenanceTrigger It’s time for maintenance background tasks. PushNotificationTrigger PushNotificationTrigger A raw notification arrives on the WNS channel. SystemEventTrigger InternetAvailable The Internet becomes available. SystemEventTrigger SmsReceived A new SMS message is received by an installed mobile broadband device. SystemEventTrigger UserAway The user becomes absent. SystemEventTrigger UserPresent The user becomes present. TimeTrigger TimeTrigger A time event occurs.
  • 19. Background Task: Task Conditions Background task condition The condition that must be satisfied InternetAvailable The Internet must be available. InternetNotAvailable The Internet must be unavailable. SessionConnected The session must be connected. SessionDisconnected The session must be disconnected. UserNotPresent The user must be away. UserPresent The user must be present.
  • 20. Background Task: Host types Background task trigger type Host executable TimeTrigger Cannot be specified (default system host) SystemTrigger Cannot be specified (default system host) MaintenanceTrigger Cannot be specified (default system host) PushNotificationTrigger Application provided exe OR Not specified (default system host) ControlChannelTrigger Application provided exe
  • 21. Ciclo di vita di un Background Task
  • 22. Demo: Background Task • Background Task • Task progress e completion • Riassociazione handlers eventi
  • 23. Push notification: WNS • Il Windows Push Notification Services (WNS) permette l’invio di notifiche alle nostre Windows Store App installate su un determinato device. • Tramite WNS un servizio cloud o classico può inviare alla nostra Store App notifiche toast, tile, badge o raw. • Il server ottiene un canale di comunicazione valido verso il WNS tramite il PackageSecurityidentifier ed il ClientSecret associati all’app.
  • 25. Demo: Push Notifications • Richiesta di un Canale per le notifiche al client • Simulazione di invio di notifiche da server
  • 26. Riferimenti e risorse • White papers http://msdn.microsoft.com/en-us/library/windows/apps/hh465413.aspx • Guidelines and checklist for tiles and badges http://msdn.microsoft.com/en-us/library/windows/apps/hh465403.aspx • Guidelines and checklist for background tasks http://msdn.microsoft.com/en-us/library/windows/apps/hh977043.aspx • Guidelines and checklist for push notifications http://msdn.microsoft.com/en-us/library/windows/apps/Hh761462.aspx • Samples http://code.msdn.microsoft.com/windowsapps