SlideShare a Scribd company logo
1 of 64
demo
demo
demo
// Application manifest capabilities required to access camera
and microphone
<Capabilities>
    <DeviceCapability Name="webcam" />
    <DeviceCapability Name="microphone" />
</Capabilities>
CameraCaptureUI dialog = new CameraCaptureUI();
Size aspectRatio = new Size(16, 9);
dialog.PhotoSettings.CroppedAspectRatio = aspectRatio;

StorageFile file = await
dialog.CaptureFileAsync(CameraCaptureUIMode.Photo);
if (file != null)
{
    BitmapImage bitmapImage = new BitmapImage();
    using (IRandomAccessStream fileStream = await
file.OpenAsync(Windows.Storage.FileAccessMode.Read))
        bitmapImage.SetSource(fileStream);

    image.Source = bitmapImage;
}
demo
<Capabilities>
  <Capability Name= "???_Library" />
</Capabilities>




StorageFile sampleFile = await
          KnownFolders.VideosLibrary.GetFileAsync("vNext.txt");

var doc = await XmlDocument.LoadFromFileAsync(sampleFile);
demo
<Extensions>
  <Extension Category="windows.shareTarget"
             Executable="SampleShareTarget.exe"
             EntryPoint="SampleShareTarget.App">
    <ShareTarget>
      <SupportedFileTypes>
        <SupportsAnyFileType />
      </SupportedFileTypes>
      <DataFormat>text</DataFormat>
      <DataFormat>bitmap</DataFormat>
      <DataFormat>uri</DataFormat>
      <DataFormat>html</DataFormat>
      <DataFormat>Valentine-Love-Catcher</DataFormat>
    </ShareTarget>
  </Extension>
</Extensions>
protected override async void
OnShareTargetActivated(ShareTargetActivatedEventArgs args)
{
    BlankPage shareTargetPage = new BlankPage();
    await shareTargetPage.ActivateAsync(args);
}
public async Task ActivateAsync(ShareTargetActivatedEventArgs args)
{
    if (args.Kind == ActivationKind.ShareTarget)
    {
        shareOperation = args.ShareOperation;

        txtTitle.Text = shareOperation.Data.Properties.Title;
        txtDesc.Text = shareOperation.Data.Properties.Description;

        if (shareOperation.Data.Contains(StandardDataFormats.Text))
        {
            string text = await this.shareOperation.Data.GetTextAsync();
            if (text != null)
            {
                txtText.Text = text;
            }
        }
    }
}
DataTransferManager
                     DataTransferManager
                                    new                   Data
TransferManager DataRequestedEventArgs

//[OPTIONALLY] If application makes distinction between target
applications, subscribe to this event




//[OPTIONALLY] Force showing share UI
DataTransferManager
private async void                 DataTransferManager
DataRequestedEventArgs


       "Sample share source app"

       "Spread the word about this lovely application"

        RandomAccessStreamReference              new Uri "ms-
appx:///Images/Love.png"
                              "Sample text"

        RandomAccessStreamReference              new Uri "ms-
appx:///Images/test.png"
Capabilities     Seamless      Performant
driven           data access

High isolation   Data          Native
                 Roaming       platform
demo
ITileWideSmallImageAndText03 tileContent =
        TileContentFactory.CreateTileWideSmallImageAndText03();
tileContent.TextBodyWrap.Text = "Main tile updated from
application!";
tileContent.Image.Src = "ms-appx:///Images/Bouquet.png";
tileContent.RequireSquareContent = false;
TileUpdateManager.CreateTileUpdaterForApplication().Update(
            tileContent.CreateNotification());
IToastImageAndText02 templateContent =
         ToastContentFactory.CreateToastImageAndText02();
templateContent.TextHeading.Text = "Toast sample";
templateContent.TextBodyWrap.Text = "Toast message from
application!";
templateContent.Image.Src = "Images/NewYear.png";
templateContent.Image.Alt = "Placeholder image";
IToastNotificationContent toastContent = templateContent;

ToastNotification toast = toastContent.CreateNotification();
ToastNotificationManager.CreateToastNotifier().Show(toast);
BadgeNumericNotificationContent badgeContent =
        new BadgeNumericNotificationContent();
badgeContent.Number = 23;

BadgeUpdateManager.CreateBadgeUpdaterForApplication().Update(
        badgeContent.CreateNotification());
Uri logo = new Uri("ms-appx:///images/LoveIcon.png");
Uri wideLogo = new Uri("ms-appx:///images/WideSecondary.png");

SecondaryTile secondaryTile = new
SecondaryTile("LiveTilesAndToastsSample.SecondaryTile",
              "Secondary tile",
              "Secondary tile from app",
              "argumets=Alex,123",
              TileOptions.ShowNameOnWideLogo |
              TileOptions.ShowNameOnLogo,
              logo,
              wideLogo);

bool isPinned =
    await secondaryTile.RequestCreateForSelectionAsync(
                                 new Rect(10,10,100,100));
ITileWideSmallImageAndText03 tileContent =
        TileContentFactory.CreateTileWideSmallImageAndText03();
tileContent.TextBodyWrap.Text = "Secondary tile updated from
application!";
tileContent.Image.Src = "ms-appx:///Images/NewYear.png";
tileContent.RequireSquareContent = false;

TileUpdateManager.CreateTileUpdaterForSecondaryTile(
   "LiveTilesAndToastsSample.SecondaryTile").Update(
                   tileContent.CreateNotification());
1. Request Channel URI
2. Register with your Cloud
   Service
3. Authenticate & Push
   Notification
demo
var pushNotificationChannel = await
PushNotificationChannelManager.CreatePushNotificationChannelFor
ApplicationAsync();
var channelUri = pushNotificationChannel.Uri;

//Optional channel for Secondary tile
if (SecondaryTile.Exists(SecondaryTileID))
{
    var secondaryPushNotificationChannel = await
PushNotificationChannelManager.CreatePushNotificationChannelFor
SecondaryTileAsync(SecondaryTileID);
    var secondaryChannelUri =
                 secondaryPushNotificationChannel.Uri;
}
private static Stream GetAccessToken(string sid, string secret)
{
    string url = "https://login.live.com/accesstoken.srf";
    var request = (HttpWebRequest)WebRequest.Create(url);

    request.Method = "POST";
    request.ContentType = "application/x-www-form-urlencoded";
    string content =
"grant_type=client_credentials&client_id={0}&client_secret={1}&
scope=notify.windows.com";
    string data = string.Format(content, sid, secret);
    byte[] notificationMessage =
           Encoding.Default.GetBytes(data);
request.ContentLength = notificationMessage.Length;

    using (Stream requestStream = request.GetRequestStream())
        requestStream.Write(notificationMessage, 0,
                            notificationMessage.Length);

    var response = (HttpWebResponse)request.GetResponse();
    Stream result = response.GetResponseStream();
    return result;
}
private static HttpStatusCode Push(string pushUri, string
accessToken, string type, string notificationData)
{
    var subscriptionUri = new Uri(pushUri);
    var request =
        (HttpWebRequest)WebRequest.Create(subscriptionUri);

   request.Method = "POST";
   request.ContentType = "text/xml";
   request.Headers = new WebHeaderCollection();
   request.Headers.Add("X-WNS-Type", type);
   request.Headers.Add("Authorization", "Bearer " +
       accessToken);
byte[] notificationMessage =
           Encoding.Default.GetBytes(notificationData);
    request.ContentLength = notificationMessage.Length;

    using (Stream requestStream = request.GetRequestStream())
        requestStream.Write(notificationMessage, 0,
                            notificationMessage.Length);

    var response = (HttpWebResponse)request.GetResponse();
    return response.StatusCode;
}
string pushUri = "https://db3.notify.windows.com/...";
string secret = HttpUtility.UrlEncode("2A...");
string sid = HttpUtility.UrlEncode("ms-app://s-...");
var obj =
System.Json.JsonObject.Load(GetAccessToken(sid, secret));
string accessToken = obj["access_token"].ToString();

//Send Badge notification
string badgeNotification = "<?xml version='1.0' encoding='utf-
8'?><badge value="13"/>";
HttpStatusCode status =
Push(pushUri, accessToken, "wns/badge", badgeNotification);
//Send Toast notification
string tostNotification = "<?xml version='1.0' encoding='utf-
8'?><toast><visual><binding
template="ToastImageAndText02"><image id="1"
src="Assets/Logo.png" alt="Placeholder image"/><text
id="1">Urgent news</text><text id="2">New vNext meetup
scheduled!</text></binding></visual></toast>";
status = Push(pushUri, accessToken, "wns/toast",
tostNotification);
//Send Tile notification
string tileNotification = "<?xml version='1.0' encoding='utf-
8'?><tile><visual><binding
template="TileWideSmallImageAndText03"><image id="1"
src="ms-appx:///Images/Meetup.png"/><text id="1">New vNext
meetup scheduled!</text></binding></visual></tile>";
status =
Push(pushUri, accessToken, "wns/tile", tileNotification);
//Send Secondary Tile notification
pushUri = "https://db3.notify.windows.com/...";
string secondaryTileNotification = "<?xml version='1.0'
encoding='utf-8'?><tile><visual lang="en-US"><binding
template="TileWidePeekImage05"><image id="1" src="ms-
appx:///Images/Blog.png"/><image id="2" src="ms-
appx:///Images/Avatar.png"/><text id="1">Visit my
blog!</text><text
id="2">http://blogs.microsoft.co.il/blogs/alex_golesh/</text>
</binding></visual></tile>";
status =
Push(pushUri, accessToken, "wns/tile", secondaryTileNotificatio
n);
•
    •

•
    •

•
    •

•
    •




        alex@sela.co.il
Windows 8 metro applications

More Related Content

What's hot

Developing application for Windows Phone 7 in TDD
Developing application for Windows Phone 7 in TDDDeveloping application for Windows Phone 7 in TDD
Developing application for Windows Phone 7 in TDDMichele Capra
 
Test and profile your Windows Phone 8 App
Test and profile your Windows Phone 8 AppTest and profile your Windows Phone 8 App
Test and profile your Windows Phone 8 AppMichele Capra
 
Do you know what your drupal is doing? Observe it!
Do you know what your drupal is doing? Observe it!Do you know what your drupal is doing? Observe it!
Do you know what your drupal is doing? Observe it!Luca Lusso
 
201410 2 fiware-orion-contextbroker
201410 2 fiware-orion-contextbroker201410 2 fiware-orion-contextbroker
201410 2 fiware-orion-contextbrokerFIWARE
 
Mail OnLine Android Application at DroidCon - Turin - Italy
Mail OnLine Android Application at DroidCon - Turin - ItalyMail OnLine Android Application at DroidCon - Turin - Italy
Mail OnLine Android Application at DroidCon - Turin - ItalyYahoo
 
Sanjar Akhmedov - Joining Infinity – Windowless Stream Processing with Flink
Sanjar Akhmedov - Joining Infinity – Windowless Stream Processing with FlinkSanjar Akhmedov - Joining Infinity – Windowless Stream Processing with Flink
Sanjar Akhmedov - Joining Infinity – Windowless Stream Processing with FlinkFlink Forward
 
Web Integration Patterns in the Era of HTML5
Web Integration Patterns in the Era of HTML5Web Integration Patterns in the Era of HTML5
Web Integration Patterns in the Era of HTML5johnwilander
 
FIWARE Developers Week_ Introduction to Managing Context Information at Large...
FIWARE Developers Week_ Introduction to Managing Context Information at Large...FIWARE Developers Week_ Introduction to Managing Context Information at Large...
FIWARE Developers Week_ Introduction to Managing Context Information at Large...FIWARE
 
Windows 8 Training Fundamental - 1
Windows 8 Training Fundamental - 1Windows 8 Training Fundamental - 1
Windows 8 Training Fundamental - 1Kevin Octavian
 
Building High Performance and Reliable Windows Phone 8 Apps
Building High Performance and Reliable Windows Phone 8 AppsBuilding High Performance and Reliable Windows Phone 8 Apps
Building High Performance and Reliable Windows Phone 8 AppsMichele Capra
 
Unit Testing at Scale
Unit Testing at ScaleUnit Testing at Scale
Unit Testing at ScaleJan Wloka
 
Taming Core Data by Arek Holko, Macoscope
Taming Core Data by Arek Holko, MacoscopeTaming Core Data by Arek Holko, Macoscope
Taming Core Data by Arek Holko, MacoscopeMacoscope
 
Test-driven Development with AEM
Test-driven Development with AEMTest-driven Development with AEM
Test-driven Development with AEMJan Wloka
 

What's hot (20)

Developing application for Windows Phone 7 in TDD
Developing application for Windows Phone 7 in TDDDeveloping application for Windows Phone 7 in TDD
Developing application for Windows Phone 7 in TDD
 
Test and profile your Windows Phone 8 App
Test and profile your Windows Phone 8 AppTest and profile your Windows Phone 8 App
Test and profile your Windows Phone 8 App
 
Url programming
Url programmingUrl programming
Url programming
 
Android - Saving data
Android - Saving dataAndroid - Saving data
Android - Saving data
 
Do you know what your drupal is doing? Observe it!
Do you know what your drupal is doing? Observe it!Do you know what your drupal is doing? Observe it!
Do you know what your drupal is doing? Observe it!
 
Backendless apps
Backendless appsBackendless apps
Backendless apps
 
201410 2 fiware-orion-contextbroker
201410 2 fiware-orion-contextbroker201410 2 fiware-orion-contextbroker
201410 2 fiware-orion-contextbroker
 
AJAX
AJAXAJAX
AJAX
 
Mail OnLine Android Application at DroidCon - Turin - Italy
Mail OnLine Android Application at DroidCon - Turin - ItalyMail OnLine Android Application at DroidCon - Turin - Italy
Mail OnLine Android Application at DroidCon - Turin - Italy
 
Javascript 2
Javascript 2Javascript 2
Javascript 2
 
Sanjar Akhmedov - Joining Infinity – Windowless Stream Processing with Flink
Sanjar Akhmedov - Joining Infinity – Windowless Stream Processing with FlinkSanjar Akhmedov - Joining Infinity – Windowless Stream Processing with Flink
Sanjar Akhmedov - Joining Infinity – Windowless Stream Processing with Flink
 
Web Integration Patterns in the Era of HTML5
Web Integration Patterns in the Era of HTML5Web Integration Patterns in the Era of HTML5
Web Integration Patterns in the Era of HTML5
 
FIWARE Developers Week_ Introduction to Managing Context Information at Large...
FIWARE Developers Week_ Introduction to Managing Context Information at Large...FIWARE Developers Week_ Introduction to Managing Context Information at Large...
FIWARE Developers Week_ Introduction to Managing Context Information at Large...
 
Windows 8 Training Fundamental - 1
Windows 8 Training Fundamental - 1Windows 8 Training Fundamental - 1
Windows 8 Training Fundamental - 1
 
Building High Performance and Reliable Windows Phone 8 Apps
Building High Performance and Reliable Windows Phone 8 AppsBuilding High Performance and Reliable Windows Phone 8 Apps
Building High Performance and Reliable Windows Phone 8 Apps
 
Unit Testing at Scale
Unit Testing at ScaleUnit Testing at Scale
Unit Testing at Scale
 
Taming Core Data by Arek Holko, Macoscope
Taming Core Data by Arek Holko, MacoscopeTaming Core Data by Arek Holko, Macoscope
Taming Core Data by Arek Holko, Macoscope
 
Test-driven Development with AEM
Test-driven Development with AEMTest-driven Development with AEM
Test-driven Development with AEM
 
Parse Advanced
Parse AdvancedParse Advanced
Parse Advanced
 
Intro to Parse
Intro to ParseIntro to Parse
Intro to Parse
 

Viewers also liked

hipervinculos
hipervinculoshipervinculos
hipervinculospmblack
 
Andamio de computadora
Andamio de computadoraAndamio de computadora
Andamio de computadorapmblack
 
Habilidades matematicas
Habilidades matematicasHabilidades matematicas
Habilidades matematicasanahigbh
 
Quick Service Restaurant Insights
Quick Service Restaurant InsightsQuick Service Restaurant Insights
Quick Service Restaurant Insightsevolve24
 

Viewers also liked (6)

hipervinculos
hipervinculoshipervinculos
hipervinculos
 
Andamio de computadora
Andamio de computadoraAndamio de computadora
Andamio de computadora
 
Habilidades matematicas
Habilidades matematicasHabilidades matematicas
Habilidades matematicas
 
Quick Service Restaurant Insights
Quick Service Restaurant InsightsQuick Service Restaurant Insights
Quick Service Restaurant Insights
 
Teamwork agile way
Teamwork agile wayTeamwork agile way
Teamwork agile way
 
Multitasking
MultitaskingMultitasking
Multitasking
 

Similar to Windows 8 metro applications

13 networking, mobile services, and authentication
13   networking, mobile services, and authentication13   networking, mobile services, and authentication
13 networking, mobile services, and authenticationWindowsPhoneRocks
 
jQuery - Chapter 5 - Ajax
jQuery - Chapter 5 -  AjaxjQuery - Chapter 5 -  Ajax
jQuery - Chapter 5 - AjaxWebStackAcademy
 
Developing your first application using FIWARE
Developing your first application using FIWAREDeveloping your first application using FIWARE
Developing your first application using FIWAREFIWARE
 
Building the an End-to-End ASP.NET MVC 4, Entity Framework, HTML5, jQuery app...
Building the an End-to-End ASP.NET MVC 4, Entity Framework, HTML5, jQuery app...Building the an End-to-End ASP.NET MVC 4, Entity Framework, HTML5, jQuery app...
Building the an End-to-End ASP.NET MVC 4, Entity Framework, HTML5, jQuery app...Dan Wahlin
 
Mobile Software Engineering Crash Course - C06 WindowsPhone
Mobile Software Engineering Crash Course - C06 WindowsPhoneMobile Software Engineering Crash Course - C06 WindowsPhone
Mobile Software Engineering Crash Course - C06 WindowsPhoneMohammad Shaker
 
比XML更好用的Java Annotation
比XML更好用的Java Annotation比XML更好用的Java Annotation
比XML更好用的Java Annotationjavatwo2011
 
Wonderful csom sps barcelona
Wonderful csom sps barcelonaWonderful csom sps barcelona
Wonderful csom sps barcelonaSonja Madsen
 
Whats New for WPF in .NET 4.5
Whats New for WPF in .NET 4.5Whats New for WPF in .NET 4.5
Whats New for WPF in .NET 4.5Rainer Stropek
 
Streaming twitter data using kafka
Streaming twitter data using kafkaStreaming twitter data using kafka
Streaming twitter data using kafkaKiran Krishna
 
Simpan data- ke- database
Simpan data- ke- databaseSimpan data- ke- database
Simpan data- ke- databaseTri Sugihartono
 
HTML5 & The Open Web - at Nackademin
HTML5 & The Open Web -  at NackademinHTML5 & The Open Web -  at Nackademin
HTML5 & The Open Web - at NackademinRobert Nyman
 
Bigger Stronger Faster
Bigger Stronger FasterBigger Stronger Faster
Bigger Stronger FasterChris Love
 
Developing your first application using FI-WARE
Developing your first application using FI-WAREDeveloping your first application using FI-WARE
Developing your first application using FI-WAREFermin Galan
 
Speed up your Web applications with HTML5 WebSockets
Speed up your Web applications with HTML5 WebSocketsSpeed up your Web applications with HTML5 WebSockets
Speed up your Web applications with HTML5 WebSocketsYakov Fain
 
Retrofit Web Forms with MVC & T4
Retrofit Web Forms with MVC & T4Retrofit Web Forms with MVC & T4
Retrofit Web Forms with MVC & T4soelinn
 
Multi Client Development with Spring
Multi Client Development with SpringMulti Client Development with Spring
Multi Client Development with SpringJoshua Long
 

Similar to Windows 8 metro applications (20)

13 networking, mobile services, and authentication
13   networking, mobile services, and authentication13   networking, mobile services, and authentication
13 networking, mobile services, and authentication
 
jQuery - Chapter 5 - Ajax
jQuery - Chapter 5 -  AjaxjQuery - Chapter 5 -  Ajax
jQuery - Chapter 5 - Ajax
 
Developing your first application using FIWARE
Developing your first application using FIWAREDeveloping your first application using FIWARE
Developing your first application using FIWARE
 
Building the an End-to-End ASP.NET MVC 4, Entity Framework, HTML5, jQuery app...
Building the an End-to-End ASP.NET MVC 4, Entity Framework, HTML5, jQuery app...Building the an End-to-End ASP.NET MVC 4, Entity Framework, HTML5, jQuery app...
Building the an End-to-End ASP.NET MVC 4, Entity Framework, HTML5, jQuery app...
 
Mobile Software Engineering Crash Course - C06 WindowsPhone
Mobile Software Engineering Crash Course - C06 WindowsPhoneMobile Software Engineering Crash Course - C06 WindowsPhone
Mobile Software Engineering Crash Course - C06 WindowsPhone
 
比XML更好用的Java Annotation
比XML更好用的Java Annotation比XML更好用的Java Annotation
比XML更好用的Java Annotation
 
Ajax
AjaxAjax
Ajax
 
AJAX
AJAXAJAX
AJAX
 
Ajax Lecture Notes
Ajax Lecture NotesAjax Lecture Notes
Ajax Lecture Notes
 
Wonderful csom sps barcelona
Wonderful csom sps barcelonaWonderful csom sps barcelona
Wonderful csom sps barcelona
 
Whats New for WPF in .NET 4.5
Whats New for WPF in .NET 4.5Whats New for WPF in .NET 4.5
Whats New for WPF in .NET 4.5
 
Streaming twitter data using kafka
Streaming twitter data using kafkaStreaming twitter data using kafka
Streaming twitter data using kafka
 
Simpan data- ke- database
Simpan data- ke- databaseSimpan data- ke- database
Simpan data- ke- database
 
HTML5 & The Open Web - at Nackademin
HTML5 & The Open Web -  at NackademinHTML5 & The Open Web -  at Nackademin
HTML5 & The Open Web - at Nackademin
 
Bigger Stronger Faster
Bigger Stronger FasterBigger Stronger Faster
Bigger Stronger Faster
 
Developing your first application using FI-WARE
Developing your first application using FI-WAREDeveloping your first application using FI-WARE
Developing your first application using FI-WARE
 
Speed up your Web applications with HTML5 WebSockets
Speed up your Web applications with HTML5 WebSocketsSpeed up your Web applications with HTML5 WebSockets
Speed up your Web applications with HTML5 WebSockets
 
Pushing the Web: Interesting things to Know
Pushing the Web: Interesting things to KnowPushing the Web: Interesting things to Know
Pushing the Web: Interesting things to Know
 
Retrofit Web Forms with MVC & T4
Retrofit Web Forms with MVC & T4Retrofit Web Forms with MVC & T4
Retrofit Web Forms with MVC & T4
 
Multi Client Development with Spring
Multi Client Development with SpringMulti Client Development with Spring
Multi Client Development with Spring
 

Recently uploaded

Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesZilliz
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 

Recently uploaded (20)

Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector Databases
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 

Windows 8 metro applications

  • 1.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 9.
  • 10.
  • 11.
  • 12. demo
  • 13. // Application manifest capabilities required to access camera and microphone <Capabilities> <DeviceCapability Name="webcam" /> <DeviceCapability Name="microphone" /> </Capabilities>
  • 14. CameraCaptureUI dialog = new CameraCaptureUI(); Size aspectRatio = new Size(16, 9); dialog.PhotoSettings.CroppedAspectRatio = aspectRatio; StorageFile file = await dialog.CaptureFileAsync(CameraCaptureUIMode.Photo); if (file != null) { BitmapImage bitmapImage = new BitmapImage(); using (IRandomAccessStream fileStream = await file.OpenAsync(Windows.Storage.FileAccessMode.Read)) bitmapImage.SetSource(fileStream); image.Source = bitmapImage; }
  • 15.
  • 16.
  • 17.
  • 18. demo
  • 19. <Capabilities> <Capability Name= "???_Library" /> </Capabilities> StorageFile sampleFile = await KnownFolders.VideosLibrary.GetFileAsync("vNext.txt"); var doc = await XmlDocument.LoadFromFileAsync(sampleFile);
  • 20. demo
  • 21. <Extensions> <Extension Category="windows.shareTarget" Executable="SampleShareTarget.exe" EntryPoint="SampleShareTarget.App"> <ShareTarget> <SupportedFileTypes> <SupportsAnyFileType /> </SupportedFileTypes> <DataFormat>text</DataFormat> <DataFormat>bitmap</DataFormat> <DataFormat>uri</DataFormat> <DataFormat>html</DataFormat> <DataFormat>Valentine-Love-Catcher</DataFormat> </ShareTarget> </Extension> </Extensions>
  • 22. protected override async void OnShareTargetActivated(ShareTargetActivatedEventArgs args) { BlankPage shareTargetPage = new BlankPage(); await shareTargetPage.ActivateAsync(args); }
  • 23. public async Task ActivateAsync(ShareTargetActivatedEventArgs args) { if (args.Kind == ActivationKind.ShareTarget) { shareOperation = args.ShareOperation; txtTitle.Text = shareOperation.Data.Properties.Title; txtDesc.Text = shareOperation.Data.Properties.Description; if (shareOperation.Data.Contains(StandardDataFormats.Text)) { string text = await this.shareOperation.Data.GetTextAsync(); if (text != null) { txtText.Text = text; } } } }
  • 24. DataTransferManager DataTransferManager new Data TransferManager DataRequestedEventArgs //[OPTIONALLY] If application makes distinction between target applications, subscribe to this event //[OPTIONALLY] Force showing share UI DataTransferManager
  • 25. private async void DataTransferManager DataRequestedEventArgs "Sample share source app" "Spread the word about this lovely application" RandomAccessStreamReference new Uri "ms- appx:///Images/Love.png" "Sample text" RandomAccessStreamReference new Uri "ms- appx:///Images/test.png"
  • 26.
  • 27.
  • 28.
  • 29.
  • 30.
  • 31. Capabilities Seamless Performant driven data access High isolation Data Native Roaming platform
  • 32.
  • 33.
  • 34.
  • 35.
  • 36.
  • 37.
  • 38.
  • 39.
  • 40.
  • 41. demo
  • 42. ITileWideSmallImageAndText03 tileContent = TileContentFactory.CreateTileWideSmallImageAndText03(); tileContent.TextBodyWrap.Text = "Main tile updated from application!"; tileContent.Image.Src = "ms-appx:///Images/Bouquet.png"; tileContent.RequireSquareContent = false; TileUpdateManager.CreateTileUpdaterForApplication().Update( tileContent.CreateNotification());
  • 43. IToastImageAndText02 templateContent = ToastContentFactory.CreateToastImageAndText02(); templateContent.TextHeading.Text = "Toast sample"; templateContent.TextBodyWrap.Text = "Toast message from application!"; templateContent.Image.Src = "Images/NewYear.png"; templateContent.Image.Alt = "Placeholder image"; IToastNotificationContent toastContent = templateContent; ToastNotification toast = toastContent.CreateNotification(); ToastNotificationManager.CreateToastNotifier().Show(toast);
  • 44. BadgeNumericNotificationContent badgeContent = new BadgeNumericNotificationContent(); badgeContent.Number = 23; BadgeUpdateManager.CreateBadgeUpdaterForApplication().Update( badgeContent.CreateNotification());
  • 45. Uri logo = new Uri("ms-appx:///images/LoveIcon.png"); Uri wideLogo = new Uri("ms-appx:///images/WideSecondary.png"); SecondaryTile secondaryTile = new SecondaryTile("LiveTilesAndToastsSample.SecondaryTile", "Secondary tile", "Secondary tile from app", "argumets=Alex,123", TileOptions.ShowNameOnWideLogo | TileOptions.ShowNameOnLogo, logo, wideLogo); bool isPinned = await secondaryTile.RequestCreateForSelectionAsync( new Rect(10,10,100,100));
  • 46. ITileWideSmallImageAndText03 tileContent = TileContentFactory.CreateTileWideSmallImageAndText03(); tileContent.TextBodyWrap.Text = "Secondary tile updated from application!"; tileContent.Image.Src = "ms-appx:///Images/NewYear.png"; tileContent.RequireSquareContent = false; TileUpdateManager.CreateTileUpdaterForSecondaryTile( "LiveTilesAndToastsSample.SecondaryTile").Update( tileContent.CreateNotification());
  • 47.
  • 48.
  • 49. 1. Request Channel URI 2. Register with your Cloud Service 3. Authenticate & Push Notification
  • 50. demo
  • 51. var pushNotificationChannel = await PushNotificationChannelManager.CreatePushNotificationChannelFor ApplicationAsync(); var channelUri = pushNotificationChannel.Uri; //Optional channel for Secondary tile if (SecondaryTile.Exists(SecondaryTileID)) { var secondaryPushNotificationChannel = await PushNotificationChannelManager.CreatePushNotificationChannelFor SecondaryTileAsync(SecondaryTileID); var secondaryChannelUri = secondaryPushNotificationChannel.Uri; }
  • 52. private static Stream GetAccessToken(string sid, string secret) { string url = "https://login.live.com/accesstoken.srf"; var request = (HttpWebRequest)WebRequest.Create(url); request.Method = "POST"; request.ContentType = "application/x-www-form-urlencoded"; string content = "grant_type=client_credentials&client_id={0}&client_secret={1}& scope=notify.windows.com"; string data = string.Format(content, sid, secret); byte[] notificationMessage = Encoding.Default.GetBytes(data);
  • 53. request.ContentLength = notificationMessage.Length; using (Stream requestStream = request.GetRequestStream()) requestStream.Write(notificationMessage, 0, notificationMessage.Length); var response = (HttpWebResponse)request.GetResponse(); Stream result = response.GetResponseStream(); return result; }
  • 54. private static HttpStatusCode Push(string pushUri, string accessToken, string type, string notificationData) { var subscriptionUri = new Uri(pushUri); var request = (HttpWebRequest)WebRequest.Create(subscriptionUri); request.Method = "POST"; request.ContentType = "text/xml"; request.Headers = new WebHeaderCollection(); request.Headers.Add("X-WNS-Type", type); request.Headers.Add("Authorization", "Bearer " + accessToken);
  • 55. byte[] notificationMessage = Encoding.Default.GetBytes(notificationData); request.ContentLength = notificationMessage.Length; using (Stream requestStream = request.GetRequestStream()) requestStream.Write(notificationMessage, 0, notificationMessage.Length); var response = (HttpWebResponse)request.GetResponse(); return response.StatusCode; }
  • 56. string pushUri = "https://db3.notify.windows.com/..."; string secret = HttpUtility.UrlEncode("2A..."); string sid = HttpUtility.UrlEncode("ms-app://s-..."); var obj = System.Json.JsonObject.Load(GetAccessToken(sid, secret)); string accessToken = obj["access_token"].ToString(); //Send Badge notification string badgeNotification = "<?xml version='1.0' encoding='utf- 8'?><badge value="13"/>"; HttpStatusCode status = Push(pushUri, accessToken, "wns/badge", badgeNotification);
  • 57. //Send Toast notification string tostNotification = "<?xml version='1.0' encoding='utf- 8'?><toast><visual><binding template="ToastImageAndText02"><image id="1" src="Assets/Logo.png" alt="Placeholder image"/><text id="1">Urgent news</text><text id="2">New vNext meetup scheduled!</text></binding></visual></toast>"; status = Push(pushUri, accessToken, "wns/toast", tostNotification);
  • 58. //Send Tile notification string tileNotification = "<?xml version='1.0' encoding='utf- 8'?><tile><visual><binding template="TileWideSmallImageAndText03"><image id="1" src="ms-appx:///Images/Meetup.png"/><text id="1">New vNext meetup scheduled!</text></binding></visual></tile>"; status = Push(pushUri, accessToken, "wns/tile", tileNotification);
  • 59. //Send Secondary Tile notification pushUri = "https://db3.notify.windows.com/..."; string secondaryTileNotification = "<?xml version='1.0' encoding='utf-8'?><tile><visual lang="en-US"><binding template="TileWidePeekImage05"><image id="1" src="ms- appx:///Images/Blog.png"/><image id="2" src="ms- appx:///Images/Avatar.png"/><text id="1">Visit my blog!</text><text id="2">http://blogs.microsoft.co.il/blogs/alex_golesh/</text> </binding></visual></tile>"; status = Push(pushUri, accessToken, "wns/tile", secondaryTileNotificatio n);
  • 60.
  • 61.
  • 62.
  • 63. • • • • • • • alex@sela.co.il

Editor's Notes

  1. This slide is hidden.. Do start with a demo of Windows 8, but don’t show the slide. Demonstrate mostly the Windows Start Menu ( aka the shell ). Make sure you use touch … Highlight the following points Windows 8 Experience  Full screen apps Live tiles  Alive and in motion  Action: Drag &amp; rearrange tiles  Semantic  Zoom in Start Menu Search  Personalize Windows  Swap across process Pin an app  Charms   
  2. Create a Camera Capture UI demo. Seamless integration with devices and OS resources.
  3. Installation process:From the store, you will trigger an install.. This pulls the bytes from the cloud, validates it, and installs it.. Installation is per user.. [windows traditionally has been per machine].. Behind the scenes, we have a single instance store.. So the apps are installed once.. The registration is per user.. Extension handlers.. System handles setup and uninstall automatically – allows us to guarantee that installed app will not be making permanent changes – nothing left after uninstall.Download app package (zip) goes to package manager
  4. The app package (Appx) is abb OPC file ( a zip) The package It includes anything necessary to deploy or uninstall – It includes capabilities and declartions so we know the impact in the system. In the package you will see JS files etc. If in C++ see .dll files and what you would expect. Blockmap is a series of hashes for each block in your package. Combination of signature + blockmap verifies the package.. It can be validated as it comes off-the wire… we don’t have to download the whole thing..
  5. Talking about appdata specifically, will talk about user data later when we look at skydrive, etc.Slide 8 from PLAT-475T
  6. Key, app does not have to do much – whole infrastructure built for you.Writes local and system takes care of the rest – some limitations, we will cover later.Slide 8 from PLAT-475T