Windows Phone Guide for Android Application Developers Table of Content



Download 0.57 Mb.
Page2/15
Date04.05.2017
Size0.57 Mb.
#17233
1   2   3   4   5   6   7   8   9   ...   15

The Developer Tools


Microsoft has released a set of tools as part of the Windows Phone Software Development Kit (SDK) 8.0 for developing Windows Phone applications. The SDK is free and can be downloaded from here. The Windows Phone SDK 8.0 includes:

  • Visual Studio Express 2012 for Windows Phone, an IDE for developers

  • Blend for Visual Studio 2012, a User Interface design tool for designers

  • A Windows Phone emulator to test and debug applications

The tools can help you develop consumer applications, business applications or games. While the emulator must be installed on Windows 8 pro edition on a CPU supporting Second Level Address Translation (SLAT) for running Hyper-V, you can still use the SDK to develop Windows Phone 8 apps even if your computer doesn’t support the emulator. See System requirements for Windows Phone Emulator for more information.


Windows Phone Architecture


Like Android OS, Windows Phone OS is designed to run on multiple phones from multiple vendors. To provide a consistent user experience and features that developers can rely on, Windows Phone defines a minimum set of hardware specifications that all phones must meet.

Minimum hardware specifications include an ARM7 CPU, a DirectX capable GPU, a camera, and a multi-touch capacitive display. Standard sensors include: an A-GPS, an accelerometer, a compass, proximity and light sensors. There are three standard physical buttons on the phone – back, start and search. As we will see in a subsequent chapter, these buttons provide an easy and natural navigation model for the user.




Figure Windows Phone 8 Programming APIs

.NET API for Windows Phone

Windows Phone Runtime

Win32 & COM

C# / VB


C++

Apps with XAML

Apps with XAML and Direct3D

Games with Direct3D

Most of the Windows Phone 8 apps are built as managed apps using XAML with C# or VB. Windows Phone 8 games are built using Direct3D using C++. It is also possible to render 3D graphics within a XAML UI. It is also possible to build a Direct3D game using a thin XAML wrapper. For more information, see Developing apps for Windows Phone. Windows Phone 8 adopts many of the components of Windows 8, providing better compatibility between the two.

Comparing the Programming Stack of Windows Phone with the Android Stack


The Application Model shown above provides services for managing the application lifecycle such as installation and update. The UI model helps to manage the application user interface. Applications are built using various Windows Phone Application Programming Interfaces, APIs, known collectively as the Windows Phone API

This table gives an overview of the Windows Phone 8 frameworks that provide features comparable to the Android programming layers.



Android Frameworks

Functionality

Windows Phone 8 Frameworks

Android Application Framework


Application UI, Device integration (sensors, camera)

Windows Phone API

Graphics, Animation, Media

Direct3D or XAML media and graphics for others

Android Libraries

Base services, Networking, Text, XML, storage

Windows Phone API

Android runtime (Dalvik)+ Linux kernel

Operating System

Windows Phone 8 OS



Android and Windows Phone Stacks Side by Side


This table compares the Android and Windows Phone 8 Frameworks side by side.

Android Frameworks




Windows Phone Frameworks

Application UI and Phone

Multi-tasking

Java




C#, VB, or C++

Multi-tasking

Application UI and Phone integration

Application UI




Application UI

Device integration




Device integration

Telephony




Telephony

Browser Control




Browser Control

Notifications




Notifications

Peer to Peer Gaming







XAML




Direct3D

Two Application Types

Controls & Gestures




Controls & Gestures

CoreWindow (PointerPressed

Media

Media Framework




Media

Media Foundation, XAudio2, WASAPI

Animation




Animation

Direct3D

Graphics




Graphics


Direct3D

OpenGL-es




File System




IsolatedStorage

Windows Phone API

SQLLite







Location




Location

XML




XML, LINQ

Networking




Networking, Windows Communication Foundation

Libc, Dalvik VM




CLR Base Classes

Android runtime + Linux kernel




Windows Phone

OS

Managed Code


On Android, you have been developing applications primarily using Java and some native components using C++. On Windows Phone 8 you have the option of using C# or Visual Basic (“managed code”) for XAML applications or C++ for Direct3D game development

Execution of C# or Visual Basic (VB) code is managed by the .NET Common Language Runtime (CLR). . Similar to Dalvik VM on Android, CLR is the Virtual Machine (VM) on Windows Phone OS. Similar to Java, C# and VB do not require memory management; CLR handles garbage collection.

While most Windows Phone apps are written in C# or VB, you may want to use native C++ code for the following reasons:


  1. Portability: This is useful if you are targeting multiple platforms you can write core login in C++.

  2. Direct3D: If you want to use Direct3D esp. to develop games, you must use C++.

  3. Performance: For some scenarios, you may achieve higher performance using native code.

In this paper we are going to focus on managed code.

Base Services


Windows Phone Base Class Library classes roughly correspond to those provided in the Android Core Libraries. Android core libraries include functionality for media services such as audio and video, graphics and animation using OpenGL and SGL, SQLite for database support and networking services. It also includes LibC and interface libraries to interact with Dalvik VM and the Linux kernel.
The Windows Phone Base Class Library layer includes base classes, collections, threading, text processing and IO. The base class library also includes networking stacks, such as HTTP and the Windows Communication Foundation (WCF). WCF provides an easy interface with XML and SOAP services across the web, with support for XML data transfer, serialization/deserialization and XML parsing.

While Windows Phone 8 does not have a pre-installed local database such as SQLite, developers can use SQLite in their own application or use Language Integrated Query (LINQ). LINQ support SQL-like queries in C# to query data loaded in memory,stored in isolated storage (see below), or in remote databases such as SQL Azure.




Application UI and Device Integration


You have a choice of two different stacks in Windows Phone media applications, namely, XAML and Direct3D. XAML for Windows Phone provides controls that are similar to Android standard widgets.

It is recommended that you use XAML for Windows Phone for consumer or business applications and Direct3D for games, although you can certainly also develop games using XAML animation. It is also possible to mix XAML and Direct3D to take advantage of specific features available in the two stacks.



Android applications




Windows Phone counterparts

UI using activity(contains widgets) with navigation between them

description: http://www.walyou.com/blog/wp-content/uploads/2010/06/windows-live-messenger-iphone.png

Windows Phone Applications:

XAML apps with pages connected by flows



2D or 3D games built with OpenGL-es

description: http://www.pocket-lint.com/images/wpr2/windows-phone-7-games-announced-0.jpg?20100818-091539


Direct3D games

Direct3D for Games


Windows Phone 8 supports Direct3D for gaming and enables hardware accelerated 3D rendering and graphics. For a high performance game, Direct3D is the right option.

Controls and Media


You have been using Android controls in your application, , corresponding controls and support for multi-touch are available via XAML. Extensible Application Markup Language (XAML) is a declarative language used to design UI. Windows Phone controls are specifically designed for the primary interaction with touch on a small form factor device. Developers can use separate code-behind files, written in C# or VB, to respond to events or to manipulate the controls.

Windows Phone provides high performance audio and video using a variety of CODECs. It supports both vector and bitmap graphics with hardware acceleration. As opposed to a file system, Windows Phone provides sandboxed storage, called Isolated Storage, to store application-specific data. With the isolation of storage, one application cannot affect other applications that are running on the phone.


Windows Phone Platform Features


If you need to use HTML in your application, you can use the Internet Explorer based browser control for HTML UI. Windows Phone Framework layer also provides interfaces to various sensors, such as the accelerometer or the camera. Similar to Google Cloud Messaging Microsoft provides a push notification service, called Microsoft Push Notification Service.

Similar to multitasking in Android, Windows Phone supports multi-tasking. Windows Phone multi-tasking supports fast application switching which allows users to rapidly switch between applications. Multi-tasking also supports running scheduled tasks such as alarms and reminders, background music, GPS tracking and remote communication. If you have used ADMob API to publish advertisements in your Android application, you will find similar functionality in the Microsoft Advertising SDK for Windows Phone.




Download 0.57 Mb.

Share with your friends:
1   2   3   4   5   6   7   8   9   ...   15




The database is protected by copyright ©ininet.org 2024
send message

    Main page