1 / 24

Programming YOUR Mobile Phone

Programming YOUR Mobile Phone. Professor Simon M. Lucas School of Computer Science and Electronic Engineering. Mobile (Cell) Phones. First prototype: Motorola 1973 Commercial cell phones : NTT Japan 1979 Motorola 1983 DynaTAC 8000X ($4,000) Subscribers: 300,000 in 1984

lonato
Download Presentation

Programming YOUR Mobile Phone

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. Programming YOURMobile Phone Professor Simon M. Lucas School of Computer Science and Electronic Engineering

  2. Mobile (Cell) Phones • First prototype: Motorola 1973 • Commercial cell phones : • NTT Japan 1979 • Motorola 1983 • DynaTAC 8000X ($4,000) • Subscribers: • 300,000 in 1984 • Over 3,000,000,000 now! • So much more than just a telephone…

  3. Samsung Galaxy S II (2011) • Android phone • GPS, Motion Sensors, Video etc • Powerful processor • 3G WIFI Router! • 1gb RAM + 8 GB Flash mem+ SD • 1.2Ghz dual core processor800 x 480 Super AMOLED Plus screen • Kindle! • Programmable in Java • Very open marketplace for apps • Newer handsets • Faster processors • Even more sensors (e.g. Barometer) • Cleverer: attention detection

  4. Tetris • Developed by Alexei Pajitnov in 1985 • With the help of Dmitry Pavlovsky and Vadim Gerasimov • Popular in the west in 1986 • The classic ‘casual game’ of all time

  5. EA Mobile • Tetris used to top of the sales charts for mobile games • Still popular on smart phones • But no longer tops the charts • Why?

  6. Back to Tetris – See Demo

  7. Tetris and JavaWORA: Write Once, Run Anywhere?

  8. Well, almost… • The Java language may vary slightly between versions available for each platform • New platforms such as Android have significant new APIs • API = Application Programmer Interface • Some effort needed to port an application to a new platform • But at least with Android, you can use the familiar Java language

  9. Developing Mobile Java Apps • Write Java for mobile platform • Using suitable API / platform e.g. Android • Test on emulator or device • Deploy to mobile marketplace? • Or direct to phone • E.g. Google Play • Can be free or paid-for apps • Get detailed download and usage stats • Measure detailed aspects of users / players performance • Use the stats to refine your app… • Game data mining on a massive scale

  10. Software Design

  11. Divide and Conquer

  12. Modelling Tetris: Object Oriented Approach • Objects group together: • Data • Actions that can be performed on them: • Methods • In Java, each object is of a particular class • Programming: design classes • Make objects of those classes • What sort of classes might you design for Tetris?

  13. And we get … • Controller • Main loop + event handling • View • Only concerned with display of game objects • Model • Game model (2d array of blocks) • Shape model

  14. Class Diagram

  15. Main Loop

  16. Event Handling

  17. move() method of Shape

  18. Careful: how not to wait!

  19. Summary • Mobile phones: incredible technology • RF, hardware, telecoms, software • Programming should be (and is!) lots of fun • Java’s a great language – Android is a great mobile platform • Modern IDEs take the pain out of software development • Study computing and electronics: be part of a bright future! • Fortunes to be made in App Development!

More Related