Mobile Application Development Assignments
Mobile Application Development Assignments
Homework 1: ListView with ActionMode and Delete/Undo
This assignment requires the implementation of a ListView displaying a list of items of your choice. When a user long-clicks on any row, the ActionMode should be activated. Once activated, a menu item labeled “Delete” should be displayed.
Upon selecting the “Delete” option, the selected row should be removed from the list. After deletion, the application must provide an option to undo the action. This undo functionality may be implemented using a FragmentLayout similar to the Delete/Undo example demonstrated in class.
Alternatively, the undo option may be integrated into the ActionMode menu. Initially, only the “Delete” option is visible. After deletion, the “Delete” option should become invisible, and an “Undo” option should appear.
Homework 2: Bottom Navigation Using Fragments
This assignment requires the development of a basic bottom navigation system using fragments. The main activity layout should include a fragment container (preferably within a FrameLayout) and four buttons positioned at the bottom of the screen.
The first button represents the dashboard or home screen and should display the default fragment when the application launches. The remaining three buttons should each display a different fragment when selected. Users should be able to return to the dashboard fragment by clicking the first button.
Homework 3: Contact Manager with Room Database
This assignment focuses on implementing a contact manager application using the Room persistence library. The application should include a dashboard displaying a list of contacts, along with options to add, edit, and delete contacts.
When adding or editing a contact, a new activity or fragment should be launched. All contact data must be stored in a local Room database. This requires designing a database schema, implementing data insertion, updates, deletion, and retrieval.
If fragments are used for adding or editing contacts, a ViewModel must be implemented to manage shared data. The MainActivity should ideally own the ViewModel and handle database operations through DAO methods.
Homework 4: Sensor App with Charts and ViewModel
This assignment involves modifying the sensor listing application to incorporate ViewModel and fragment-based architecture. Additionally, sensor data should be visualized using charts.
The focus should be on the accelerometer sensor. The application must display three line charts representing the x, y, and z values. Each chart should show the most recent 30 seconds of collected data.
A switch or checkbox must be included to enable or disable smoothing using a low-pass filter on the sensor data.
Homework 5: Step Detection Algorithm Analysis
This assignment requires investigating a potential issue in the custom step detection algorithm, specifically within the removeClosePeaks() method. The issue occurs when three peaks are detected for a single step, potentially leading to incorrect step counting.
Students must collect data for at least 10 windows (over 100 seconds of running), log relevant data before and after processing steps, and store the data in CSV format. Each window should be saved with a unique filename.
The collected data should be analyzed using charting tools such as Excel to identify inaccuracies. A combination of graphical analysis and tabular summaries should be used to present findings.
Homework 6: Proximity Sensor Color Spectrum
This assignment requires modifying a proximity sensor application to display a range of at least five colors as an object moves closer to the device. Different distance thresholds should correspond to different colors, creating a visual spectrum effect.
When the object is beyond the maximum range, the background color should remain green. As the object approaches, the color should change progressively based on predefined distance intervals.
Homework 7: Shake Detection Music Player
This assignment builds on shake detection functionality. The application should store at least three audio files. When the user shakes the device, the application should play the next audio file in sequence.
The app should cycle through the list of songs, ensuring smooth transitions between tracks upon each shake event.
Homework 8: Sound Level Detection App
This assignment involves extending an audio capture application to measure sound levels using the device microphone. The application should not store audio recordings.
Instead, it should use the maximum amplitude value and display sound levels graphically using either a line chart or a bar chart. The visualization should update dynamically to reflect real-time sound intensity.