













Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!














Unit Coverage Unit 1 Introduction to Mobile Computing, evolution, mobility concepts, Android/iOS overview, Android architecture, Android Studio, SDK/Gradle, Activity lifecycle, Android components, applied architecture scenarios. Unit 2 UI/UX principles, layouts, widgets, intents, menus, navigation, responsive design, event/gesture handling, accessibility, wireframing/prototyping, applied UI designs.
Main component Purpose Examples Mobile hardware Provides portable computing capability. Smartphone, tablet, smartwatch, laptop, handheld scanner Mobile communication Transfers voice/data cable. without a fixed Wi-Fi, 4G/5G, Bluetooth, NFC, satellite Mobile software Provides the operating environment and applications.^ Android, iOS, mobile banking app, maps app Advantages of Mobile Computing
Mobile Computing vs Traditional Computing Aspect Mobile Computing Traditional Computing Location User can move while using the system. Usually used at a fixed location. Connectivity Mostly wireless and can change networks. Often wired or stable LAN connectivity. Power Battery constrained. Usually continuous mains power.
Screen/Input Smaller screen; touch, voice, sensors. Larger display; keyboard/mouse common. Context Can use GPS, camera, motion and proximity. Usually less context-aware. Resources Resource and thermal limits matter more.^ Typically fewer mobility constraints. -related Applications of Mobile Computing Application area Example Banking UPI/mobile banking and account alerts Healthcare Telemedicine, health monitoring Education Mobile LMS and virtual classrooms Transportation Ride hailing, navigation, ticketing Retail Mobile shopping and payments Business Field sales, inventory, CRM Emergency services Location-based alerts and coordination Mini example: check whether a network is available (Kotlin) val cm = getSystemService(CONNECTIVITY_SERVICE) as ConnectivityManager val network = cm.activeNetwork if (network != null) { Toast.makeText(this, "Network available", Toast.LENGTH_SHORT).show() }
2. Evolution of Mobile Computing and Wireless Communication
Stage Representative development Effect Early portable computing Laptops, pagers, basic cellular phones Portability but limited data capability 2G era Digital voice and SMS Reliable mobile communication 2.5G/3G Packet data and mobile web Internet access on phones Smartphone era Touchscreens, app stores, GPS, cameras Rich application ecosystem 4G High-speed mobile broadband Streaming, real-time apps, cloud services 5G and edge era Higher capacity, low-latency use cases IoT, AR/VR, connected industry, smart mobility
[Mobile Device] ~~~ wireless signal ~~~> [Access Point / Cell Tower] | | +-------- Mobile Application ----------+----> Internet / Cloud Service Mini example: open Wi-Fi settings (Kotlin) val intent = Intent(Settings.ACTION_WIFI_SETTINGS) startActivity(intent)
Important Android Features
Important iOS Features
Android mini example: display a short message (Kotlin) Toast.makeText(this, "Hello Android", Toast.LENGTH_SHORT).show()
5. Android vs iOS: Architecture, Openness, Security and Development Criterion Android iOS Architecture Linux runtime/framework layers.-based stack with Android Apple platform stack with Darwin/XNU foundations and Cocoa Touch frameworks. Openness Core platform is substantially open source; OEM customization is common. Platform is proprietary and tightly controlled. Security model App sandbox, permissions, signing, Play protection mechanisms.^ App sandbox, entitlements, code signing, strict ecosystem controls. Development tool Android Studio + Android SDK + Gradle. Xcode + iOS SDK + Swift toolchain. Testing challenge Many screen sizes, vendors and OS versions.^ Smaller device range but strict Apple platform rules. Customization High for users and manufacturers. Lower, with emphasis on consistency.
6. Android Studio, Android SDK, SDK Manager and Gradle
Mini Gradle dependency example (Kotlin DSL (build.gradle.kts)) dependencies { implementation("androidx.core:core-ktx:VERSION") implementation("androidx.appcompat:appcompat:VERSION") }
7. Creating an Android Project and Understanding Project Structure
app/ |-- manifests/ | -- AndroidManifest.xml |-- kotlin+java/ |-- com.example.app/ - > Kotlin/Java source files |-- res/ | |-- layout/ - > XML screen layouts | |-- drawable/ - > images/shapes | |-- mipmap/ - > launcher icons | |-- values/ - > strings, colors, themes, dimensions | -- xml/ - > configuration XML files |-- build.gradle.kts - > module build configuration-- proguard-rules.pro - > code shrinking/obfuscation rules Folder/file Purpose AndroidManifest.xml Declares app components, permissions, app metadata and intent filters. kotlin+java Application source code. res/layout Classic View-based XML layouts. res/drawable Drawable resources, shapes and images. res/values Strings, themes, colors, dimens and other values. build.gradle.kts Dependencies and build configuration. Mini manifest example (XML)
10. Applied Design: Architecture of an Online Shopping Mobile App
[Login / Product / Cart / Checkout Screens] | v [ViewModel / Presentation Logic] | v [Use Cases: Search, Add to Cart, Pay, Order] | v [Repository Layer] ---> [Local Cache / Room] | +-----------> [REST API / Cloud Backend] | [Products, Orders, Payments DB] Layer Shopping example UI Product list, product details, cart, checkout, order tracking. Presentation logic Maintains screen state and responds to user actions. Domain Price calculation, stock rules, coupon validation, checkout workflow. Data Repository decides whether data comes from local cache or remote API. Backend Authentication, inventory, payment gateway integration, order database. Mini model example (Kotlin) data class Product( val id: Int, val name: String, val price: Double )
11. Android Activity and Activity Lifecycle
onCreate() | v onStart() | v onResume() <---- user can interact with screen | v onPause() |
v onStop() | +----> onRestart() - > onStart() - > onResume() | v onDestroy() Callback Typical purpose onCreate() Initial setup, inflate layout, initialize objects and restored state. onStart() Activity becomes visible. onResume() Activity enters foreground and becomes interactive. onPause() Another screen partially covers it; pause short-lived work. onStop() No longer visible; release heavier visible-only resources. onRestart() Called when a stopped Activity is coming back. onDestroy() Final cleanup before the Activity instance is destroyed.
Activity lifecycle logging example (Kotlin) class MainActivity : AppCompatActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.activity_main) Log.d("LifeCycle", "onCreate") } override fun onResume() { super.onResume() Log.d("LifeCycle", "onResume") } override fun onPause() { Log.d("LifeCycle", "onPause") super.onPause() } }
12. Activity Lifecycle During Screen Rotation
Portrait Activity running | rotate device v onPause() - > onStop() - > onDestroy() | v
override fun onBind(intent: Intent?) = null }
16. Broadcast Receiver: Event-Oriented Component
Broadcast Receiver skeleton (Kotlin) class PowerReceiver : BroadcastReceiver() { override fun onReceive(context: Context, intent: Intent) { Toast.makeText(context, "Power event received", Toast.LENGTH_SHORT).show() } } Advantages Limitations Loose coupling between event sender and receiver. Receiver execution should remain brief. Useful for system/app events. Background execution restrictions can affect behavior. Can trigger app logic without opening a screen. Improper use can create unnecessary battery/network work. Supports custom in-app broadcast patterns. Sensitive events/data require careful security design.
17. Content Provider: Structured Data Sharing
Query the contacts provider (simplified) (Kotlin) val cursor = contentResolver.query( ContactsContract.Contacts.CONTENT_URI, null, null, null, null ) cursor?.use { while (it.moveToNext()) { val name = it.getString( it.getColumnIndexOrThrow(ContactsContract.Contacts.DISPLAY_NAME) ) Log.d("Contact", name) } }
18. Applied Design Using All Four Android Components
Component Role in the example app Activity Shows song list, player controls and settings. Service Keeps music playback active when the Activity is not visible. Broadcast Receiver Responds to headset, connectivity, or custom playback- control events. Content Provider Shares selected playlist/catalog data with trusted clients.
[Activity / Player Screen] | start/control v [Music Service] <---- [Broadcast Receiver] | +---- reads/writes ----> [App Database] ^ | [Content Provider] - > authorized client
19. Choosing the Correct Android Component for Common Scenarios Scenario Recommended component(s) Reason Music player Activity + foreground Service Activity provides controls; Service keeps playback running. Alarm application Broadcast Receiver + scheduling API + Activity^ Receiver handles scheduled e Activity configures alarm. vent; SMS notification Broadcast/event handling + Notification; Activity if user opens details Event-oriented handling is needed; UI is optional until user interacts. Contacts application Activity + Content Provider/ContentResolver UI displays contacts; provider gives structured access to contact data. 20. Impact of Mobile Computing on Modern Business Positive impact Business effect Real-time access Managers and staff make faster decisions. Mobile commerce Customers can purchase and pay from anywhere. Field automation Sales, service and logistics staff update data on-site. Location services Delivery tracking, nearby offers and route optimization. Remote work Teams collaborate away from offices. Customer engagement Push notifications, in-app support and personalized services.
23. LinearLayout
LinearLayout example (XML)
24. RelativeLayout
RelativeLayout example (XML)
25. ConstraintLayout
ConstraintLayout example (XML)
app:layout_constraintTop_toTopOf="parent" />
26. FrameLayout
FrameLayout example (XML)
27. Comparing Layouts and Selecting a Layout for a Login Screen Need Suggested layout Reason Very simple vertical form LinearLayout Easy to read and implement. Legacy relative rules RelativeLayout Supports relative positioning but is less preferred for new complex screens. Responsive login with logo, fields, button and constraints ConstraintLayout^ Flexible placement with a flatter hierarchy. Single content host or overlay FrameLayout Designed for stacking/hosting rather than form arrangement.
28. Common Android Widgets Widget Purpose Typical use TextView Displays text. Title, label, output text Button Triggers an action. Login, Submit, Save ImageView Displays an image/drawable. Logo, product image, icon EditText Accepts editable text input. Name, email, password CheckBox Independent yes/no option. Accept terms, interests RadioButton One option in a mutually exclusive group. Gender/type/category selection Switch On/off setting. Notifications enabled Spinner Compact list selection. Choose city/category Simple TextView + Button + EditText + ImageView (XML)
startActivity(intent)
32. Menus in Android
Menu type Use Options/App-bar menu Global actions for the current screen such as Search, Settings, Refresh. Context menu / contextual action Actions related to a selected item. Popup menu Small menu anchored to a particular view such as a three button. -dot PopupMenu example (Kotlin) val popup = PopupMenu(this, moreButton) popup.menuInflater.inflate(R.menu.item_menu, popup.menu) popup.setOnMenuItemClickListener { item - > Toast.makeText(this, item.title, Toast.LENGTH_SHORT).show() true } popup.show()
33. Navigation Components
Navigate using a NavController (Kotlin) findNavController(R.id.nav_host_fragment) .navigate(R.id.action_homeFragment_to_detailsFragment)
34. Responsive UI Design
Technique Purpose Use dp for dimensions Keeps densities.^ physical UI size more consistent across screen Use sp for text Respects scaled text/user font preferences. Constraint-based layouts Allows elements to adapt instead of using fixed coordinates. Resource qualifiers Provide alternatives such as different layouts/dimens for larger screens. Flexible containers/lists RecyclerView and adaptive containers handle varying content. Test orientation and large screens Prevents clipping and inefficient use of tablet space.
Responsive dimension example (XML)
35. Applied Responsive Design for Smartphones and Tablets
PHONE (compact width) TABLET (expanded width) +---------------------+ +------------------------------+ | Product List | | Product List | Product Detail| | tap item - > detail | | | | +---------------------+ +------------------------------+
36. Event Handling in Android
Button click event (Kotlin) val button = findViewById(R.id.btnSave) button.setOnClickListener { Toast.makeText(this, "Saved", Toast.LENGTH_SHORT).show() } CheckBox checked-change event (Kotlin) checkBox.setOnCheckedChangeListener { _, isChecked - > statusText.text = if (isChecked) "Enabled" else "Disabled" }
37. Gesture Handling
Very small GestureDetector example (Kotlin) val detector = GestureDetector(this, object : GestureDetector.SimpleOnGestureListener() { override fun onDoubleTap(e: MotionEvent): Boolean { Toast.makeText(this@MainActivity, "Double tap", Toast.LENGTH_SHORT).show() return true } }) view.setOnTouchListener { _, event - > detector.onTouchEvent(event) }
[Send] [Pay] [Deposit] Recent Transactions Grocery - Rs. 1200 Salary + Rs. 50000 ---------------------------- Home Pay Cards More+----------------------------+
41. High-Fidelity Prototype for an Online Shopping Application Screen Important UI elements Home Search, categories, recommendations, product navigation.^ cards, bottom Product details Large image, title, price, rating, variants, Add to Cart button. Cart Items, quantity controls, price summary, remove action, checkout. Checkout Address, delivery, payment method, order summary, place order action. - Order tracking Order status timeline, delivery details, support link.
42. Navigation Flow for a Food Delivery Application
[Splash/Login] | v [Home / Restaurants] ---> [Restaurant Details] ---> [Cart] | | v v [Search] [Checkout] | v [Order Tracking]
43. Layout Recommendation for a Complex E-Commerce Screen
44. Integrated Example: Registration UI with Layout, Widgets and Event Handling Registration click validation (Kotlin) val name = etName.text.toString().trim() val email = etEmail.text.toString().trim() btnRegister.setOnClickListener { when { name.isBlank() - > etName.error = "Name required" email.isBlank() - > etEmail.error = "Email required" !cbTerms.isChecked - > Toast.makeText(this, "Accept terms", Toast.LENGTH_SHORT).show() else - > Toast.makeText(this, "Registration successful", Toast.LENGTH_SHORT).show() } }
45. User-Friendly Healthcare Application Interface Design requirement Recommended approach Clarity Use plain labels such as Appointments, Medicines, Reports. Safety Confirm destructive or critical actions and clearly identify patient/account context. Accessibility Large readable text, high contrast, scalable fonts, descriptive icons. Navigation Keep primary tasks reachable from a simple bottom navigation or dashboard. Privacy Avoid displaying sensitive information unnecessarily on shared screens/notifications. Error prevention Validate forms and provide clear recovery guidance.
| Good Morning | | [Book Appointment] | | [My Medicines] | | [Lab Reports] |
[Emergency Contact] Home Appointments Profile+----------------------------+
46. Framework for Evaluating an Existing Mobile Application
Area Possible improvement examples Usability Reduce unnecessary steps in checkout/login. Accessibility Add missing content descriptions and improve contrast. Navigation Make back behavior predictable and keep primary destinations consistent.