Motiv8 is an application that wants to help keep you on track to complete your tasks/goals through periodically giving you inspiring quotes! Utilize the task list to help you keep track of your tasks and how important they are!
Users can Navigate to the Tasks Tab and Create a new Task using the Floating Action Button. Once save is clicked, the Task is saved locally to Sqlite Database. This database is then used to populate the Task Fragment when there are items within.
The tasks are retrieved from the Database using Room and are then populated into the Task Fragment using a RecyclerView.
Once the "Start Timer" Button is hit, the counter will begin to count down. Use this screen when you're ready to start an activity. There is no stop timer button, so once you start, you have to finish (Unless a new time is selected on the clock)
The Service and Broadcast Receiver are used in conjunction with each other to provide the user with quotes at their desired frequency. Once the "Start Timer" button has been hit, The Service is then started. This service then starts the Broadcast Receiver. The Broadcast Receiver is responsible for pushing notifications.
The Settings Activity allows users to change their preferences of their desired type of quote as well as quote frequency. The Retrofit API call is based on the category value, while the AlarmReceiver repeating frequency is set by the frequency.
- Main Activity
- Timer Fragment
- Task Fragment
- Settings Activity
- Add Task Activity
- NotificationService
- AlarmReceiver
Motiv8 utilizes the MVVM architecture to assist with the seperation of class responsibilities.
The data is represented by two classes, Task and Quote. A Task repository was created to hold the database operations for Adding, Deleting, & Updating. The fields for each are as follows
- ID (For room)
- Title
- Description
- Priority
- Time
Modeled after data retrieved from Inspirational Quotes API
Fields
- Author
- Title
- Link to Quote (Loaded with Picasso)
The TaskViewModel calls the associated database operation from the Task Repository based on user interaction
The Timer Fragment receives the List of tasks from the ViewModel and populates the RecyclerView. The View allows users to Add, Delete, or Update their tasks. Once one of these actions is taken, the associated operation is called in the ViewModel.