Upload
others
View
2
Download
0
Embed Size (px)
Citation preview
MobileProgramming
Sharif University of Technology
Spring 2016
Lecture 1
Omid Jafarinezhad
AndroiD and IOS
Apps, apps, and more apps
Common app views – Login, Register
Common app views – Stream, Detail
Common app views – Creation, Settings
Common app views – Maps
AndroiD
Mobile app architecture
Views
Controllers Models
Networking Authentication
OS FoundationsUI Core, Event Loop, System Components
Device HardwareGPS, Accelerometer, Bluetooth
Views, controllers and models
Views (objects) Controllers (objects) Models (objects)
The Android Framework
What's in an app: application components
• Activities: An activity is the key execution component. You need at least oneactivity in an app that deals with the UI but you probably will have multiple activity.
• Fragments: Fragments are new to Android but very important in programming the UI. I think of
them as mini-activities.
• Services: Typically services are long running programs that don't need tointeract with the UI. Examples of services could be listening to music, updating the location -- say for a map activity/fragment. Typically an activity will control a service -- that is, start it, pauseit, bind and get data from it.
• Content providers: Apps share data. The nice thing about Android is you can not only callinternal apps such as the camera but you can get data from apps that you might need for yourapplication.
• Broadcast receivers: If an service has data it can initiate broadcasts (something like ``I gotthe location for anyone interested''). The other end of that are components (e.g., an activity) thatare broadcast receivers.
App execution
Android Development Tools
• The Android Software Development Kit (Android SDK)contains the necessary tools to create, compile andpackage Android applications.
• The Android SDK contains the Android debug bridge (adb),which is a tool that allows you to connect to a virtual or realAndroid device, for the purpose of managing the device ordebugging your application.
• The Android SDK contains a tool called dx which convertsJava class files into a .dex (Dalvik Executable) file.
• The Android tooling uses Gradle as build system.
Android Development Tools
• Android Studio includes a debugging toolcalled the Dalvik Debug Monitor Server(DDMS), which provides port-forwardingservices, screen capture on the device, threadand heap information on the device, logcat,process, and radio state information, incomingcall and SMS spoofing, location data spoofing,and more.
Android Development Tools
• Android requires that all apps be digitally signed with a certificate before they can be installed. Android uses this certificate to identify the author of an app, and the certificate does not need to be signed by a certificate authority. Android apps often use self-signed certificates. The app developer holds the certificate's private key.
Android IDE (integrated development environment)
• Android Studio • Eclipse + ADT Plugin• IntelliJ IDEA
• What are the main differences?– Build Tools– Code Completion/Refactoring– User Interface Design– Project Organization– IDE Performance/Stability
Homework 1
• What is the exact difference between
– User Experience (UX),
– Usability, and
– User Interface (UI)?
Course workload
• Programming Assignments : 4 pts
• Final App: 4 pts
• Research Assignments : 2 pts
• Midterm Exam: 5 pts
• Final Exam: 6 pts