A lap around the Windows Phone 8.1 development platform
This is a modal window.
The media could not be loaded, either because the server or network failed or because the format is not supported.
Formal Metadata
Title |
| |
Title of Series | ||
Number of Parts | 170 | |
Author | ||
License | CC Attribution - NonCommercial - ShareAlike 3.0 Unported: You are free to use, adapt and copy, distribute and transmit the work or content in adapted or unchanged form for any legal and non-commercial purpose as long as the work is attributed to the author in the manner specified by the author or licensor and the work or content is shared also in adapted form only under the conditions of this | |
Identifiers | 10.5446/50784 (DOI) | |
Publisher | ||
Release Date | ||
Language |
Content Metadata
Subject Area | ||
Genre | ||
Abstract |
|
00:00
InformationApproximationVideoconferencingHydraulic jumpSample (statistics)CodeBuildingMobile appComputing platformSoftware developerData modelFile formatDistribution (mathematics)GUI widgetImage registrationService (economics)BackupIdentity managementCore dumpKernel (computing)Asynchronous Transfer ModeDevice driverFocus (optics)Windows PhoneTask (computing)Scheduling (computing)WindowRight angleData storage deviceImage registrationDifferent (Kate Ryan album)Medical imagingBitMobile appElement (mathematics)Template (C++)QuicksortGoodness of fitService (economics)Universe (mathematics)Point (geometry)Multiplication signComputing platformLevel (video gaming)Self-organizationWeb browserInternetworkingMobile WebVirtualizationMixed realityVideo gameRevision controlSemiconductor memoryGreatest elementSampling (statistics)Endliche ModelltheorieSoftwarePhysical systemModule (mathematics)TesselationForm (programming)Distribution (mathematics)Game controllerMemory managementOperating systemSoftware developerComputing platformNamespaceKey (cryptography)Tablet computerShift operatorOptical disc driveUniform resource locatorWeb portalVideoconferencingHydraulic jumpBuildingCodeCivil engineeringView (database)Identity managementWeb 2.0Group actionReal numberBackupRun time (program lifecycle phase)CASE <Informatik>NP-hardKernel (computing)Data structureStructural loadContent (media)Demo (music)Computer animation
06:41
Windows PhoneInformation securityIdentity managementKernel (computing)Asynchronous Transfer ModeDevice driverSoftware developerComputing platformPartial derivativePhysical systemFocus (optics)CodeImage registrationCore dumpTask (computing)Scheduling (computing)Mobile appLatent heatInclusion mapComputing platformService (economics)Directed setRun time (program lifecycle phase)WeightData modelPurchasingComputer fileWhiteboardSubsetGoodness of fitWindowMobile appGame theoryComputing platformDifferent (Kate Ryan album)Software developerComputer configurationBitRun time (program lifecycle phase)Order (biology)Tablet computerWordVisualization (computer graphics)CodeProgramming paradigmWeb browserBlock diagramSemiconductor memoryKernel (computing)Operating systemFile systemCore dumpStructural loadPlug-in (computing)Service (economics)CuboidState observerQuicksortModule (mathematics)SoftwareShift operatorClosed setCASE <Informatik>Computing platformPay televisionNumberAddress spaceFreewareWeb 2.0Middleware19 (number)Point (geometry)Coma BerenicesProduct (business)Data storage deviceSampling (statistics)Multiplication signConditional-access module1 (number)Physical systemJava appletScripting languageMappingServer (computing)Software bugRight angleSound effectDirection (geometry)DataflowOperator (mathematics)Computer animation
13:22
Dynamic random-access memoryBitArtificial neural networkComputing platformInformationWeb pageExecution unitProgrammable read-only memoryTwin primeWindowWechselseitige InformationComputer wormPhysical systemSpacetimeLatent heatDefault (computer science)View (database)Social classShared memoryMenu (computing)FlickrScale (map)EmailVisual systemDigital photographyString (computer science)Server (computing)Fluid staticsDependent and independent variablesContent (media)Element (mathematics)BefehlsprozessorSynchronizationClient (computing)Electronic mailing listSoftware testingSystem callDeterminismSource codeCartesian coordinate systemTap (transformer)Clique-widthHorizonComputer-generated imageryKeyboard shortcutComputer fileSummierbarkeitPoint (geometry)Social classDrop (liquid)Web pageExpressionDisk read-and-write headShared memoryData structureAdditionMoment (mathematics)Functional (mathematics)Computer fileMedical imagingTemplate (C++)WindowStructural loadDigital photographySpacetimeMultiplication signBitMathematicsView (database)Electronic visual displayFlickrDirected graphMobile appAreaSystem callClient (computing)GradientTerm (mathematics)ResultantRight angleComputer clusterRow (database)Projective planeGrand Unified TheoryCodeTesselationPixelTouchscreenObject (grammar)Universe (mathematics)Student's t-test1 (number)Data storage deviceQuicksortVisualization (computer graphics)Square numberUtility softwareComputer-assisted translationRevision controlMultilaterationCategory of beingBlock (periodic table)C sharpComputer animation
20:50
Insertion lossCore dumpMaxima and minimaUser interfaceConvex hullMultiplication signLatin squareMathematicsWindowResultantContext awarenessMobile appRight angleStructural loadWeb pageSocial classVisualization (computer graphics)Medical imagingDigital photographyTouchscreenLogicBitComputer animation
22:27
Partial derivativeWeb pageOvalFlickrSoftware testingWindowString (computer science)Optical disc driveDigital photographyLogicTemplate (C++)Context awarenessMoment (mathematics)ResultantFlickrTesselationQuicksortWeb pageDemo (music)Term (mathematics)Interpreter (computing)Computer animationPanel painting
23:32
Software bugWindowSoftware testingString (computer science)OvalEmailWeb pageSocial classBefehlsprozessorSource codeComputer-generated imageryWindowRight angleShape (magazine)Group actionShared memoryWeb pageCASE <Informatik>Disk read-and-write headSampling (statistics)Content (media)Bit40 (number)Revision controlMultiplication signGoodness of fitBuildingMoment (mathematics)Computer animation
25:05
FlickrLie groupTwin primeComputer-generated imagerySource codeWindowBitBefehlsprozessorBuildingEngineering physicsFrame problemWeb pageComputer configurationEmailElectronic visual displayComputer hardwareEvent horizonoutputWindows PhoneDrum memorySummierbarkeitExecution unitSoftware testingNormed vector spaceSpacetimePartial derivativeOvalString (computer science)NP-hardSynchronizationContent (media)Independent set (graph theory)Hand fanMaxima and minimaEmulatorSocial classComputer fileMarginal distributionFlagRight angleResultantLine (geometry)Greatest elementMultiplication signMobile appCodeFocus (optics)WindowDifferent (Kate Ryan album)LogicQuicksortPhysicalismInstance (computer science)Point (geometry)Web pageMedical imagingMultiplicationTesselationMoment (mathematics)Visualization (computer graphics)BitMessage passingGodLie groupView (database)Template (C++)Constructor (object-oriented programming)Partial derivativeShared memoryPersonal identification numberBootingKey (cryptography)FlickrComputer animation
30:30
Optical disc driveOvalSynchronizationPetri netWindowSoftware testingEmailAsynchronous Transfer ModeArtificial neural networkState of matterGame theoryView (database)Medical imagingClosed setSet (mathematics)Template (C++)CodeOffice suite2 (number)Computer animationPanel painting
31:24
Directed graphEmailDuality (mathematics)Artificial neural networkBuildingWindows PhoneDemo (music)Data modelBridging (networking)Scale (map)Read-only memoryMobile appAerodynamicsEstimationPhysical systemMultiplication signMobile appPoint (geometry)Endliche ModelltheorieBitSet (mathematics)1 (number)Semiconductor memoryState of matterResultantBackupBuffer solutionSpherical capPhysical systemWindowStatisticsInheritance (object-oriented programming)Cache (computing)Tablet computerMassTouchscreenGroup actionShared memoryCartesian coordinate systemAnalytic setError messageView (database)Operational amplifierSpacetimeAbsolute valueComputer animation
37:45
Scale (map)Mobile appBroadcast programmingSystem of linear equationsCartesian coordinate systemTask (computing)Computer configurationCodeComputer multitaskingMobile appWindowWeb pageDampingConsistencyComputer programmingBitElectronic signatureMedical imagingSpherical capRevision controlDifferent (Kate Ryan album)Physical systemMultiplication signTesselationFrequencyOrder (biology)Data storage deviceMathematicsSemiconductor memoryData conversionSlide rule2 (number)Android (robot)BootingStructural loadRun time (program lifecycle phase)Ferry CorstenClosed setDecision theoryService (economics)PlanningPublic key certificateLatent heatPoint (geometry)Menu (computing)Real numberAmsterdam Ordnance DatumNatural numberSoftware developerUniform resource locatorTouchscreenLevel (video gaming)Moment (mathematics)FacebookVideo gameComputer animation
44:03
Mobile appBroadcast programmingTask (computing)Process (computing)Constructor (object-oriented programming)RadiusLimit (category theory)Mobile appLevel (video gaming)InformationGoodness of fitScheduling (computing)Task (computing)Point cloudComputer hardware1 (number)Tap (transformer)Group actionGame controllerMereologyBit rateOperator (mathematics)Message passingPlastikkarteWindowLatent heatService (economics)Event horizonFront and back endsRaw image formatMobile WebSoftwareInternet der DingeDemo (music)CodeRadiusTesselationMultiplication signTheory of relativityPoint (geometry)Different (Kate Ryan album)WeightBitView (database)AreaInternetworkingFood energyComputer animation
50:13
WindowDirected setComputer iconView (database)Web pageNormal (geometry)OvalString (computer science)BitSoftware testingEmailSynchronizationRoutingModemCircleNormed vector spaceShape (magazine)Data conversionSystem callLinear mapMaxima and minimaTwin primeAsynchronous Transfer ModeProgrammable read-only memoryCodeThread (computing)Direction (geometry)TrailMobile appWorkstation <Musikinstrument>Level (video gaming)Task (computing)Position operatorComputer simulationWindowData conversionSampling (statistics)MathematicsUniform resource locatorPoint (geometry)Amsterdam Ordnance DatumTowerRoutingLine (geometry)Computer iconLimit (category theory)Profil (magazine)GeometrySpeech synthesisPlanningLaptopStructural loadAreaEvent horizonElectronic mailing listQuicksortRoundness (object)Zoom lensComputer fileRootComputer animation
54:40
Service (economics)BenachrichtigungsdienstWindows PhoneSingle-precision floating-point formatClient (computing)Musical ensembleMathematicsVisualization (computer graphics)Latent heatInformationGroup actionMechanism designTemplate (C++)File formatData storage deviceMobile appVideoconferencingPlastikkarteDefault (computer science)Installation artBackupTouchscreenEnterprise architectureDistribution (mathematics)Sign (mathematics)Data managementServer (computing)WebsiteEmailImage resolutionFamilyMobile appDifferent (Kate Ryan album)Enterprise architectureWindowComputing platformData managementTablet computerService (economics)Task (computing)Exterior algebraSoftware developerMathematicsShift operatorTranslation (relic)Forcing (mathematics)PlastikkartePhysical systemSemiconductor memoryInformation securityTouchscreenLocal ringGroup actionWater vaporTemplate (C++)Data storage deviceRevision controlPoint (geometry)InformationElectronic mailing listMechanism designFile formatScaling (geometry)Covering spaceNetwork topologyPerspective (visual)Line (geometry)TunisObject (grammar)Mobile WebPublic key certificate1 (number)Form (programming)Matching (graph theory)BitShooting methodEmailSign (mathematics)Visualization (computer graphics)TesselationAdaptive behaviorBackupDemo (music)Formal languageInstallation artComputer fileComputer animation
59:43
Sign (mathematics)Enterprise architecturePlastikkarteServer (computing)Data managementWebsiteEmailDistribution (mathematics)Mobile appComputer programmingData modelContent (media)Scale (map)Software development kitComputer iconSoftware bugInstallable File SystemInternet forumMarkup languageWindowGastropod shellGamma functionComputer configurationBuildingBefehlsprozessorConvex hullWeb pageMIDIExecution unitMaxima and minimaProgrammable read-only memoryMeta elementSoftware testingForm (programming)ThumbnailThomas KuhnRadiusOnline helpTime domainModal logicNormed vector spacePerpetual motionPartial derivativeUniform resource locatorOvalSynchronizationComputer-generated imageryBitElectronic visual displayInformation privacySpacetimeSystem callSystem callCartesian coordinate systemDesign by contractWindowShared memoryRun time (program lifecycle phase)Demo (music)Content (media)Revision controlWeb pageUniform resource locatorMobile appExistential quantificationComplete metric spaceCodeProjective planeMultiplication signOrder (biology)BitHydraulic jumpFunctional (mathematics)Point (geometry)Right angleComputing platformSoftware development kitService (economics)Group actionComputer animation
01:04:45
Software testingOvalEvent horizonNavigationBackupMobile appComputer configurationCodeStructural loadShared memoryComputing platformMobile appCartesian coordinate systemGoodness of fitGroup actionBit rateInternet forumComputer animation
Transcript: English(auto-generated)
00:01
All right. Good. Right, welcome. Thanks very much for coming along to this talk. I'm Andy Wigley. I work out of the UK. I'm a technical evangelist. I do a lot of work with the Windows Phone team. And I'm most well known for the Jumpstart videos.
00:21
We've got a whole new set out that we recorded last month. So the Building Apps for Windows Phone 8.1 Jumpstart, out on that short URI. It's out on Channel 9. There's also a Microsoft Virtual Academy course version of it. If you prefer to do your learning in a more structured way. In case you're interested, that's what the studio looks like. That's in Redmond Town Center. So there's me and Matthias Shapiro behind the desks there.
00:44
And then you've got all this kind of high-tech stuff at the background. A guy on the right answering questions. And a guy at the back doing all the mixing and cutting between. We've got three cameras, one at the center on both of us. And then one for each of the speakers. It's a lot of fun. But, well, intense session, as it says in the comments there.
01:02
It certainly were intense. It's like two and a half days live to camera. So I'm still kind of recovering after all that. But it's good fun. Loads of content. Now, what this session is, is about the new Windows Phone 8.1 platform. It's about the underlying principles of how it works, why it does.
01:20
And what it is we've given you. So it's pretty high level. After lunch, I hope some of you will be able to come back. I'm going to do a real deep dive into building universal apps with kind of real techniques. And these are the problems. This works. And this is how you should organize your code and make the most of it. So I'm going to do a quick demo of that in this. So those of you who don't want to come back after lunch, you'll get a flavor for universal apps.
01:41
Because the big goal of Windows Phone 8.1 was this, well, yeah, enabling great apps. We want to kind of catch up with the opposition and also exceed them in good many places as well. So there's a whole pack of new APIs to help you build great apps for Windows Phone 8.1. But yeah, the big deal was this platform convergence.
02:01
This is about bringing Windows 8.1 and Windows Phone 8.1 together. So we can now very easily create apps. Very easily? Easily create apps that will run on both platforms. And yeah, improving all the capabilities. So we're fixing all the missing bits from the previous release. And hopefully give you all that you need to create great apps.
02:22
So yeah, it was this one Windows. This is this one Microsoft thing in action. Delivering the shared developer platform, which is shared from top to bottom. So we've now got Windows XAML, same XAML on both. So in Windows Phone 8, we had XAML.
02:41
And on, obviously, Windows 8.1 store, we've got XAML. They're actually kind of different, XAML. They're very close. The tags are all the same and the elements do the same and this kind of thing. And you work on data templates. So the techniques are the same. But they were different namespaces, slightly different capabilities. It did mean that if you were trying to do... Has anybody tried to build a sort of what we now call a universal app for Windows Phone 8 and Windows 8.1?
03:07
Anybody here tried that? Nobody has. Okay, well, it's good because it's kind of painful. You can do it, but you kind of have to have everything very well organized. And the XAML flavors, like I said, were kind of the same, but different enough just to be annoying.
03:20
So if you're copying XAML from one to the other, it was kind of hard. But we've now got unified XAML. We've got the Windows Runtime runs right across both of these platforms now. It's all the same thing. The app model, by that I mean the way the apps behave, the way they get launched and activated, and the memory management and the suspend and resume kind of stuff.
03:42
That's all the same. Live tiles and the notification system, all the same. The distribution format, the way you package up your apps is now the same. And we've got the converged controls and performance. So the Windows XAML actually is much more performant than the old Windows Phone Silverlight XAML.
04:02
And accompanying that, not only the dev platform bits, but the app services as well. All the other bits and pieces that you need to make a successful mobile app today. First of all, starting with the developer store registration. You sign up now to be a Windows Phone developer. You are a Windows Store app developer as well. You don't have to pay or register twice over.
04:21
There's still two portals. We've still got some work to do to really bring it all to one location on the web. But the developer registration is the same. WNS is the push notifications infrastructure. That's unified now and is used for all Windows Phone 8.1 and Windows 8.1 devices.
04:41
And we've got cute stuff like data roaming and backup. I'll leave that and talk about that. I've got to slide a bit more about that further on. Because that's a really nice feature that helps you to create nice unified experiences that flow across devices. We've also got the shared app identities and entitlement. What that means is that you as a developer could ship a Windows Phone version of your app and a Windows Store version of your app.
05:06
And if you choose to allow the user to have the shared entitlement, it means they buy the app on one platform. They automatically get usage rights on the other as well. So they pay for it once and they can install it across all their devices.
05:20
And that's enabled by this thing called shared app identities. Which is a fancy name but basically means they have the same name when you reserve the name in the store. And this convergence is not something we just kind of thought up yesterday. It's actually been going on for quite a while. It started back with Windows Phone 7.5. Actually those of us with longer memories would argue it actually started with Windows Mobile 6.
05:45
Go back to Windows Mobile 6 and we actually had an Internet Explorer browser on Windows Mobile and on Windows 7 or whatever it was at that time. It was the same code base. So the Internet Explorer team were already working from one code base and producing browsers for the different platforms.
06:03
But that was revisited again and that's certainly with what we code named Mango at the time, Windows Phone 7.5. That was the key thing around IE 9 was the same on both platforms. When we got to Windows Phone 8, there wasn't so much shift from a developer point of view.
06:22
But really what we did was we sorted out the foundations and we fixed the underlying structure that the whole phone and the tablets all run on top of. What you get with Windows Phone 8 is the Windows NT kernel. Now throughout the old operating system with Windows Phone 7, we brought in the
06:42
Windows NT kernel, the same OS kernel at a low level, not top to bottom. OS is a complicated thing with loads of bits in it. But the kernel and a lot of the modules like networking and file system and all that sort of thing, it's all the same. So we were kind of already unifying the operating systems with Windows Phone 8. And we started the work of converging the developer APIs and that was most obvious for gamers.
07:04
So DirectX, Direct3D gamers, it was pretty easy to port an app from Windows to Windows Phone and vice versa. For XAML-based developers, there were some bits and pieces that we brought in that were converged. A few little bits, in-app purchase was the same, sensors were the same, there
07:22
was a subset of the windows.storage for working with files and folders was the same. But not really very much across the board. So then we get to Windows Phone 8.1, which the first phones are now starting to be sold out into the marketplace which have got 8.1 on them. And we released it at, we released the dev platform at Build, which was, what was that, six weeks, eight weeks ago?
07:45
Seems like an age, but time, these things move so fast. And you can get a Phone 8.1 on your phone now. Has anybody put 8.1 onto their phone? Good number of you, yeah. So, if you haven't, you can get it today, if you want it. If you've got a Windows Phone 8 device, because all Windows Phone 8 devices can run Phone 8.1 OS.
08:05
There's a special app called the Preview for Developers. If you install that app, and then you need to have a developer account. So you can either register on dev.windowsphone.com for $19 or if you've got an MSDN subscription for free. Or you can sign up at appstudio.microsoft.com, which is a web based thing for creating apps.
08:26
And that's completely for free. So that qualifies you as a developer, because when you run this Preview for Developers app, it will prompt you for your live ID, your Microsoft account credentials. And if it matches up that you are what we consider a developer, then what we, all we do is we shift the,
08:42
we change the address that the phone is looking at, the service it's looking at for updates. And instead of being your mobile operator, it shifts it over to our service. So you'll get the 8.1 update then. And there's already been three kind of updates to the update already. So it's, they've been refining it and fixing bugs in it.
09:00
And it's now getting, it's now ready for going out into the, to be sold out onto real phones out to the marketplace. So yes, the 8.1 brings us this common core platform, loads of stuff. It really is a total alignment from top to bottom. It now is very, very, very close. How close is it? Well, this is the Windows Runtime APIs.
09:22
The big blue one there represents Windows, the Windows Runtime on Windows. And the small red one there is Windows Phone 8. I said that we had a few APIs that were already converged. So that's the, you know, in-app purchase, Windows, the sensors, the windows.storage subset. And that's what it was in 8.0.
09:42
That's what it is now, 8.1. Over 90, 95% of the APIs in the Windows Runtime are exactly the same. There's a few edge cases where they have to be, some, you know, properties aren't observed. Or in a few cases, there's different ways of calling them to account for working on low memory devices like the 512 megaphones.
10:04
But yeah, for the most case, you're working on a completely converged platform, which is fantastic. This is another way of looking at it. This is all the block diagram of the kind of dev platform. The big boxes at the top there, these are your options for writing apps for Windows Phone 8.1.
10:23
So going across from the left, we support WinJS. So if you work with HTML and JavaScript, you'd prefer to work with those. You can create native apps using WinJS. That's now supported on Windows and Windows Phone and, of course, is coming to Xbox. So, and then in the middle, we've got Windows XAML.
10:43
So Windows XAML is the Windows Runtime XAML. This is the flavor of XAML that we've been using on Windows up till now. And that is now the one that's come down to the phone or up to the phone or across the phone, however you want to look at it. And you can write your code for those apps in C Sharp or Visual Basic or C++.
11:01
So those three options. And C++ is brand new for the phone. We had C Sharp and VB before. DirectX, C++, Gamers. Like I said, that was already pretty well converged in Phone 8. But we've had new enhancements and new features come in. So a lot of stuff to help you create even better games. But that's another option for Gamers.
11:21
And then we've got this thing called Silverlight XAML. On the right there, which is the kind of traditional XAML programming model for phone. So there's been a few eyebrows raised when we say this thing's Silverlight. They said, didn't you kill Silverlight? No, we never killed this flavor of Silverlight. So this is not the web browser plug-in.
11:42
This is the technology. Effectively, when we had Silverlight in the browser, you could install a Silverlight app from the browser onto your desktop and run it out of browser. This was the technology that we used in Windows Phone 7 for creating apps. It runs out of browser. Actually, on Windows Phone 7, it never runs in the browser.
12:01
It's just purely for creating native apps on Phone 7. Then when we got to Phone 8, well, we stopped calling it Silverlight XAML. We just wanted to call it Windows XAML. Just as a marketing move, it's XAML across the board. But now, of course, we kind of shot ourselves in the foot a little bit there. Because now we get to Windows Phone 8.1.
12:21
And actually, we've got two flavors of XAML. We've got the Silverlight XAML that you might have been using up till now. And we've got Windows Runtime XAML, which is the same one we've got on the tablet. So in order to stop any confusion, we are calling these two Silverlight XAML and Windows Runtime XAML. So just so you know when we're talking about it, which one we're talking about.
12:41
Because there are subtle differences between the two. This is another way of looking at the same thing. So you can create games with DirectX, DirectX 3D. Although most people use one of the games' middleware platforms like Unity, Havoc, Marmalade, something like that. And then we've got WinJS, if you like HTML and JavaScript.
13:02
A great way of creating native apps as well. And then we've got our two flavors of XAML. Windows Runtime XAML and Windows Phone Silverlight XAML. Alright, that's enough words. I'm going to now build you an app using the Windows Phone 8.1 SDK. I'm going to build a simple universal app. Like I said, I'm going to dig much deeper into this this afternoon.
13:24
So here we are in Visual Studio 2013. The tools, by the way, are free for download. You can download a new Visual Studio 2013 Express Edition for Windows. And that brings you all the tools you need for developing for Windows Phone 8.1 and for Windows Store 8.1.
13:42
Or if you've got an ultimate or professional edition of Visual Studio already installed, this just comes with Update 2. So Update 2 has all this stuff in it. So the question is, if you develop for 8.1, can your app be backwards compatible to run on 8, for example?
14:04
No, that's not. If you go for 8.1, the store will allow you to distribute an 8.0 version of your app and an 8.1. And the end user will get the appropriate version installed onto their device. But in Visual Studio 2013, you can create 8.0 apps and later upgrade them to 8.1.
14:25
Or you can create 8.1 apps right from the get-go. Okay, I'm going to create a new project. We've got this now. I prefer working in C Sharp. We've got this category called Store Apps, which is divided up into Phone Apps, Windows Apps, and Universal Apps.
14:44
And Universal Apps are these new project templates that allow you to easily create one that runs on both. So let's create ourselves, let's go off to C shows NDC 2014.
15:03
And I'm going to call this, it's a little app that's going to go off to Flickr and pull down some, do a search, and it's going to pull down some pictures. So it's called, unsurprisingly, Flickr Search. And this is going to create a solution that has got, well, it's got, we've got over here,
15:28
we've got, the solution has got a Windows project in it, which has got assets and main page. And it's also got a Windows Phone project, Windows Phone 8.1 project in it, which has also got assets and main page in it. And then it's got this thing called Shared Folder.
15:43
It's a shared project, it's not really a shared, it's not really a project actually. What this is, everything that ends up in this shared project actually gets distributed, is duplicated to both of the heads. So you've got a Windows head and a Windows Phone head, and then we've got all the common stuff, which is actually most of it. At the moment, because we've not added any functionality, there's not a huge amount in shared, but
16:03
particularly by the time we get to this afternoon's example, just loads of stuff can go into shared. So that's the kind of project structure. Now I'm going to just add a couple of files I've got, got ready already. So I've got a couple of you, a couple of class, files, classes here.
16:21
I'm going to drop them into the shared. And while we're at it, I'm going to drag and drop assets and drop that into shared. So assets has just got some, I think it's just, yeah, it's just got some standard images, which you can just use for design time to make it look nice when we're in design time. So that's some images, you can have images, you can have code, you can have data files, whatever can go into this shared folder.
16:46
And then while we're at it, let's just get everything else as well. So I've got loads of tile stuff to replace the stock ones. So let's just drag and drop them into there. We're going to replace the standard ones. So that gives us lots of nice, you know, nice artwork and that sort of stuff.
17:04
We'll do the same for the windows one. And then we're pretty much ready to go. Drop that into there as well. So this, like I said, is all the, you know, all the artwork. So we can go into our manifest and we can see the visual assets.
17:28
So this one, we can go off and pick the appropriate image. What was the wide? There we go. And, you know, there's a splash screen image as well, which is just a, you just get the square.
17:42
So let's just make the background of that all white as well. So we should have a nice splash screen. And that's the artwork. Now, what about these? What is in here? This is just a utility class which goes off to Flickr. What it does is, here we go, a method called, a static method called searchAsync.
18:00
And it uses HTTP client to make a call off to Flickr and we will parse the XML that Flickr sends back and we will spit out, project that out to a collection of Flickr photo result objects which we will then use to show the results in our UI.
18:23
And I've got, so I've got the, this is the Flickr photo result which represents a single image coming back from the data for an image coming back from Flickr. And I've also got one called Flickr photo results which is a collection of those things. So that's kind of the guts of this thing. Now I'm going to start building out the UI for this now.
18:43
I'll start with the Windows one. And just blowing up the designer, there we go. I want to put a couple of, this is my main grid. Let's put a couple of rows on our grid. There's the first one and a little bit of a spacer one.
19:00
Let's change that to pixel sized and 100 pixels high. And this one, I also want to be pixel sized and we'll make that 40 pixels high. So there's our basic layout. I'm now going to pull in a little bit of XAML that I have ready
19:23
which is this guy. So all I've done now is put a text block which is my title, Flickr. And we've got a grid view here in this area which is going to show all of the results. With a grid view, you need to give it a data template which says, okay, for each item that you display in this grid,
19:43
what, come on, what, how will it look? It's not behaving, come on. Try that again. Okay, so there's my data template. So this defines the layout for each item.
20:03
So we're going to have a grid with a border inside and inside the border we've got an image and then I've got a stack panel which overlies it which has just got some text over it. Which, I mean, I can tell you that but actually that's all very well. But let's actually put in some design time data so we can actually see this at design time
20:22
and what it might look like. Oh, what's happened there? That's not good. Oh, how did I get across there? All right, let's try that again.
20:44
Okay, that's succeeded now. So I'm going to go and switch over to Blend because that's the easiest way of working with design time data. Here's Blend. So it'll load up my page and then what I'm going to do is I'm going to get it to auto-generate me some design time data from a class
21:00
that I've already got in, in fact, from that flicker photo results class. So I'm going to get it to spit out some XML. I need to edit the values because it just comes up with loads of Latin which is, you know, all right apart from this image URL because actually what I want that to be is assets slash light gray dot PNG.
21:26
I think that's right. Yeah. So and then it's spat out loads of this. So I just need to just bear with me while I do this.
21:43
It's a bit tedious for you guys. Just a minute. There's about 10 of these items it's spat out. So nearly there. Couple more.
22:03
Cool. And now save those changes. I can set my design time data context to that XAML that's just spat out. And hey, great. Now we can actually see at design time what it looks like. So this is the Windows app. Let's close this. Save all those changes.
22:20
Reloading Visual Studio. And now we should be able to see this app actually working. If everything is good, there's splash screen comes up and we have, oh, hang on. I forgot to put some logic in this. That's not going to help. That's a nice UI but no logic as yet. So go off to my main page.xaml.cs and we need to add some logic into here
22:41
which is in a nice snippet. This is going off to, we're seeing it all navigated too. We actually go off and search Flickr for flowers. This is the method to search it. It's going to set the data context back to the results when we get it back. And then I've got some other stuff that I'm going to go on to in a minute which is all about tiles.
23:02
And setting a tile template which is XML. And then we should be good. And also some toasts and that sort of stuff. So yeah, now we should hopefully get something back. This is always a slightly nervous moment for me. There we go. Now, flowers was a carefully selected thing. You know what it's like with live demos.
23:21
If you choose the wrong search term, you could get undesirable results back. I did get one a few weeks ago where the interpretation of a flower was, well, yeah. Disappointing. There we go. So that's the Windows one. So we're in good shape now. Okay, let's build ourselves a Windows phone version of this.
23:42
Sharing as much as possible. So I've got my assets. That's all good. Now what about my, this main page? So here's my phone UI. At the moment it's an empty grid. Now I said the XAML is exactly the same. So you can share XAML,
24:01
but in this case I'm just going to copy it. I don't know why it's complaining about the design. It's gone crazy there. What's going on? It was just running. Why are you complaining now?
24:22
Okay, strange. All right. So here's my, this is my grid. Actually, I'm just going to copy the entire contents from the Windows one. And let's paste it into here. Okay, and I also want to visualize this.
24:41
I mean, okay, that's kind of worked. I haven't got any things. I'm going to copy the sample data. Sample data unfortunately can't go into the shared folder. It has to be, it's something the design time experience likes it to be actually in the head. Let's build. And then I also want to go and do kind of what I did before and fix up the layout a bit.
25:00
So let's go off to build for, go off to blend for the phone one as well. I've already got the design time data that I generated before and I just copied it. So all I need to do is wire it up, which I can do like that. And now we're seeing what it's going to look like in the phone as well. Now, this is all very well,
25:21
but let's make this a bit smaller. Let's make this, I don't know, 80. And this one we can make to be 10. So we're getting a better sort of layout. The grid, what have we got? We've got a couple, we've got, I want to set that left margin
25:45
and set the left margin of that to 10 and the right margin to 10. So we're doing a bit of layout stuff here. I didn't mean that. Yeah, and the grid view. So I'm going to edit the layout template
26:03
and we've got our grid. I was going to make that auto width, auto and height
26:21
and set a bottom margin of 10. This isn't quite working out how I expected. What's going on here? I must have messed up. Oh yeah, I've still got 120 on that, on this grid view. Let's set that to zero.
26:42
Okay, now we're getting sort of like a layout that's a bit more appropriate for the phone. Let's just drag that over there and stick that over there as well. So now that's looking better for a phone layout. I can save that, reload in Visual Studio. That will catch up in a minute. And then we can change the target
27:01
that we're going to actually go and run. So this is Windows Phone and we'll run it on the emulator. So it's going to boot up my phone emulator and we should get the same sort of app basically working on both devices. Ah, I haven't put any logic in.
27:20
I did the same mistake over and over again. So I've done the UI. Yeah, brilliant. And then you're not going to see anything. So there's no logic on the back of this page at the moment. Here it is. It's completely, there's an onNavigator2, which we can get rid of actually. So I could just simply put my snippet in again, the same logic I had in the phone app, but I don't like that because that's duplicating code.
27:43
I really don't like that at all. So actually what I'm going to do is go and copy that class. I'm going to go down to my shared folder, add a new class, a new item, and it's going to be a class and it's going to be called MainPage.cs.
28:04
And I'm going to just paste all of the code behind into there. Now, this is kind of interesting, apart from I'm going to leave the constructor out because this is, the key thing here, this is a partial class, which means it allows you to distribute
28:21
the definition of a class across multiple different physical files. So I'm going to have all the common stuff in this partial class that's in the shared. And that will all get merged into this one in the phone. And this one now, I need to remove all this
28:40
because otherwise we'll end up being all duplicated. So now that's my Windows one, that's my main page, but when it's compiled, it will add in all of this stuff as well. Same for the phone one. We'll add in all of that shared stuff as well. So now the phone one should work.
29:00
Now, I'm also going to do one other thing as well, which is to, before I run it, go into the app manifest and I'm going to make it toast capable because the other thing that code does in the main page is when it gets some results back, it updates the tile with the first five pictures and it also sends a toast.
29:22
So what I'm going to do is, not that, is go off and find my Flickr searcher and pin it to the start screen. So we've got a tile. There we go. Let's just make it a big tile. Right, there's a nice tile.
29:41
And then we will run the app. And we've got all that shared logic and there's our pictures. So we've got nice little pictures. So that's all working great. And in a minute, if the gods are with us, we should have a toast pop-up.
30:02
Yay! And that's just the first text, the first message for that first one. And this tile at the bottom has been updated with the first five images. So we've got nice tile updates as well. The point is, of course, that it's exactly the same code as up in the windows one. So I'm just going to turn my notifications back on in here and run this guy as well.
30:27
Debug, start new instance. And this would do the same thing. We've got our images up and we should get a toast pop-up in a minute for that guy as well. We don't even have to wait for it to close it
30:43
and the toast should pop up. It should do. Did I turn notifications back on? Yeah, I did. Oh, I know what I did. I forgot to say toast capable in here.
31:02
Here we go. Yes. Okay. Set a start-up. Run it. And this one would update the tile as well. I've not bothered pinning the tile, but there's our image. And in just a few seconds, we should also get the toast pop-up as well. And it's exactly the same code, same template, same everything.
31:29
We will get a toast in a minute. Oh, well, whatever. It should do. Maybe I have to stop it and restart it. I'm not going to waste any more time on that.
31:41
So I hope that gave you a flavor for the commonality between the two. Let's dig a bit more deeper into what we've actually got with Phone 8.1. So first of all, this app model convergence. So I've already talked about this. The key investments were about making apps work really well across devices.
32:04
And we wanted also to make it much better to run really well on low-memory devices. So Windows Phone has been, you know, it's been a struggle. We're starting to gain a bit of market share. But actually, all the phones that are selling, frankly, are the cheaper ones. It's the low-end devices, 512 megs.
32:21
Now, fortunately, our OS works very well on 512 meg devices. It works even better on 1 gig and then 2 gig devices, but it works pretty well on 512 megs. But we've done a lot of effort in this release to make that even better. So your apps, I mean, for you as developers, that's good because you're not going to get any of those crazy comments from people saying how slow your app is.
32:42
And quite often, that's not your fault. It may be that the phone is just rubbish, you know? But now on low-end devices, you're going to get good performance. We've really enhanced the multitasking. The packaging deployment's the same. Backup and roaming and the application data sharing are all good things that are going to come to use developers. And there's also, from the end user's point of view,
33:02
we've got this action center. So you can now swipe down from the top, and the user can get notifications and get to quick settings. That's programmable, so you can actually put stuff into that and update notifications. And we've got shared push notifications, resource packages. So there's a packaging way to make sure that the stuff that gets downloaded to the phone is smaller.
33:23
And then we're roaming data across phone and tablet. I'm going to talk about each of these in a bit more detail. So yeah, with Windows Phone 8, we ran pretty well on 512 meg devices, but we really ran great on 1 gig and above.
33:41
And these 1520s, these massive super phones, they've got 2 gigs of memory in them. But, you know, we did a lot of work to make sure that the user experience was consistent across them. And, you know, stuff worked, albeit a bit slower on the cheaper devices. So it was okay, but we did a lot of effort in Phone 8.1 to actually make the experience much better
34:02
for owners who had the low-memory devices. So one of the key things we did here was that in Windows Phone 8, we had this idea of a memory cap. So you had that amount, a certain amount of memory your app was allowed to use, and that was fixed at 150 megs for a 512 meg device.
34:22
And if your app used more of that, went over that, the OS would just kill it. No questions asked, you're dead, you're out. So, and that all worked okay, but actually we found out it could be overly conservative because when we looked at all the analytics, the data that comes back about what apps actually are that are running on our devices,
34:41
we actually found that 94% of apps run in less than 150 megs. So that small 6% wouldn't run on the 512s at all, but would only run on the bigger devices. But the real interesting stats is when you go down is that actually 70% of apps only need 60 megs of RAM to run in.
35:02
Now, the problem here is that because we were having a fixed slot, a memory slot for you to run in of 150 megs, if you only used 60 megs, that's fine, you would run and you'd have all this lovely space, but all the rest of that memory was essentially wasted. And when a user switches from one app,
35:21
an active app on a phone, to another one, what happens is the current, the one that they're switching from gets suspended, and the OS will try and take a memory snapshot of that and keep it in memory so that then the user can start up their next app and start running with that. And then if they finish with that app and then go back to the one they were on before,
35:41
you get a fast resume and it just gets loaded back in from cache and it really fast and quick and get off where you get going again. Now, the problem with 512 meg devices is if you've got 150 meg memory slot, there isn't room left to cache 150 megs. So it effectively meant that whenever an app got suspended,
36:03
it actually got tombstoned, which is this kind of deep sleep state we put them into. It's still resumable, but the work to resume it is much more, and you see this resuming dot dot dot across the screen and there's a noticeable pause, and then finally the app comes up. It's not a terrible user experience, but we can do better.
36:21
So it effectively meant that all these apps were getting tombstoned, when in actual fact, if we were just able to take a memory snapshot of the 60 megs they actually were using rather than this kind of over conservative 150 megs, then we could give a user experience, and that's exactly what we've done. So now the system, the phone OS, monitors how much memory your app is using over time.
36:41
So the very first time a user runs the app, they'll get given the 150. But actually, when you run it, the system will say, okay, last couple of times this user has run this, it's actually only used 60 megs. So the next time it runs, they get given 60 megs, with a little bit of a buffer to account for something unique that hadn't happened before.
37:02
And then, of course, when they get suspended, you just suspend whatever memory has been used rather than the whole 150 meg fixed slot. So this means that with the lower end phones, the chances of your app being resumed rather than coming back from tombstoning are much greater, much improved, so you'll get a much better user experience, and the users will see apps resume faster,
37:22
and will love the phone more, and love your app more. So the result of this, on one gig and above, just about every app will be resumed from suspended state rather than from tombstone. 512 megs will still be for heavy users, there will still be some tombstoning, but the most recent ones more likely will be resumed from in-memory suspension,
37:42
which is going to give a much better user experience. What about the way we can run code on the device? So I'm going to talk about multitasking. And the goals here was, first of all, if you've written a Windows Phone 8 application and used the background tasks options that we have on there,
38:02
which is, we have two flavors. We have the periodic tasks, that the OS will run your app for like 25 seconds every 30 minutes or so. And then we have resource intensive tasks, where if you're plugged in on charge, then the OS will allow your app to run for, I think it's 10 minutes or 20 minutes, a long time anyway, and do some real heavy duty stuff.
38:22
So that's, compatibility has been retained, so those kind of flavors of background tasks still work. But what we've done is we've brought the Windows Runtime background tasks system down to the phone, which means that you've got the same rich ways of running code in the background that you've got on Windows, and it massively expands the interesting stuff
38:42
you can do on phone. So before we get on to the background tasking, first of all, I'd already talked about the memory cap and about the way that we're enabling apps to be resumed more quickly. The other thing we've done is that,
39:01
we were under the impression at Microsoft that users kind of understood this idea that they launched an app, and then they go through some pages, and then when they come back to the home screen, if they hit back on the home screen of the app, it would close the app, and the next time they ran the app, it would launch a whole new copy up from scratch.
39:22
We also thought that if you go to the programs menu, people were always expecting somebody to launch a new copy of the app, and it wouldn't take them back to where they were necessary. You'd always start at the launch page, and we'd kind of say, well, you know, it's a consistent user experience. People understand it. It's the phone way of doing things. Anyway, it turns out people didn't understand that at all.
39:40
That was kind of a convenient trick we were playing on ourselves, because that's the way it worked. So anyway, it's changed. So now, when you exit an app, however you exit an app on Windows Phone 8.1, so you hit the back button on the home screen of an app, the app doesn't close. It will be suspended,
40:01
so it will be suspended, and the next time you run the app, the user runs the app, whether it's by going to the task switcher or whether it's by going to the programs menu. The suspended one will be resumed, which gives a much better user experience. It gives you a tiny little bit more work to do as a developer, because you have to kind of think,
40:21
okay, do I want to put this user back in exactly the same page they were on before, or do I want to give them a start afresh from new kind of experience? And that's kind of, basically, that's up to you. That's domain-specific as to what kind of experience you want to give to your user. It depends on what the app does. Facebook, for example, will always resume back where you were, because it's kind of a continuing, rich experience.
40:41
Other apps, it wouldn't make sense to launch into page XYZ. Instead, you want to always start at the home screen. So that's something for you to make a decision on. We have this app switcher. Yes. Thank you.
41:05
So the question was, if you have way too many suspended apps, can it slow the device down, or do you have to actually switch them off? That's absolutely perfect, because this picture I've just put up on the slide here is our task switcher, which actually came out in GDR3, Update 3 of Windows Phone 8.0.
41:22
I have these kind of conversations all the time, and particularly in the Android world, people love to be able to kill apps. Now, me as Microsoft, and I know how the phone works, I say, actually, no, do you know what? It doesn't matter how many suspended apps you have, because when they're suspended, they're not using any resources. But people say, particularly Android users,
41:41
but I want to kill the app. No, basically, I don't believe you. I don't believe you. I want to kill apps, because I think there's stuff going on. You can say all that stuff, but there's stuff going on. No, there isn't. But if you want to kill apps, cool, you can kill apps, and they'll give you the opportunity. So now we've got this nice, in the task switcher, you've got this X. You can tap on it, and it will close the app.
42:01
But to answer your question, no. You could have loads of suspended apps, because once it fills up the bit of memory that it's put aside for caching, keeping an in-memory snapshot for fast resume, then we're back into our old-fashioned, if you like, tombstone. Which is just we store a signature of where the app was, and it gets stored into persistent storage. And we can still resume from that
42:21
and get back to where they were. It's a little bit more work that needs to be done. But yeah, so we've got the task switcher, and you can kill apps if that's what you want to do. It doesn't make any difference. So we've got all these background triggers now. So like I said, we had periodic background tasks
42:42
and resource-intensive background tasks. And they're fine. Good enough up to a point, but not flexible enough. So now we've got the Windows 8.1 background task execution system on the phone, which means there's a whole load of different triggers.
43:01
So there's triggers that fire when the lock screen, when the image comes up on the lock screen, and when the phone gets booted. There's a trigger you can subscribe to, which is interesting, called a servicing trigger. So one thing with apps now is that they silently update. So the user doesn't have to go to the store tile
43:20
and actually say, yeah, we've got three apps needing updating, and they have to actually go and say, yes, update them. That happens in the background. But this servicing trigger, when an app has been updated, your code could register for a servicing trigger. And it allows you to run a bit of code in the background after the update has been installed, which would allow you
43:41
to upgrade data that's been stored on the device or something like that, or make some changes that you might need in order to support the updated version. So that's one of them. Push notification trigger is really cool. So I'll talk about that in just a moment. Geofencing. So we've got all these nice geofencing triggers. So when the app moves through a particular geographic location, you can fire up a background task and do some stuff
44:02
to notify the user that something of interest to them is nearby. BLE. That's Bluetooth LE, Bluetooth Low Energy. So this is Internet of Things stuff. Smart devices. You can actually run a background task when a device gets connected or disconnected or when the device itself
44:21
has changed its status and wants to send a message to whoever is interested. So you can actually have apps that are interacting with heart rate monitors or luggage tags or access control things or plant pot humidity detectors or whatever. This is a massively expanding area. You can also do boring stuff like simply run background
44:42
tasks on a schedule and you can do stuff with sensors. Question there. Good question. So is the Bluetooth LE stuff working on old hardware? It will. It doesn't right now.
45:01
So actually it does. If you've got an HTC 8X, it works. These things are like gold dust now because they're actually pretty much the only ones it's working on right now. The problem is or the thing is that with the Nokia black updates that they shipped at the end of last year, they did enable Bluetooth LE at the low level.
45:21
And they had their own APIs and they enabled things like the Adidas My Coach thing to work with a monitor. But it was kind of almost a proprietary solution. It only worked on Nokia. So now we've got the capability built into the OS. But until the Nokia Amber update comes out, the Bluetooth LE stuff is blocked from working on Nokia phones.
45:41
So the Bluetooth Amber, it will be out very soon. It will be the one that comes with the 8.1 update. So all Nokia phones that get the regular update will remove this proprietary if you have Bluetooth LE stuff. And it will be enabled across all of the Bluetooth LE devices. Actually on a related kind of note as well,
46:02
the OS 8.1 does work on all existing hardware. Whether it's available for you is up to your network operator. And so we can't promise and say everybody's going to get it. So unfortunately, that does depend on your mobile network operator as to when they ship it to you. But like I said, if you join the preview for your developers,
46:21
you can bypass them anyway. The other thing about hardware, everything will work. There are some new APIs around NFC. So we've got some new stuff for doing real low level stuff with NFC. So be able to use it for doing transit passes and all this kind of good stuff. That will require a new chipset, which is going to come in new phones. So that is pretty much the only feature that I know of
46:43
that is going to be not usable on the existing hardware. So some stuff around that. Yes, this push channel notification trigger is really cool. Here's the thing. So we've always had these push notifications. You can send from the cloud to a device.
47:03
And you can put a toast up. You could update a tile. And a lot of developers have used this for reaching out to users. And it's cool. It's this live tiles idea. And it's really great. And there was a third kind of notification, which was this raw notification. And a raw notification is basically app specific.
47:21
It's used to send a blockabyte, some XML usually, to the phone. And in Windows Phone 8 and earlier, if the app was actually running at the time the notification arrived, they would get it in an event and they could process it. But that's it. So from a backend service point of view, well, what's the use of that?
47:41
So frankly, I've never found a use for it. But now we do because push notification trigger is fantastic. So now if you send a raw trigger from your backend and you register for a push notification trigger, when the notification comes to the phone, the background task fires up and you can process the data
48:00
that's in the raw notification trigger. Now, why is this exciting? Well, here's the scenario. You see, maybe you've got a sports app and you want to have notifications to the user. They're particularly interested in goals that are scored at the World Cup, yeah? So now, the old way of doing this was, yes, you could send a toast and say,
48:20
England are losing 4-0 or something. Never happened. And then the toast will come up and then the user's really interested and they tap on the toast. The sports app opens up, but then they've got this thing where they have to sit and look at the stale old news while it just says, wait, updating, and it goes off to the cloud
48:41
and then it gets the information and finally gives you the information you're interested in. But now, what you can do is with the raw notification, the user doesn't get any visible anything. There's no toast associated with this, with the raw notification. But your background task could go off to the server, update the stored data for the app because it's a part of the app, you know,
49:01
can already go and get the news, the pictures, the information about this event then pop up a toast to notify the user. The user taps on the toast, the app opens and it's already up to date. Much better user experience. So that's really exciting. Geofence is cool as well.
49:20
So this is brand new as well. Your app can register. It says they're up to 1,000 geofences. Actually 1,000 geofences is the kind of practical limit. The actual real true limit is something like 20,000, but we wouldn't recommend that because it will start to run a bit slow. So you create these circular geofences and your app can register up to 1,000 of these.
49:43
And it's just a geo-coordinate, a latitude and longitude and a radius. And you can register for different kinds of triggers. So when the user enters the geofence or when they leave the geofence, you have some background code can run. And these work also not only with background tasks
50:01
but also with your foreground app. If you've got a foreground app, it can get events when the user travels through a particular geofence. And I've got a nice little demo I can show you with this.
50:27
Okay. So this was actually built by a Dutch MVP, Joost van Schijk. And he's built this little app,
50:41
which it's simple enough. It's actually a portable app. It's a universal app. So it works on Windows and Windows Phone. I'm just going to show you the Windows Phone one. So there is... So you have this geofence monitor and you can clear all your geofences. You can set the center of your map and your zoom level. And then what we're going to do is we're going to call this Map Location Finder API
51:03
to basically get locations. That's a kind of geoconversion API. And then there's this Map Root Finder. You can get a driving route from one point to another. And then what you can do is we actually draw the route onto the map with map polylines. It's a really nice little sample.
51:22
And we can draw map icons on. And geofences as well. We're actually going to, in this app, show you where the geofences are, though normally they wouldn't be visible on app. And then we get... When the position changes, we'll move along the app, along this map. So let's show you what that looks like. So here's my...
51:41
Here's the basic app. The location is set to be somewhere in the Netherlands. And we've got, in the emulator, got these tools. So we can do cool stuff with the tools and load in a list of lat-longs
52:01
representing a route, which is here. And that's now going off to Amersvoort in the Netherlands. And you can see the route that we're going to go to. So I'm going to show the route on the map.
52:26
Here's the route that we're going to do. Let's just zoom out. And I'm going to start the location simulator in the tools. So I'm going to play all these points using... You can change the speed, the speed limit, walking, biking, or super-fast. I'm going to just go as if we're driving around the streets
52:42
observing the speed limit. And you can change the accuracy profile, saying are we going to have exactly pinpoint accuracy or are we going to pretend to be urban. So it simulates as you were connecting through different towers. It knows where towers are and Wi-Fi points. It's all very clever stuff. They've invested a huge amount into this.
53:02
Let's start it playing. And we're going to track the location. So as we move along, the map is going to track along and will show us where we're going. I'm also going to show the geofences. So what happens is when we travel in... There should be a car up. Why is my car not showing?
53:21
Then when we get to a geofence, the task, the event file says you entered a geofence, so then it will give you turn-by-turn directions as well. And there should be a nice little red car, which always comes up, but it hasn't come up for some reason on this. I bet that's because I zoomed in.
53:41
Anyway, you can see how it's tracking along, matching the position that we've got in the simulator. So this is real nice. You can do your geocaching map search from the comfort of your workstation, not have to sort of sit around in the car and drive around with a laptop and a phone and all this kind of stuff.
54:01
Yeah, so really rich stuff. This is a foreground app, but like I said, works great in the background, so you can have things where the user gets off a plane. You've got a geofences set off. You can set up all the different airports in your area. So as soon as you get off a plane, the geofence, you'll get a trigger that you've passed through a geofence for an airport. Your background task could then load in loads of geofences
54:22
that are appropriate to that particular airport location, and then you can give real good directions to facilities that are nearby. Oh, my car's turned up at last. There you go. There's my car. So it's all cool stuff.
54:47
Okay. Yeah, we've got one Microsoft push service. One Windows notification service is unified across the both. WNS is much faster than the old MPNS and much more reliable, and MPNS used to work all right in the United States
55:01
and frankly sucked everywhere else. So now WNS is good, and it's worldwide, and it's really cool, and even your Windows Phone 8.0 apps running on a Windows Phone 8.1 device, under the covers, the notifications are happening over WNS without you having to upgrade or do anything. So you've coded up an app using the old push notifications,
55:21
and it will just work, and actually you'll get all the benefits of the improved performance of WNS. It's more battery efficient. Toast updates, I kind of showed you a demo of this. Common format over both, but what you have on the phone is you won't have the same rich visualization of it, so it kind of adapts what it shows that is appropriate for the platform where it's working.
55:43
This action center, we've got this list of stuff that you can, you know, list of notifications. The key thing here is that apps can also update or remove notifications from this list if they're related to your app, and you can also do this thing called a silent toast, so you're allowed, you can put stuff into that list, but not actually interrupt them with a toast pop-up,
56:02
so it's good for putting important information into the list that they can look at when they drag down the action center. The live tiles is common as well, same mechanism, same templates across Windows and Windows Phone, and this app packaging and deployment, now we've got the same Apex format, but what's cute about this is if you have multilingual apps,
56:23
so you've created resources with different translations, or you've shipped in resources for different resolutions of phones, so you've got high def resources and lower def, this scale 240, scale 100 stuff, when the user installs the app, the packaging system gives you this for free, so when the user installs your app,
56:41
they get just the resources that are appropriate for the language of their phone and for the resolution of their phone, so they don't have to ship the whole shooting match, they get just the bit that's important to them, and updates are, you only get the bit that's updated as well, so huge improvements to the user, faster installs, and very data efficient.
57:01
Users can install apps onto an SD card now, and they can move apps between the main memory and the SD card. Any apps that are stored on the SD card, the local folder is all encrypted, so you don't have to worry about security. Apps are enabled for storing on there by default,
57:21
but if you really have a strong objection to that, you as the developer can check something in the app manifest to say, no, I don't want this app to be installed on an SD card. But we expect most people would want that to happen. This is really cute, so the app data roaming, so there's a couple of things from the user perspective that's in 8.1. First of all, the start screen layout is backed up for the user,
57:44
which means that if you get a new phone, and you choose to install the backup from your previous phone, in the past you'd get all your apps, but you wouldn't get the same start screen. So you've lovingly created this beautiful start screen, and you don't quite get the same thing back.
58:01
So now you do, so we're backing up the start screen. And the other thing is that the local folder stuff gets backed up to OneDrive every night as well, so all the local files in the local folder will be backed up to OneDrive. So again, your users have got that kind of backup automatically built into the system. But the most exciting one is the one at the top there,
58:22
app data roaming. So if you've got an app that you've registered in the store for a particular app name, and it's a Windows Store app, and then you register the Windows Phone version of the app and use the same stored name, they are tied together. They have this thing called a shared PFM, which stands for package family name,
58:41
but it basically means they've got the same reserved name. Once that happens, if you store stuff into the roaming folder, it will automatically be roamed through to the other devices. So it allows, this is great, because it allows your user to do something on the phone and then later pick up the tablet, and their last, most recently used searches,
59:01
or their most recently used data, or whatever, is there. So they can pick up a task on a different device that they started on an alternative one. So this is really, really nice feature, and it's very, very easy to take advantage of. Enterprise deployment, no real changes here. So enterprises can distribute their own apps
59:23
without going through the Windows Store. You can do that using device management packages, Intune from Microsoft, or MobileIron, or any of these other ones, or just through a SharePoint site, or even by email or an SD card. So there's a security system behind all this,
59:40
because when you sign up as an enterprise publisher, you get your own signing certificate. So you sign your stuff with that, and that guarantees that it can't be tampered with. And then you register your phones to accept that token. So that's obviously still there. Oh, yeah, I already talked about the application data sharing. Oh, no, this is actually application data sharing, which is...
01:00:00
user-driven data sharing between apps. This is the share contract. I'm going to show you a demo for this because I'm running out of time which will tell the tale better. So the share contract. First of all I'm going to open a Silverlight app
01:00:25
which is our old friend the Contoso Cookbook. I'm sure a few of you have come across this before. And this application I'm going to run it on the phone 8.1 is a simple little
01:00:41
recipe thing and what it does is it allows you to select a recipe. You can go off and find a recipe. You can get the ingredients and you can actually take a picture of it and that's all great. Now I want to, you can upgrade this. This is a phone 8
01:01:00
project. I can very easily upgrade it to 8.1 by going to this. This is Silverlight 8.1 and we've got an 8.1. I'm going to just that's the upgrade, how's that? But I'm going to open the completed solution because we haven't got time, I would normally take you through this but once you've upgraded to 8.1 you've got access to the complete
01:01:23
Windows Runtime API and all the new cool stuff including the share contract and everything else. So now what I can do is in my recipe detail page I can add a new button to the just build it add a new button to the
01:01:41
oh god, hang on there's new get packages phone toolkit, got lost install there we go, now we should be good.
01:02:06
So this now is here we go I've added a new app bar button to to this right, there we go
01:02:28
which is a new one which is which is to share, this is not working sorry I apologize, something's gone awry here
01:02:52
the point that I was trying to show there is that it's very easy to create a Windows Runtime API, to call Windows Runtime APIs including the share one
01:03:02
and I'll try one, I'll just give one more shot on this and see if I've got the version that from the jump start which should be good
01:03:26
try this yep, okay so this one should be alright once I've fixed that again
01:03:51
and this is an example of how you can add real rich content to an application so now I go to German, I can go and pick a recipe I can say leg of lamb and I've created this beautiful leg of lamb so I can take a
01:04:03
picture of it and you have to use your imagination, this is a leg of lamb, isn't that fantastic, yeah there we go, accept our picture and then I can share it, this is now calling out to the share contract so now we're in the UI of the phone and it's giving you all the apps and locations where you can share to it, I could share that to OneNote for example
01:04:21
you couldn't do that in a Phone 8 application actually the code to do that is really very simple so there's my picture and a little bit of stuff that's come from the Contoso Cookbook app and this was the code to do this is basically this in order to do that sharing thing so
01:04:40
it's very rich and very easy to add really exciting new functionality to your application right so that was a quick run through of the Phone 8.1 platform giving you an idea of all the great new stuff that's in it loads of emphasis on running really well on 512 Make devices great new ways of running code in the background good stuff about app data roaming and about the deployment
01:05:03
and the app data sharing and the convergence around WNS and Action Center thanks very much for watching this I'd be very happy to have as many of you as possible back again after lunch but thanks very much and enjoy your lunch