1 / 35

LAMAD

LAMAD. Windows Phone 7 20.3.2013. Part 1 The Platform and SDK. Windows Phone 7. Mobile OS Developed by Microsoft Appeared in the US in 2010 Mango in 2011 Tango in 2012. Live Tiles. Nokia Lumia 800. Market Share. Market Share 2012 . There is Hope!. Technology.

Download Presentation

LAMAD

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. LAMAD Windows Phone 7 20.3.2013

  2. Part 1The Platform and SDK

  3. Windows Phone 7 Mobile OS Developed by Microsoft Appeared in the US in 2010 Mango in 2011 Tango in 2012 Live Tiles Nokia Lumia 800

  4. Market Share Market Share 2012  There is Hope!

  5. Technology Application development in C# or VB GUI design in XAML (Extensible Application Markup Language) Declarative XML-based language Created by Microsoft

  6. Future of the OS Version 8 just appeared 2012! Future is not yet clear Game development maybe? Windows Phone 8

  7. Installing development Kit Newest Software Development Kit (SDK) version is 8.0. It is free to download from http://create.msdn.com/. Note!You need Windows 8 to use the newest SDK. We use 7.1.

  8. SDK contents • Microsoft Visual Studio [Programming tool] • Expression Blend [Designing tool] • Project templates [Out of the box code] • Windows Phone Emulator [Test app without a device] • Additional tools [Register, deploy apps, etc.]

  9. Testing on device • 1. Register: • Fee is 99 €/year • Up to 100 apps • Students = free! 2. Registration tool 3. Install Zune: http://www.windowsphone.com/en-us/how-to/wp7/zune-software.

  10. Deploy on a device 1. Deployment tool 2. xap file is created on compile. Note!Unlock the device before any operation!

  11. Access to Store • http://create.msdn.com/ • Publish, un-publish • Upgrade apps • Beta publishing • Check statistics • Modify pricing • Monitor crashes MOPSI stats on marketplace

  12. Hello World Task: “Adding a clickable check box to our main page.” When creating a new Solution, under the default project name we can spot the: • MainPage.xaml • MainPage.xaml.cs Double click the MainPage.xaml file.

  13. Hello World Drag and drop CheckBox from Toolbox . XAML code is created in: MainPage.xaml

  14. Compile and Run Debug > StartDebugging [F5] ‘Play’ button shortcut Select test environment

  15. Publish App! Login at http://create.msdn.com/ and complete steps 1 and 2

  16. Part 2Location

  17. Working with Location Native location handling object (watcher) Initialize watcher We want to get position updates often

  18. Working with Location attempt to start location services Complete to handle every state of the watcher. HOMEWORK

  19. Working with Location Taking location from event args Uninitialize Objects

  20. Adding a Map Drag map from ToolBox. Remove extra XAML. Name is enough!

  21. Adding a Marker Open the MainPage.xaml.cs file Change the location to reflect user location. Hint: Study the positionChanged function described earlier. HOMEWORK

  22. Test on Emulator Powerful tool to virtually update the position

  23. Map Credentials We see the following message on the map: Enter a Map Key obtained from the specified URL. Note! Implement a Map Handler if you use maps on more pages. Keep the key in one place because map keys change often.

  24. Part 3JSON, HTTP request

  25. Mobile – Server

  26. JSON {"name": "mopsi","age": 4,"address": {"streetAddress": "länsikatu 15","city": "joensuu"},"users": [{"name": "pasi","location": "länsikatu 15"},{"name": "matti","location": "länsikatu 15"}]} http://json.parser.online.fr/

  27. JSON in Windows Phone Native JSON Support Remember UTF – 8

  28. Subtype Polymorphism base class (superclass) Animal talk(){ // not implemented } subclasses inheritance Cat Dog Duck talk(){ print (“meow”); } talk(){ print (“woof”); } talk(){ print (“quack”); } Animal tom = new Cat(); Animal mopsi = new Dog(); Animal donald = new Duck(); tom.talk(); // prints “meow” mopsi.talk(); // prints “woof” donald.talk(); // prints “quack” http://en.wikipedia.org/wiki/Polymorphism_in_object-oriented_programming

  29. Request types Animal Request Cat Dog Duck LoginReq ShareLocationReq UsersDataReq

  30. Examples Requesting friends active in the last week The process is fully encapsulated!

  31. JSON request base class Serializing as JSON string Need to implement In each subclass

  32. Publically available method talk() from Animal example asynchronous

  33. Sending request information JSON from ToString() method asynchronous {"lat":"62.6","lon":"29.7","request_type":"user_location","userid":"2"}

  34. Reading server response Handling good/bad response

  35. Implementing a subclass location Server has a list of these. User ID is global

More Related