SlideShare une entreprise Scribd logo
1  sur  27
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

Contenu connexe

En vedette

ALM@Work - Typical developer day
ALM@Work - Typical developer dayALM@Work - Typical developer day
ALM@Work - Typical developer dayDomusDotNet
 
Tubia method music therapy13pp
Tubia method music therapy13ppTubia method music therapy13pp
Tubia method music therapy13ppTubiamethod
 
ALM@Work - Team collaboration with visual studio alm 2012
ALM@Work - Team collaboration with visual studio alm 2012ALM@Work - Team collaboration with visual studio alm 2012
ALM@Work - Team collaboration with visual studio alm 2012DomusDotNet
 
ALM@Work - Unit testing in Visual studio 2012
ALM@Work - Unit testing in Visual studio 2012ALM@Work - Unit testing in Visual studio 2012
ALM@Work - Unit testing in Visual studio 2012DomusDotNet
 
Retailing in pakistan
Retailing in pakistan Retailing in pakistan
Retailing in pakistan Nasir Khattak
 
John A Chapman opportunities minerals space 20120131
John A Chapman opportunities minerals space 20120131John A Chapman opportunities minerals space 20120131
John A Chapman opportunities minerals space 20120131John Chapman
 
School Management System Software
School Management System SoftwareSchool Management System Software
School Management System SoftwareZippro System Ltd
 
Application lifecycle management ... e quindi
Application lifecycle management ... e quindiApplication lifecycle management ... e quindi
Application lifecycle management ... e quindiDomusDotNet
 
ASP.NET MVC: sfruttare la piattaforma al 100%
ASP.NET MVC: sfruttare la piattaforma al 100%ASP.NET MVC: sfruttare la piattaforma al 100%
ASP.NET MVC: sfruttare la piattaforma al 100%DomusDotNet
 
Empezando a utilizar word press
Empezando a utilizar word pressEmpezando a utilizar word press
Empezando a utilizar word pressESPO
 
Ximun, beñat eta sebas festak
Ximun, beñat eta sebas festakXimun, beñat eta sebas festak
Ximun, beñat eta sebas festakorixe4maila
 
Practica 3
Practica 3Practica 3
Practica 3nymph167
 
Credo de un ganador
Credo de un ganadorCredo de un ganador
Credo de un ganadorGabii Loboa
 

En vedette (19)

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

Similaire à Push Notification, Live Tile e Background Agent

Lavorare con tile, badge e notification nelle applicazioni Windows 8
Lavorare con tile, badge e notification nelle applicazioni Windows 8Lavorare con tile, badge e notification nelle applicazioni Windows 8
Lavorare con tile, badge e notification nelle applicazioni Windows 8Antonio Pelleriti
 
SIGNALR TO-THE-MAX: VERSO IL WEB ED OLTRE!
SIGNALR TO-THE-MAX: VERSO IL WEB ED OLTRE!SIGNALR TO-THE-MAX: VERSO IL WEB ED OLTRE!
SIGNALR TO-THE-MAX: VERSO IL WEB ED OLTRE!DotNetCampus
 
Signal r to the-max
Signal r to the-maxSignal r to the-max
Signal r to the-maxDotNetCampus
 
Del furia signalr-to-the-max
Del furia   signalr-to-the-maxDel furia   signalr-to-the-max
Del furia signalr-to-the-maxDotNetCampus
 
70-485: ADVANCED OF DEVELOPING WINDOWS STORE APPS USING C#
70-485: ADVANCED OF DEVELOPING WINDOWS STORE APPS USING C#70-485: ADVANCED OF DEVELOPING WINDOWS STORE APPS USING C#
70-485: ADVANCED OF DEVELOPING WINDOWS STORE APPS USING C#DotNetCampus
 
Cert04 70-484 - essentials of developing windows store apps
Cert04   70-484 - essentials of developing windows store appsCert04   70-484 - essentials of developing windows store apps
Cert04 70-484 - essentials of developing windows store appsDotNetCampus
 
Sviluppare per Microsoft Band
Sviluppare per Microsoft BandSviluppare per Microsoft Band
Sviluppare per Microsoft BandMassimo Bonanni
 
Soluzioni IoT con le tecnologie Microsoft
Soluzioni IoT con le tecnologie MicrosoftSoluzioni IoT con le tecnologie Microsoft
Soluzioni IoT con le tecnologie MicrosoftMassimo Bonanni
 
DevOps@Work 2017 - Azure Mobile Engagement
DevOps@Work 2017 - Azure Mobile EngagementDevOps@Work 2017 - Azure Mobile Engagement
DevOps@Work 2017 - Azure Mobile EngagementRoberto Albano
 
Progettazione per Apple Watch - Todi Appy Days 2015
Progettazione per Apple Watch - Todi Appy Days 2015Progettazione per Apple Watch - Todi Appy Days 2015
Progettazione per Apple Watch - Todi Appy Days 2015Todi Appy Days
 
Wearable Lab: Progettazione per Apple Watch
Wearable Lab: Progettazione per Apple WatchWearable Lab: Progettazione per Apple Watch
Wearable Lab: Progettazione per Apple WatchPaolo Musolino
 
Soluzioni IoT con le tecnologie Microsoft
Soluzioni IoT con le tecnologie MicrosoftSoluzioni IoT con le tecnologie Microsoft
Soluzioni IoT con le tecnologie MicrosoftMassimo Bonanni
 
Sviluppare per microsoft band
Sviluppare per microsoft bandSviluppare per microsoft band
Sviluppare per microsoft bandDotNetCampus
 
SVILUPPARE PER MICROSOFT BAND
SVILUPPARE PER MICROSOFT BANDSVILUPPARE PER MICROSOFT BAND
SVILUPPARE PER MICROSOFT BANDDotNetCampus
 
Microsoft Azure per l'IT Pro
Microsoft Azure per l'IT ProMicrosoft Azure per l'IT Pro
Microsoft Azure per l'IT ProMarco Parenzan
 
Csp@scuola smarttv corso1
Csp@scuola smarttv corso1Csp@scuola smarttv corso1
Csp@scuola smarttv corso1CSP Scarl
 
Moving from Monolithic to Microservice Architecture: an OSS based stack deplo...
Moving from Monolithic to Microservice Architecture: an OSS based stack deplo...Moving from Monolithic to Microservice Architecture: an OSS based stack deplo...
Moving from Monolithic to Microservice Architecture: an OSS based stack deplo...Codemotion
 
DevOps@Work 2017 - Application insights more control, more power
DevOps@Work 2017 - Application insights more control, more powerDevOps@Work 2017 - Application insights more control, more power
DevOps@Work 2017 - Application insights more control, more powerRoberto Albano
 
EtnaDev 2016 - Application Insights
EtnaDev 2016 - Application InsightsEtnaDev 2016 - Application Insights
EtnaDev 2016 - Application InsightsRoberto Albano
 

Similaire à Push Notification, Live Tile e Background Agent (20)

Lavorare con tile, badge e notification nelle applicazioni Windows 8
Lavorare con tile, badge e notification nelle applicazioni Windows 8Lavorare con tile, badge e notification nelle applicazioni Windows 8
Lavorare con tile, badge e notification nelle applicazioni Windows 8
 
SIGNALR TO-THE-MAX: VERSO IL WEB ED OLTRE!
SIGNALR TO-THE-MAX: VERSO IL WEB ED OLTRE!SIGNALR TO-THE-MAX: VERSO IL WEB ED OLTRE!
SIGNALR TO-THE-MAX: VERSO IL WEB ED OLTRE!
 
Signal r to the-max
Signal r to the-maxSignal r to the-max
Signal r to the-max
 
Del furia signalr-to-the-max
Del furia   signalr-to-the-maxDel furia   signalr-to-the-max
Del furia signalr-to-the-max
 
70-485: ADVANCED OF DEVELOPING WINDOWS STORE APPS USING C#
70-485: ADVANCED OF DEVELOPING WINDOWS STORE APPS USING C#70-485: ADVANCED OF DEVELOPING WINDOWS STORE APPS USING C#
70-485: ADVANCED OF DEVELOPING WINDOWS STORE APPS USING C#
 
Cert04 70-484 - essentials of developing windows store apps
Cert04   70-484 - essentials of developing windows store appsCert04   70-484 - essentials of developing windows store apps
Cert04 70-484 - essentials of developing windows store apps
 
Sviluppare per Microsoft Band
Sviluppare per Microsoft BandSviluppare per Microsoft Band
Sviluppare per Microsoft Band
 
Soluzioni IoT con le tecnologie Microsoft
Soluzioni IoT con le tecnologie MicrosoftSoluzioni IoT con le tecnologie Microsoft
Soluzioni IoT con le tecnologie Microsoft
 
DevOps@Work 2017 - Azure Mobile Engagement
DevOps@Work 2017 - Azure Mobile EngagementDevOps@Work 2017 - Azure Mobile Engagement
DevOps@Work 2017 - Azure Mobile Engagement
 
Progettazione per Apple Watch - Todi Appy Days 2015
Progettazione per Apple Watch - Todi Appy Days 2015Progettazione per Apple Watch - Todi Appy Days 2015
Progettazione per Apple Watch - Todi Appy Days 2015
 
Wearable Lab: Progettazione per Apple Watch
Wearable Lab: Progettazione per Apple WatchWearable Lab: Progettazione per Apple Watch
Wearable Lab: Progettazione per Apple Watch
 
Soluzioni IoT con le tecnologie Microsoft
Soluzioni IoT con le tecnologie MicrosoftSoluzioni IoT con le tecnologie Microsoft
Soluzioni IoT con le tecnologie Microsoft
 
Sviluppare per microsoft band
Sviluppare per microsoft bandSviluppare per microsoft band
Sviluppare per microsoft band
 
SVILUPPARE PER MICROSOFT BAND
SVILUPPARE PER MICROSOFT BANDSVILUPPARE PER MICROSOFT BAND
SVILUPPARE PER MICROSOFT BAND
 
Microsoft Azure per l'IT Pro
Microsoft Azure per l'IT ProMicrosoft Azure per l'IT Pro
Microsoft Azure per l'IT Pro
 
Csp@scuola smarttv corso1
Csp@scuola smarttv corso1Csp@scuola smarttv corso1
Csp@scuola smarttv corso1
 
Moving from Monolithic to Microservice Architecture: an OSS based stack deplo...
Moving from Monolithic to Microservice Architecture: an OSS based stack deplo...Moving from Monolithic to Microservice Architecture: an OSS based stack deplo...
Moving from Monolithic to Microservice Architecture: an OSS based stack deplo...
 
DevOps@Work 2017 - Application insights more control, more power
DevOps@Work 2017 - Application insights more control, more powerDevOps@Work 2017 - Application insights more control, more power
DevOps@Work 2017 - Application insights more control, more power
 
Presentazione
PresentazionePresentazione
Presentazione
 
EtnaDev 2016 - Application Insights
EtnaDev 2016 - Application InsightsEtnaDev 2016 - Application Insights
EtnaDev 2016 - Application Insights
 

Plus de DomusDotNet

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

Plus de DomusDotNet (10)

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