Docsity

Getting Started with Mobile Programming: Android and Windows, Slides of Computer Programming

Partial preview of the text

Download Getting Started with Mobile Programming: Android and Windows and more Slides Computer Programming in PDF only on Docsity!

Introduction to Mobile

Programming

Overview

 Fundamentally, it all works the same way  You get the SDK for the device (Droid, Windows, Apple)  You get a development account to test the application  You deploy the application  The APIs are different from one platform to the next

Getting Started (Android)

Getting Started. Android

 The markup is XML  The code is Java with a „different‟ set of libraries  I have not worked this much

Getting Started (Windows)

 I‟ll be working with 7.1 here  Have not played with Windows 8 

Creating a First App

 When you installed the SDK you should see the Silverlight for Windows Phone templates  Note that you also need the basic Silverlight tools too  And the right version

Creating a First Windows App

 Select the Target Phone Version

Creating a First Windows App

 And the emulator appears

UI Differences

 The TextBlock is the equivalent to a multi-line text box  The TextBox and Button and other controls work as you would expect

 Note the WPF property names are much different

A First Program

 Create the XAML using the designer

A First Program

 Create the code behind

A First Program

 And just run as usual  The app appears in an emulator

Navigation Between Pages

 A Windows phone application is made up of pages  Your first is MainPage.xaml and MainPage.cs  The hardware “back” button returns to the previous page  You use the NavigationService to navigate to the next page

Navigation Between Pages

 Navigate to another page: