• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Sviluppare una live app notifiche, live tile, lock screen
 

Sviluppare una live app notifiche, live tile, lock screen

on

  • 658 views

Una caratteristica di Microsoft Windows Phone che la rende unica rispetto alle altre piattaforma è il supporto alle Live Tile, che consentono di mostrare informazioni all'utente direttamente nella ...

Una caratteristica di Microsoft Windows Phone che la rende unica rispetto alle altre piattaforma è il supporto alle Live Tile, che consentono di mostrare informazioni all'utente direttamente nella home screen, senza costringerlo ad aprire l'applicazione. In Windows Phone 8 questa potenzialità è stata portata ai massimi livelli, grazie al supporto a nuovi formati e template di Live Tile e alla possibilità di interagire con la lock screen. Nel corso del webinar impareremo come sfruttare queste funzionalità grazie alle notifiche.
A unique feature of Microsoft Windows Phone is support for Live Tiles, which can be used to display information from an application on the home screen without forcing users to open the app. Windows Phone 8 enhancements support new formats and Live Tile templates and include the ability to interact with the lock screen. In this webinar, you’ll learn how to leverage these features through the Windows Phone notifications capability.

Statistics

Views

Total Views
658
Views on SlideShare
658
Embed Views
0

Actions

Likes
0
Downloads
16
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Sviluppare una live app notifiche, live tile, lock screen Sviluppare una live app notifiche, live tile, lock screen Presentation Transcript

    • NOKIA WEBINAR SVILUPPARE UNA LIVE APP NOTIFICHE, LIVE TILE, LOCK SCREEN Dan Ardelean Nokia Developer Champion dan@xpresscode.eu Twitter: @danardelean
    • AGENDA Cosa sone le Live App Live Tile Lock screen Notifiche Background agents Nokia Internal Use Only
    • LIVE APPS 1. FONDAMENTALE per le applicazioni Windows Phone 2. Quello che fa la differenza tra Windows Phone e altri smartphone 3. Uno dei principali motivi per quale l’utente torna usare la vostra applicazione © 2013 Nokia. All rights reserved. © 2013 Microsoft. All rights reserved. 11/12/2013 Nokia Internal Use Only
    • LIVE APPS © 2013 Nokia. All rights reserved. © 2013 Microsoft. All rights reserved. 11/12/2013 Nokia Internal Use Only
    • LIVE TILES • La porta principale per accedere alla vostra applicazione • Uno spazio dove fornire il massimo delle informazioni utili all’utente • NON è solo un collegamento alla vostra applicazione • Accesso veloce alle funzionalità più usate © 2013 Nokia. All rights reserved. © 2013 Microsoft. All rights reserved. 11/12/2013 Nokia Internal Use Only
    • TILE TEMPLATES AND TILE SIZES Flip Iconic Cycle 6 Nokia Internal Use Only
    • IMPOSTAZIONI TILE PRINCIPALE Doppio-click su WMAppManifest.xml © 2013 Nokia. All rights reserved. © 2013 Microsoft. All rights reserved. 11/12/2013 Nokia Internal Use Only
    • DIMENSIONI IMMAGINI Dimensione Tile Template Flip e Cycle Template Iconic Small 159 x 159 pixels 159 x 159 pixels 110 x 110 pixels Medium 336 x 336 pixels 336 x 336 pixels 202 x 202 pixels Wide 691 x 336 pixels 691 x 336 pixels N/A © 2013 Nokia. All rights reserved. © 2013 Microsoft. All rights reserved. 11/12/2013 Nokia Internal Use Only
    • FLIP © 2013 Nokia. All rights reserved. © 2013 Microsoft. All rights reserved. 11/12/2013 Nokia Internal Use Only
    • ICONIC © 2013 Nokia. All rights reserved. © 2013 Microsoft. All rights reserved. 11/12/2013 Nokia Internal Use Only
    • CYCLE © 2013 Nokia. All rights reserved. © 2013 Microsoft. All rights reserved. 11/12/2013 Nokia Internal Use Only
    • PIÙ IMPORTANTE DELLA DEMO DESIGN & FUNZIONALITÀ © 2013 Nokia. All rights reserved. © 2013 Microsoft. All rights reserved. 11/12/2013 Nokia Internal Use Only
    • ME TILE - FLIP ? OK • • • Non mi da informazioni essenziali sulla parte frontale Devo aspettare che si gira = LENTA Non ho più informazioni della versione piccola © 2013 Nokia. All rights reserved. © 2013 Microsoft. All rights reserved. X • • INUTILE Versione IL NARCISISTA 11/12/2013 Nokia Internal Use Only
    • EMAIL - ICONIC OK ? © 2013 Nokia. All rights reserved. © 2013 Microsoft. All rights reserved. OK 11/12/2013 Nokia Internal Use Only
    • CYCLE - FOTO © 2013 Nokia. All rights reserved. © 2013 Microsoft. All rights reserved. 11/12/2013 Nokia Internal Use Only
    • BISOGNA ESSERE CREATIVI X Bing Finance © 2013 Nokia. All rights reserved. © 2013 Microsoft. All rights reserved. My Stocks Portfolio+ 11/12/2013 Nokia Internal Use Only
    • DEMO TILE © 2013 Nokia. All rights reserved. © 2013 Microsoft. All rights reserved. 11/12/2013 Nokia Internal Use Only
    • SHELLTILESCHEDULE • Aggiornamento immagine di background delle tile usando la proprietà RemoteImageUri • L’immagine deve essere più piccola di 150KB Tempo di download < 45 sec. • Risoluzione minima 1 ora • Rimossa dopo 3 tentativi consecutivi falliti • Ricorrenza Onetime, EveryHour, EveryDay, EveryWeek or EveryMonth © 2013 Nokia. All rights reserved. © 2013 Microsoft. All rights reserved. 11/12/2013 Nokia Internal Use Only
    • DEMO SHELL TILE SCHEDULE © 2013 Nokia. All rights reserved. © 2013 Microsoft. All rights reserved. 11/12/2013 Nokia Internal Use Only
    • LOCKSCREEN • La prima cosa che l’utente vede quando accende il telefono • Le applicazioni possono fornire il background della lockscreen, stato dettagliato o quick status • WMAppManifest.xml <Extensions> <Extension ExtensionName="LockScreen_Notification_IconCount" ConsumerID="{111DFF24-AA15-4A96-8006-2BFF8122084F}" TaskID="_default" /> <Extension ExtensionName="LockScreen_Notification_TextField" ConsumerID="{111DFF24-AA15-4A96-8006-2BFF8122084F}" TaskID="_default" /> <Extension ExtensionName="LockScreen_Background" ConsumerID="{111DFF24-AA15-4A96-8006-2BFF8122084F}" TaskID="_default" /> </Extensions> © 2013 Nokia. All rights reserved. © 2013 Microsoft. All rights reserved. 11/12/2013 Nokia Internal Use Only
    • LOCKSCREEN ICONA: 30 x 30 pixel PNG – bianca e sfondo trasparente Nome default - LockIcon.png <DeviceLockImageURI IsRelative="true" IsResource="false">AssetsLockLockIcon.png</DeviceLockImageURI> Prende le informazioni della tile principale Non è necessario che la tile principale si trovi nella videata Start BACKGROUND: Dalle risorse della app ms-appx:/// Uri imageUri = new Uri("ms-appx:///background1.png", UriKind.RelativeOrAbsolute); LockScreen.SetImageUri(imageUri); Da IsolatedStorage, ms-appdata:///local/ Uri imageUri = new Uri("ms-appdata:///local/background2.png",UriKind.RelativeOrAbsolute); LockScreen.SetImageUri(imageUri); © 2013 Nokia. All rights reserved. © 2013 Microsoft. All rights reserved. 11/12/2013 Nokia Internal Use Only
    • DEMO LOCKSCREEN © 2013 Nokia. All rights reserved. © 2013 Microsoft. All rights reserved. 11/12/2013 Nokia Internal Use Only
    • NOTIFICHE PUSH • • • Raw • Protocollo custom • Inviato solo se l’applicazione è in esecuzione Toast • Protocollo XML • Se l’applicazione non è in esecuzione notifica Toast Tile • Protocollo XML • Se la Tile è pinned viene aggiornata © 2013 Nokia. All rights reserved. © 2013 Microsoft. All rights reserved. 11/12/2013 Nokia Internal Use Only
    • PUSH NOTIFICATION DATA FLOW 2 URI to the service: Push enabled applications Third-party service "http://notify.live.com/throttledthirdparty/01.00/AAFRQHgiiMWNTYrRDX AHQtz-AgrNpzcDAwAAAAQOMDAwMDAwMDAwMDAwMDA" Notifications service 3 4 Send PN Message HTTP POST the message 1 Push endpoint is established. URI is created for the endpoint. MPNS: Microsoft hosted server
    • NOTIFICHE HTTP HEADERS • TOAST sendNotificationRequest.ContentType = "text/xml"; sendNotificationRequest.Headers.Add("X-WindowsPhone-Target", "toast"); sendNotificationRequest.Headers.Add("X-NotificationClass", "<batching interval>"); • TILE sendNotificationRequest.ContentType = "text/xml"; sendNotificationRequest.Headers.Add("X-WindowsPhone-Target", “token"); sendNotificationRequest.Headers.Add("X-NotificationClass", "<batching interval>"); • RAW sendNotificationRequest.ContentType = "text/xml"; sendNotificationRequest.Headers.Add("X-NotificationClass", "<batching interval>"); © 2013 Nokia. All rights reserved. © 2013 Microsoft. All rights reserved. 11/12/2013 Nokia Internal Use Only
    • TOAST SCHEMA string toastMessage = "<?xml version="1.0" encoding="utf-8"?>" + "<wp:Notification xmlns:wp="WPNotification">" + "<wp:Toast>" + "<wp:Text1>WEATHER ALERT</wp:Text1>" + "<wp:Text2>Stormy</wp:Text2>" + "<wp:Param>/page1.xaml?value1=1234<wp:Param>" + "</wp:Toast>" + "</wp:Notification>"; © 2013 Nokia. All rights reserved. © 2013 Microsoft. All rights reserved. 11/12/2013 Nokia Internal Use Only
    • FLIP TEMPLATE SCHEMA <?xml version="1.0"?> <wp:Notification xmlns:wp="WPNotification" Version="2.0"> <wp:Tile Id="[TileId]" Template="FlipTile"> <wp:SmallBackgroundImage Action="Clear">[sm tile img URI]</wp:SmallBackgroundImage> <wp:WideBackgroundImage Action="Clear">[front of wd tile img URI]</wp:WideBackgroundImage> <wp:WideBackBackgroundImage Action="Clear">[back of wd tile img URI]</wp:WideBackBackgroundImage> <wp:WideBackContent Action="Clear">[back of wd tile content text]</wp:WideBackContent> <wp:BackgroundImage Action="Clear">[front of med tile img URI]</wp:BackgroundImage> <wp:Count Action="Clear">[count]</wp:Count> <wp:Title Action="Clear">[title text]</wp:Title> <wp:BackBackgroundImage Action="Clear">[back of med tile img URI]</wp:BackBackgroundImage> <wp:BackTitle Action="Clear">[back of tile title text]</wp:BackTitle> <wp:BackContent Action="Clear">[back of med tile content text]</wp:BackContent> </wp:Tile> </wp:Notification> © 2013 Nokia. All rights reserved. © 2013 Microsoft. All rights reserved. 11/12/2013 Nokia Internal Use Only
    • CYCLE TEMPLATE SCHEMA <?xml version="1.0"?> <wp:Notification xmlns:wp="WPNotification" Version="2.0"> <wp:Tile Id="[TileId]" Template="CycleTile"> <wp:SmallBackgroundImage Action="Clear">[sm tile img URI]</wp:SmallBackgroundImage> <wp:CycleImage1 Action="Clear">[photo 1 img URI]</wp:CycleImage1> <wp:CycleImage2 Action="Clear">[photo 2 img URI]</wp:CycleImage2> <wp:CycleImage3 Action="Clear">[photo 3 img URI]</wp:CycleImage3> <wp:CycleImage4 Action="Clear">[photo 4 img URI]</wp:CycleImage4> <wp:CycleImage5 Action="Clear">[photo 5 img URI]</wp:CycleImage5> <wp:CycleImage6 Action="Clear">[photo 6 img URI]</wp:CycleImage6> <wp:CycleImage7 Action="Clear">[photo 7 img URI]</wp:CycleImage7> <wp:CycleImage8 Action="Clear">[photo 8 img URI]</wp:CycleImage8> <wp:CycleImage9 Action="Clear">[photo 9 img URI]</wp:CycleImage9> <wp:Count Action="Clear">[count]</wp:Count> <wp:Title Action="Clear">[title text]</wp:Title> </wp:Tile> </wp:Notification> © 2013 Nokia. All rights reserved. © 2013 Microsoft. All rights reserved. 11/12/2013 Nokia Internal Use Only
    • ICONIC TEMPLATE SCHEMA <?xml version="1.0"?> <wp:Notification xmlns:wp="WPNotification" Version="2.0"> <wp:Tile Id="[TileId]" Template="IconicTile"> <wp:SmallIconImage Action="Clear">[sm icon img URI]</wp:SmallIconImage> <wp:IconImage Action="Clear">[med/wd icon img URI]</wp:IconImage> <wp:WideContent1 Action="Clear">[wd tile content line 1]</wp:WideContent1> <wp:WideContent2 Action="Clear">[wd tile content line 2]</wp:WideContent2> <wp:WideContent3 Action="Clear">[wd tile content line 3]</wp:WideContent3> <wp:Count Action="Clear">[count]</wp:Count> <wp:Title Action="Clear">[title text]</wp:Title> <wp:BackgroundColor Action="Clear">[hex ARGB background color of tile]</wp:BackgroundColor> </wp:Tile> </wp:Notification> © 2013 Nokia. All rights reserved. © 2013 Microsoft. All rights reserved. 11/12/2013 Nokia Internal Use Only
    • SAMPLE E APPROFONDIMENTI Windows Phone 8 JumpStart Module 08: Push Notifications http://channel9.msdn.com/Series/MVA-Jump-Start/Building-Apps-for-Windows-Phone-8-Jump-Start08-Push-Notifications http://code.msdn.microsoft.com/Windows-Phone-8-JumpStart-ab6c839a © 2013 Nokia. All rights reserved. © 2013 Microsoft. All rights reserved. 11/12/2013 Nokia Internal Use Only
    • DEMO NOTIFICHE PUSH © 2013 Nokia. All rights reserved. © 2013 Microsoft. All rights reserved. 11/12/2013 Nokia Internal Use Only
    • BACKGROUND TASKS PeriodicTask • • Eseguito ogni 30 minuti Massimo 25 secondi ResourceIntensiveTask • • • • • Il telefono è in carica collegato via WiFi e carica batteria >90% Il telefono non viene usato Tempo massimo di esecuzione 10 minuti Utilizzo memoria <= 6 MB Cancellato dopo 2 crash consecutivi © 2013 Nokia. All rights reserved. © 2013 Microsoft. All rights reserved. 11/12/2013 Nokia Internal Use Only
    • ACCESSO CONCORENZIALE public bool LoadLogFromIsolatedStorageFile() { mut.WaitOne(); // Wait until it is safe to enter try { // read the file here return true; } catch { LogText = ""; return false; } finally { mut.ReleaseMutex(); // Release the Mutex. } } © 2013 Nokia. All rights reserved. © 2013 Microsoft. All rights reserved. 11/12/2013 Nokia Internal Use Only
    • BACKGROUND TRANSFERS Trasferimento da/verso IsolatedStorage Funzionano quando l’applicazione non è in primo piano Collegamenti HTTP e HTTPS Possibilità di monitorare lo stato Impostare le condizioni usando TransferPreferences Dimensioni file: • • • Upload : 5Mb Download usando dati cellulare: 20Mb Download usando WiFi: 100Mb Dimensione massima coda trasferimenti 25 © 2013 Nokia. All rights reserved. © 2013 Microsoft. All rights reserved. 11/12/2013 Nokia Internal Use Only
    • Grazie! Blog: sviluppomobile.blogspot.com Email: dan@xpresscode.eu Twitter: @danardelean © 2013 Nokia. All rights reserved. © 2013 Microsoft. All rights reserved. 11/12/2013 Nokia Internal Use Only