Introduction to Windows Store app development for Android programmers

Slides:



Advertisements
Similar presentations
Android Application Development A Tutorial Driven Course.
Advertisements

ANDROID DEVELOPMENT KELLY MCBEAN. DEVELOPMENT ENVIRONMENT OVERVIEW Eclipse Standard IDE for Developing Android Applications Install: 1.Java (JDK) – Since.
Android architecture overview
All About Android Introduction to Android 1. Creating a New App “These aren’t the droids we’re looking for.” Obi-wan Kenobi 1. Bring up Eclipse. 2. Click.
Application Fundamentals. See: developer.android.com/guide/developing/building/index.html.
Filip Debelić What is it? Android is a mobile operating system (OS) based on the Linux kernel and currently developed by Google Android,
UFCFX5-15-3Mobile Device Development Android Development Environments and Windows.
By Philip Peng, For PennApps Mobile 2011, University of Pennsylvania All images used in this belong to their rightful owners (not me).
Cosc 4730 Android TabActivity and ListView. TabActivity A TabActivity allows for multiple “tabs”. – Each Tab is it’s own activity and the “root” activity.
Android Development (Basics)
Introducing Xamarin 2.0 Introducing Xamarin 2.0 Michael Hutchinson
INTERNATIONAL SUMMER ACADEMIC COURSE UNIVESITY OF NIS ISAC – Android programming.
Welcome Demo – Published Windows Store Apps on Dynamics AX 2012 Why build your own app? Demo – Building a Windows Store and Windows Phone 8 App Building.
Better reference the original webpage :
Mobile Programming Lecture 1 Getting Started. Today's Agenda About the Eclipse IDE Hello, World! Project Android Project Structure Intro to Activities,
Introduction to Android Programming Content Basic environmental structure Building a simple app Debugging.
Windows.Net Programming Series Preview. Course Schedule CourseDate Microsoft.Net Fundamentals 01/13/2014 Microsoft Windows/Web Fundamentals 01/20/2014.
TC2-Computer Literacy Mr. Sencer February 8, 2010.
Mobile Application Development with ANDROID Tejas Lagvankar UMBC 29 April 2009.
About me Yichuan Wang Android Basics Credit goes to Google and UMBC.
JavaScript & jQuery the missing manual Chapter 11
CS5103 Software Engineering Lecture 08 Android Development II.
CS378 - Mobile Computing Web - WebView and Web Services.
Chapter 5: Investigate! Lists, Arrays, and Web Browsers.
Introduction to Mobile Programming. Slide 2 Overview Fundamentally, it all works the same way You get the SDK for the device (Droid, Windows, Apple) You.
Chapter 2: Simplify! The Android User Interface
Tip Calculator App Building an Android App with Java © by Pearson Education, Inc. All Rights Reserved.
Android Boot Camp for Developers Using Java, Comprehensive: A Guide to Creating Your First Android Apps Chapter 5: Investigate! Android Lists, Arrays,
An Introduction to Silverlight Matt Harrington Developer Evangelist, Microsoft October 20, 2011.
DUE Hello World on the Android Platform.
CS378 - Mobile Computing Intents.
1 Announcements Homework #2 due Feb 7 at 1:30pm Submit the entire Eclipse project in Blackboard Please fill out the when2meets when your Project Manager.
Android for Java Developers Denver Java Users Group Jan 11, Mike
Chapter 2 The Android User Interface. Objectives  In this chapter, you learn to:  Develop a user interface using the TextView, ImageView, and Button.
CS378 - Mobile Computing Intents. Allow us to use applications and components that are part of Android System – start activities – start services – deliver.
The Windows Runtime (WinRT) is the shared runtime and API space used by store apps across the Windows platform (phone and client) 5 Common WinRT.
Presented By: Muhammad Tariq Software Engineer Android Training course.
Android Boot Camp for Developers Using Java, Comprehensive: A Guide to Creating Your First Android Apps Chapter 2: Simplify! The Android User Interface.
© 2016 Cengage Learning®. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. Android Boot Camp.
ANDROID L. Grewe Components  Java Standard Development Kit (JDK) (download) (latest version)  AndroidStudio.
Windows Store apps… lots of choices Windows Store Apps Communication & Data Application Model Devices & Printing WinRT APIs Graphics & Media JavaScript.
Android Boot Camp Demo Application – Part 1. Development Environment Set Up Download and install Java Development Kit (JDK) Download and unzip Android.
Trunica Inc. 500 East Kennedy Blvd #300 Tampa, FL Cross Platform Mobile Apps With Cordova and Visual Studio 2015 © Copyright 2015.
HW#9 Clues CSCI 571 Fall, HW#9 Prototype
Building Windows Runtime Components in C++ Harry Pierson Program Manager, Windows Runtime Experience Team Microsoft Corporation.
Recap of Part 1 Terminology Windows FormsAndroidMVP FormActivityView? ControlViewView? ?ServiceModel? Activities Views / ViewGroups Intents Services.
TCS Internal Maps. 2 TCS Internal Objective Objective :  MAPS o Integration of Maps.
Lecture 6: Process and Threads Topics: Process, Threads, Worker Thread, Async Task Date: Mar 1, 2016.
Sage Franch | Technical Evangelist Susan Ibach | Technical Evangelist.
Chapter 6 Google Play Services GOALS & OBJECTIVES Google Play Services give you features to attract users using Google features such as Google Maps, Google+,
Mobile Programming Lecture 4 Resources, Selection, Activities, Intents.
Enis Microsoft Avoiding common Windows Phone and Windows Store app certification failures.
Android apps development - Eclipse, Android SDK, and ADT plugin Introduction of.
Chapter 5: Investigate! Lists, Arrays, and Web Browsers.
Mobile Device Development
Android – Event Handling
Build data-driven collection and list apps using XAML
HUJI Post PC Workshop 1 Introduction to Android Development Ari Sprung
CS323 Android Getting Started
CS5103 Software Engineering
Metro style apps using XAML: Make your app shine
Metro style apps using XAML: What you need to know
Application Development A Tutorial Driven Course
04 | UI Presentation & XAML
Android Developer Fundamentals V2
Platform for Metro style Apps
4/9/ | Contracts © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
Introduction to Android
Android Development Introduction to Android Development 2011/01/16
CMPE419 Mobile Application Development
Presentation transcript:

Introduction to Windows Store app development for Android programmers Windows Azure 4/21/2017 Introduction to Windows Store app development for Android programmers Hanu Kommalapati Senior Technical Director http://blogs.msdn.com/hanuk @HanuK Jennifer Marsman Principal Technology Evangelist http://blogs.msdn.com/jennifer @JenniferMarsman 3-006 © 2011 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Agenda Architecture User interface concepts Navigation Data in apps Build 2012 4/21/2017 Agenda Architecture User interface concepts Navigation Data in apps Asynchronous development Sharing Certification and app store © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Windows Store apps… lots of choices JavaScript C++ C# VB XAML HTML / CSS Communication & Data Application Model Devices & Printing WinRT APIs Graphics & Media Windows Core OS Services

Environment map Android Windows 8 Windows, Mac, and Linux Windows 8 Development OS Android Runtime OS Windows 8 Eclipse, IntelliJ, and NetBeans Visual Studio 2012 IDE Android SDK Windows 8 SDK SDK Android Developer Tools (ADT) Plugin for Eclipse Visual Studio Templates and Blend for Visual Studio Tools Java, C++ C#, VB.NET, Javascript, C++ Language Android Runtime WinRT Runtime

UI element map Android Windows 8 Activity Unit of Display Page View Widget Base Control ViewGroup Layout Base Panel Observer Interfaces Event Handling Delegates Fragments User Control Reusable Components

Control map Android Windows 8 widgets controls TextView Display text TextBlock EditText Edit text TextBox RadioButton Radio button RadioButton Android Extras QuickContactBadge RatingsBar AnalogClock TextClock Windows 8 Extras Hub Flyout CommandBar HyperLink CheckBox Check box CheckBox Button Button Submit ProgressBar & Ring ProgressBar Show progress StackPanel LinearLayout Display a list of widgets ListView ListView Vertical list of widgets GridView Grid 2-dimensional grid ImageView Image Display image Spinner Select from a list ComboBox Date & TimePicker Date & TimePicker Date and Time

Android – screen layout (XML) Build 2012 4/21/2017 Android – screen layout (XML) <LinearLayout> <TextView … /> <EditText id=“@+id/etSubName” … /> <EditText id=“@+id/etSubDesc” … /> <EditText id=“@+id/etTnailName” … /> <Button id=“@+id/btSave” android:onClick=“onClick” … /> </LinearLayout> © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Android – screen layout (code) Build 2012 4/21/2017 Android – screen layout (code) //SubEditActivity.java public class SubEditActivity extends Activity { private EditText etSubName; private EditText etSubDesc; private EditText etTnailName; private Button btSave; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); etSubName = (EditText)this.findViewById(R.id.etSubName); etSubName = (EditText)this.findViewById(R.id.etSubDesc); etTnailName = (EditText)this.findViewById(R.id.etTnailName); btSave = (Button)this.findViewById(R.id.btSave); } public void onClick(View view) { db.save(etSubName.getText(), etSubDesc.getText(), etTnailName.getText()); © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Windows 8 – screen layout (XAML) Build 2012 4/21/2017 Windows 8 – screen layout (XAML) <StackPanel> <TextBlock … /> <TextBox Name=“tbSubName” … /> <TextBox Name=“tbSubDesc” … /> <TextBox Name=“tbTnailName” … /> <Button Name=“btSave” Click="btSave_Click" … /> </StackPanel> © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Windows 8 – screen layout (code) Build 2012 4/21/2017 Windows 8 – screen layout (code) //SubEditPage.xaml.cs public sealed partial class SubEditPage : Page { private void btSave_Click(object sender, RoutedEventArgs e) db.Save(tbSubName.Text, tbSubDesc.Text, tbTnailName.Text); } © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Windows 8 – Simulator Simulates: Touch and gestures Orientation Build 2012 4/21/2017 Windows 8 – Simulator Simulates: Touch and gestures Orientation Screen Resolutions Location Network Also takes screenshots © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Demo Building your first app Build 2012 4/21/2017 © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Android – navigation within an app Build 2012 4/21/2017 Android – navigation within an app Explicit Intent Activity1 Source Activity Reference Destination Activity Type Parameter Data Do work Activity2 User/program actions Activity2.finish() Press “Back” button © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Windows 8 – navigation within an app Build 2012 4/21/2017 Windows 8 – navigation within an app Frame.Navigate() Page1 Destination Page Type Parameter Data Do work Page2 User/program actions Frame.GoBack() Page3 Frame.Navigate() © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Windows 8 – navigation within an app Build 2012 4/21/2017 Windows 8 – navigation within an app public sealed partial class Page1 : Page { private void btnNext_Click(object sender, RoutedEventArgs e) this.Frame.Navigate(typeof(Page2),tbSourceData.Text); } // Page1.xaml.cs © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Windows 8 – navigation within an app Build 2012 4/21/2017 Windows 8 – navigation within an app public sealed partial class Page2 : Page { // Invoked when about to be displayed in a Frame. protected override void OnNavigatedTo(NavigationEventArgs e) { if (e.Parameter != null) { // Do something with the shared data tbSharedData.Text = e.Parameter as string; }   private void btnBack_Click(object sender, RoutedEventArgs e) { if (this.Frame.CanGoBack) this.Frame.GoBack(); // Page2.xaml.cs © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Demo Navigation and Visual Studio templates Build 2012 4/21/2017 © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Visual Studio project templates Build 2012 4/21/2017 Visual Studio project templates © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Build 2012 4/21/2017 Blank app © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Grid app Main Page Groups Items 3-Tier UI Hierarchy for Grouped Data

Split app Main Page Groups Items 2-Tier UI Hierarchy for Grouped Data

Hub app Main Page Groups Items 2-Tier UI Hierarchy for Grouped Data

Customized ArrayAdapter Build 2012 4/21/2017 Android – data display Create ArrayList 1 ListActivity SubjectListActivity Inherits setListAdapter() LearningSubject Name SubjectArea Description TasksComplete Customized ArrayAdapter 2 3 Category ListView Subject Name Tasks Done Physics Quantum Mechanics 5 Comp Sci Algorithms 7 Development Big Data 4 © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Windows 8 - data display LearningSubject Name SubjectArea Build 2012 4/21/2017 Windows 8 - data display ListView Set ItemsSource Category Subject Name Tasks Done Physics Quantum Mechanics 5 Comp Sci Algorithms 7 Development Big Data 4 LearningSubject Name SubjectArea Description TasksComplete Create ArrayList © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Demo Data binding Build 2012 4/21/2017 © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Android: async execution (pseudo code) public class FileDownloadTask extends AsyncTask<String, Integer, String> { private Context _context; FileDownloadTask(Context context) { _context = context; } @Override protected void onPreExecute() { //prepare the state for doInBackground() protected String doInBackground(String... fileNames) { return downloadFile(fileNames); protected void onProgressUpdate(Integer... progress) { //using the _context update the UI of the progress protected void onPostExecute(String fileName) { if(result != null) { //display the file name in the UI using _context else { //display error using _context private filename downloadFile(URL url, saveFileName) { try { HttpURLConnection con = (HttpURLConnection)url.openConnection(); InputStream inStream = con.getInputStream(); BufferedInputStream bInstream = new BufferedInputStream(inStream ); ByteArrayBuffer buff = new ByteArrayBuffer(2000); int current = 0; while ((current = bInstream.read()) != -1){ buff.append((byte)current); } File file = new File(_context.getExternalCacheDir(), saveFileName); FileOutputStream oStream = new FileOutputStream(file); oStream.write(buff.buffer()); oStream.close(); return file.getAbsolutePath(); catch (Exception e) { //update UI with error

Windows 8 – async execution (pseudo code) async Task<string> DownloadFile(Uri uri, string destFileName) { HttpClient hc = new HttpClient(); try { using (Stream src = await hc.GetStreamAsync(uri)) { StorageFile file = await DownloadsFolder.CreateFileAsync(destFileName); using (Stream dest = await file.OpenStreamForWriteAsync()) { await src.CopyToAsync(dest); return file.Path; } catch (Exception ex) { return ex.Message;

Demo Async programming demo Build 2012 4/21/2017 © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Windows 8 – sharing data with other apps Build 2012 4/21/2017 Windows 8 – sharing data with other apps Mail ShareSource App Sharing Contract Twitter Other ShareTargets © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Build 2012 4/21/2017 Demo Sharing © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Windows 8 – sharing data with other apps //SourceApp.Page1 public sealed partial class Page1 : Page { public Page1() { this.InitializeComponent(); RegisterForSharing(); } private void RegisterForSharing() { DataTransferManager dataTransferManager = DataTransferManager.GetForCurrentView(); dataTransferManager.DataRequested += new TypedEventHandler<DataTransferManager, DataRequestedEventArgs>(this.DataRequested); private void DataRequested(DataTransferManager sender, DataRequestedEventArgs e) { DataRequest request = e.Request; request.Data.Properties.Title = "Sharing text from Source App"; request.Data.Properties.Description = "Demo of sharing contract"; request.Data.SetText(textBox.Text);

Windows 8 – receive data from other apps Build 2012 Windows 8 – receive data from other apps 4/21/2017 //TargetApp: App class overrides OnShareTargetActivated to display the sharing page sealed partial class TargetApp : Application { protected override void OnShareTargetActivated(ShareTargetActivatedEventArgs args) { ShareTargetPage1 shareTargetPage = new ShareTargetPage1(); shareTargetPage.ActivatePage(args); } //TargetApp.ShareTargetPage1 receives shared text public sealed partial class ShareTargetPage1 : Page { public async void ActivatePage(ShareTargetActivatedEventArgs args) string data = await args.shareOperation.Data.GetTextAsync(); Window.Current.Content = this; Window.Current.Activate(); await Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => { this.tbShareResult.Text = data;}); © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Windows Store – app publication process Build 2012 4/21/2017 Windows Store – app publication process Acquire Microsoft Account Package and Submit the App to the Store Review for Correct Behavior Register for Windows Store Review for Proper Use of Advertising Review for UX, Crashes, Input Devices, and Perf Reserve the App Name Fix Errors Review for Privacy and User Protection Implement the App Review for Offensive Content Review for Localization & Accessibility App Approved No Errors © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Top certification tips Run the Windows App Certification Kit (WACK) Read the documentation Use the Visual Studio simulator for testing touch, different screen sizes, resolutions, orientations, etc. Test for performance Provide a privacy policy if your app connects to the internet http://aka.ms/CertTips

Windows Store vs. Google Play Build 2012 4/21/2017 Windows Store vs. Google Play Windows Store Google Play 70% revenue share for the first $25K USD; then 80% 70% revenue share In-app purchases allowed outside of Store Must use Google Play for payment Can sell apps for $1.49-$999.99 USD Can sell apps for $0.99-$200 USD $49 or $99 annual dev registration $25 one-time dev registration Can buy apps in 231 countries and sell from 121 countries Can buy apps in 136 countries and sell from 32 countries Certification process Direct publish Time and feature-based trials Trials for in-app purchase subscriptions Simulator to test licensing and purchasing Must test billing from a device http://aka.ms/WinStoreVsGooglePlay © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

How do I get started? Download Windows 8 (evaluation copy at http://aka.ms/Win8EvalForDevs) Download Visual Studio Express 2012 for Windows 8: http://aka.ms/JenVS2012 Register for a Windows Store developer account: https://appdev.microsoft.com/storeportals/ Use the portal (reference, samples, forums): http://dev.windows.com

Resources Windows 8 Dev Center: http://dev.windows.com Build 2012 4/21/2017 Resources Windows 8 Dev Center: http://dev.windows.com Samples: http://code.msdn.microsoft.com/windowsapps Cookbook hands-on lab (in XAML/CS or HTML/JS): http://aka.ms/ContosoCookbook Resources for Android developers: http://aka.ms/Android Resources for iOS developers: http://aka.ms/iOS Office hours: http://usdpe.ohours.org Online training: http://aka.ms/AppBuilderCR © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

4/21/2017 10:44 PM Required Slide *delete this box when your slide is finalized Your MS Tag will be inserted here during the final scrub. Evaluate this session Scan this QR code to evaluate this session and be automatically entered in a drawing to win a prize! © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.