CS 5103 Software Engineering Lecture 06 Introduction to

  • Slides: 50
Download presentation
CS 5103 Software Engineering Lecture 06 Introduction to Project I Android Development I

CS 5103 Software Engineering Lecture 06 Introduction to Project I Android Development I

Last class Ø UML Ø Use case diagram Ø Ø Object oriented approach for

Last class Ø UML Ø Use case diagram Ø Ø Object oriented approach for design Ø Class diagram Ø 2 Identification of use cases Ø Legend Ø Class Relationships Sequence diagram

Today’s class Ø Ø 3 Projects Ø Process and Evaluation Ø Requirements Ø Calendar

Today’s class Ø Ø 3 Projects Ø Process and Evaluation Ø Requirements Ø Calendar Ø SMS Messenger Ø Contact Manager Ø Book Shelf Android Development I Ø Android system & Emulator Ø Environment Setup

Introduction to Project: phase I Process Ø Ø Form a group Ø Pick a

Introduction to Project: phase I Process Ø Ø Form a group Ø Pick a topic Ø Requirement Engineering Ø Design Ø Implementation Ø Testing and documentation

Form a group Organization Ø Ø 4 -5 people Ø Inform me by next

Form a group Organization Ø Ø 4 -5 people Ø Inform me by next class Ø Inform me if you do not have a group Work assignments Ø Ø Ø You decide the way to manage the group and assign work There can be some people working only on some phase of the project, e. g. , requirement, testing

Pick a topic Predefined topic Ø Ø Will introduce the topics later Ø Tell

Pick a topic Predefined topic Ø Ø Will introduce the topics later Ø Tell me by next Thursday which one you choose Other topics Ø Ø You can choose other topics, but it should be still be an android project Tell me by Next Tuesday, if you want to work on other topics We can schedule a time to talk about the details

Requirement Engineering I am a customer Ø Ø I will provide my requirements in

Requirement Engineering I am a customer Ø Ø I will provide my requirements in natural language Ø It is not a specification, and no much details Deliverable Ø Requirement Documents: Ø Ø Use case diagrams Ø Natural language specification Ø Deadline: Sept. 22 nd Ø I may give you feedbacks after you hand in the documents

Design Deliverable Ø Ø Class diagram Ø Sequence diagrams for two classes Ø Deadline:

Design Deliverable Ø Ø Class diagram Ø Sequence diagrams for two classes Ø Deadline: Oct. 6 th Ø You may change you design after hand in your design documents

Implementation Deliverable Ø Ø Source Code Ø Binary Code Ø Deadline: Nov. 10 th

Implementation Deliverable Ø Ø Source Code Ø Binary Code Ø Deadline: Nov. 10 th Ø Ø Note: unit test cases should be included in implementation Presentation & Demo: Nov. 17 th and Nov. 19 th

Implementation Presentation Ø Ø All people should present part of their work Ø Talk

Implementation Presentation Ø Ø All people should present part of their work Ø Talk about problems met during development Ø run major features of the app

Testing & Documentation Testing Ø Ø System testing Ø Test cases and results Documentation

Testing & Documentation Testing Ø Ø System testing Ø Test cases and results Documentation Ø Ø Ø Test documents Ø API documents (using Javadoc) Ø User guide Deadline: Nov. 20 th

Evaluation Ø Project quality Ø Documentation Ø Process quality Ø Presentation Ø Teamwork &

Evaluation Ø Project quality Ø Documentation Ø Process quality Ø Presentation Ø Teamwork & work assignments

Project quality Evaluation base: code Ø Ø Whether all features implemented Ø Bugs found

Project quality Evaluation base: code Ø Ø Whether all features implemented Ø Bugs found Ø Coding style Ø Comments Ø Unit test case quality

Documentation Quality Evaluation base: documents Ø Ø Specification, design documents, API documents, test documents,

Documentation Quality Evaluation base: documents Ø Ø Specification, design documents, API documents, test documents, user guide Ø Correctness Ø Whether go into details Ø Whether well structured

Process Quality Evaluation base: version-control system commits Ø Ø You must use a version

Process Quality Evaluation base: version-control system commits Ø Ø You must use a version control system: SVN or Git are recommended, add me as a user Ø Reasonable progress Ø Size of code commit Ø Maturity of commit

Presentation Evaluation base: demo & presentation Ø Ø Show understanding of the project Ø

Presentation Evaluation base: demo & presentation Ø Ø Show understanding of the project Ø Demo goes smoothly

Teamwork Evaluation base: email record, svn commits, work assignments Ø Ø Balanced workload Ø

Teamwork Evaluation base: email record, svn commits, work assignments Ø Ø Balanced workload Ø Interactions in email record and svn commits

Today’s class Ø Ø 18 Projects Ø Process and Evaluation Ø Requirements Ø Calendar

Today’s class Ø Ø 18 Projects Ø Process and Evaluation Ø Requirements Ø Calendar Ø SMS Messenger Ø Contact Manager Ø Book Shelf Android Development I Ø Android system & Emulator Ø Environment Setup

Calendar-requirements Ø Views Ø Monthly view: show event snippet for each day Ø Weekly

Calendar-requirements Ø Views Ø Monthly view: show event snippet for each day Ø Weekly view: show event snippet for each day Ø Daily view: show all events in a time line Ø 19 Agenda view (optional): show all events in future as a list

Calendar-requirements Ø 20 Events Ø Add events with time frame Ø Check conflicts Ø

Calendar-requirements Ø 20 Events Ø Add events with time frame Ø Check conflicts Ø Add periodical events Ø Edit & delete events Ø Event alert (Optional) Ø Add/delete event categories Ø Color marking for different category of events

Calendar-requirements Ø Share (optional) Ø Ø 21 Send event to other calendar users (requiring

Calendar-requirements Ø Share (optional) Ø Ø 21 Send event to other calendar users (requiring their permission) through internet Other Ø Colored holidays & weekends Ø Zoom in/out, and scroll support when necessary

SMS Messenger Requirements Ø 22 Messages Ø View, edit, save as draft, delete Ø

SMS Messenger Requirements Ø 22 Messages Ø View, edit, save as draft, delete Ø Send & receive Ø Reply & forward Ø Search messages Ø Send to multiple receivers (optional) Ø Scheduled message (optional) Ø Auto reply (optional)

SMS Messenger Requirements Ø Phone Numbers Ø Ø Ø 23 Show contact name in

SMS Messenger Requirements Ø Phone Numbers Ø Ø Ø 23 Show contact name in message when the phone number is in the stock contact app Save a new number to the stock contact app When sending a message, a user can choose to select from contact or input a new number

SMS Messenger Requirements Ø Message organization Ø Ø 24 Categorize messages by phone number

SMS Messenger Requirements Ø Message organization Ø Ø 24 Categorize messages by phone number (contact name) Conversation view: view all messages between you and a certain contact, sorted by sending/receiving time Ø Other Ø Zoom in/out and scroll whenever necessary

Contact Manager Requirements Ø Contacts Ø Add, view, edit, delete contacts Ø Support multiple

Contact Manager Requirements Ø Contacts Ø Add, view, edit, delete contacts Ø Support multiple phone numbers Ø Support adding a photo label to a contact Ø Search contacts Ø Blacklist (block SMS and Phones) Ø 25 Directly make phone calls and send sms from contact

Contact Manager Requirements Ø Ø 26 Contacts Organization Ø Add contact groups Ø Manage

Contact Manager Requirements Ø Ø 26 Contacts Organization Ø Add contact groups Ø Manage contact groups (add/remove contacts) Ø Sort contacts by name / group name Contacts Storage (optional) Ø Export contacts to file on SD card Ø Load contacts from file on SD card

Contact Manager Requirements Ø Ø Extract contacts (optional) Ø Extract contacts from stock contact

Contact Manager Requirements Ø Ø Extract contacts (optional) Ø Extract contacts from stock contact app Ø Extract contacts from social media websites Other Ø Ø 27 Show contact name when making / receiving calls & sending / receiving messages using stock app Zoom in/out and scroll whenever necessary

Bookshelf requirements Ø Book management Ø 28 Load books: support. txt and. pdf (.

Bookshelf requirements Ø Book management Ø 28 Load books: support. txt and. pdf (. epub optional) from SD card and Download folder Ø Delete books Ø Add category of books Ø Manage categories (add/remove books) Ø Search books

Bookshelf requirements Ø Book reading Ø Ø Ø 29 Swipe to go to next/previous

Bookshelf requirements Ø Book reading Ø Ø Ø 29 Swipe to go to next/previous page Extract chapters and directly go to certain chapters (optional) Bookmark page and go to the bookmark page (optional for. pdf) Ø Change font and size (optional) Ø Day & night mode (optional for. pdf) Ø Search for word and go to the word (optional for. pdf)

Bookshelf requirements Ø Ø Book notations (optional) Ø Add notation to certain page Ø

Bookshelf requirements Ø Ø Book notations (optional) Ø Add notation to certain page Ø View notations on page with notations Ø Edit notations Ø View all notations for a book Ø Delete notations Other Ø 30 Zoom in/out and scroll whenever necessary

Today’s class Ø Ø 31 Projects Ø Process and Evaluation Ø Requirements Ø Calendar

Today’s class Ø Ø 31 Projects Ø Process and Evaluation Ø Requirements Ø Calendar Ø SMS Messenger Ø Contact Manager Ø Book Shelf Android Development I Ø Android system & Emulator Ø Environment Setup

Android Development I Ø History of android Ø An open source mobile operating system

Android Development I Ø History of android Ø An open source mobile operating system Ø Oct 2003: Palo Alto Ø Andy ØA digital camera system at beginning Ø Aug Ø Oct. 2005: acquired by Google 2008: HTC dream, the first android phone Ø Most Ø 1 Rubin, and 3 other colleagues popular mobile system (market share 50%+) million plus apps

Android Development I Ø Introduction to Android Ø Based on Linux system Ø The

Android Development I Ø Introduction to Android Ø Based on Linux system Ø The programming language is Java Ø Jar files are transformed to app Ø Apps are installed to the system, and then executed on the Dalvik virtual machine Ø Dalvik VM: a variant of JVM Ø Why? Smaller code size.

Android Development I

Android Development I

Android stock apps Ø Also called built-in apps Ø Apps included in the android

Android stock apps Ø Also called built-in apps Ø Apps included in the android system / sdk Ø Like IE in windows Ø Including: phone, sms messenger, contact manager, web browser, clock, etc.

Emulator Ø Ø People do not want to develop software using mobile device directly,

Emulator Ø Ø People do not want to develop software using mobile device directly, why? Ø Too slow Ø Hardware incompatibilities Ø Handling of multiple devices Emulator Ø A virtual android mobile phone running on the host machine

Emulator looks like…

Emulator looks like…

Emulator Ø Simulates almost everything about a mobile phone Ø Run apps Ø Time

Emulator Ø Simulates almost everything about a mobile phone Ø Run apps Ø Time Ø Make/receive phone calls, send/receive messages Ø Phone rotation Ø Battery level, AC on / off Ø GPS locations Ø Audio recording

Emulator Ø Something it currently cannot do Ø Take pictures / record video (Just

Emulator Ø Something it currently cannot do Ø Take pictures / record video (Just have it with web camera) Ø Ø Most Sensors Other Positions (except for portrait and landscape) Ø Light Ø Phone specific devices, such as infrared emitter

Interactions between emulator and your host system Ø Ø The emulator can access internet

Interactions between emulator and your host system Ø Ø The emulator can access internet Adb tool set to transfer data between the emulator and the host system Telnet to 5554 to control the emulator (providing a shell of the emulator) Emulators can interact with each other

Android Development Ø Download Android Studio Ø https: //developer. android. com/sdk/index. html Ø Extract

Android Development Ø Download Android Studio Ø https: //developer. android. com/sdk/index. html Ø Extract the zip file Ø Start

Create An Android project Ø Go to new project Ø Select Android Ø Input

Create An Android project Ø Go to new project Ø Select Android Ø Input a name for you project Ø Click next for all steps

Create a new virtual device Ø Go to virtual device manager Ø Add a

Create a new virtual device Ø Go to virtual device manager Ø Add a device Ø Give a name to the virtual device Ø Select memory, SD card, etc.

Compile and Run Ø Create the hello world android project Ø Run as an

Compile and Run Ø Create the hello world android project Ø Run as an android project Ø Ø Wait for the system to start and go to the app hello world And that’s it!

Accelerated Emulator l l l http: //stackoverflow. com/questions/2662650/ making-the-android-emulator-run-faster Enable Intel virtual machine support:

Accelerated Emulator l l l http: //stackoverflow. com/questions/2662650/ making-the-android-emulator-run-faster Enable Intel virtual machine support: http: //stackoverflow. com/questions/21635504 /error-during-installing-haxm-vt-x-notworking

Today’s class Ø Ø 46 Projects Ø Process and Evaluation Ø Requirements Ø Calendar

Today’s class Ø Ø 46 Projects Ø Process and Evaluation Ø Requirements Ø Calendar Ø SMS Messenger Ø Contact Manager Ø Book Shelf Android Development I Ø Android system & Emulator Ø Environment Setup

Next class Ø UML Ø Ø 47 Sequence Diagram Software Design Ø Software architecture

Next class Ø UML Ø Ø 47 Sequence Diagram Software Design Ø Software architecture styles Ø MVC architecture

Thanks! 48

Thanks! 48

Android Development Ø Install Eclipse ADT Ø Go to eclipse, Help - > Install

Android Development Ø Install Eclipse ADT Ø Go to eclipse, Help - > Install New Software Ø Input Ø Ø https: //dl-ssl. google. com/android/eclipse/ Install components

Android Development Ø Download Android SDK Ø http: //developer. android. com/sdk/index. html#Exist ing. IDE

Android Development Ø Download Android SDK Ø http: //developer. android. com/sdk/index. html#Exist ing. IDE Ø Ø Ø Extract the zip file Open SDK Manager. exe for update (usually no updates) Start eclipse