skip to content

How to Create Drinking Water Reminder App

 

Creating a drinking water reminder app using MIT App Inventor involves designing the app’s user interface and programming the logic to send reminders. Here’s a step-by-step guide to help you create this app:

There Some following Steps for Designing

1. Setup and Create a New Project

  1. Go to the MIT App Inventor website.
  2. Click on “Create Apps!” and log in with your Google account.
  3. Start a new project by clicking “Start new project” and name it something like “WaterReminder”.

2. Design the User Interface (UI)

  1. Screen1:

    • Title: Set to “Welcome Water Reminder”.
    • Layout: Use VerticalArrangement for better organization.

  1. Components:

    • Labels: Add labels to guide the user.
      • Label1: Set the text to “Welcome to Drinking Water Reminder”.
      • Label2: Instructions or info about the app.
    • Buttons: Add buttons for starting and stopping the reminder.
      • Button1: Set the text to “Start Reminder”.
      • Button2: Set the text to “Stop Reminder”.
    • TimePicker: To set the interval for reminders.
      • TimePicker1: Default interval setter.
    • Clock: Used to trigger reminders.
      • Clock1: Set TimerEnabled to false initially.
      • Set Time Interval: for Example 1 Sec = 1000
    • Sound : To play a sound with reminders.
      • Sound1: Upload a suitable sound file.

Block Coding 

Switch to the Blocks tab to add the logic.

1. Start and Stop Reminder:

  • Button1.Click: Start the reminder..
    • Drag and Drop a Block <when Button1.Click> from Button1 Section
    • Drag and Drop a Block <set Clock1.TimerEnabled> from Clock1 Section
    • Add a Logic True and False Block from Logic Section and set it True to Start Counter
    • Attach all Blocks as Below….

2. Initialize the Clock Timer:

  • When the app starts, set the clock interval using Clock1.Timer to a default value (e.g., 3600000 for 1 hour).
  • Drag a Block <when Clock1.Timer> from Clock1 Section for activating sound alarm
  • Take Another Bock <call Sound1.Play> from Sound1  Section
  • Attach both Blocks like this…..

  • Button2.Click: Stop the reminder.
    • Duplicate the whole Block of Button1.Click
    • Change the condition of <set Clock1.TimerEnabled> from True to False to STOP the Reminder sound.
    • Take Another Bock <call Sound1.Stop> from Sound1  Section
    • Attach all Blocks Like This……

 

Here is the Complete Block Code 

 

There are Some Steps to Generating APK File 

  • Finish Project: Ensure all features are working and any bugs are fixed.
  • Build APK: Click on the “Build” button in the MIT App Inventor interface and select “App (save .apk to my computer).”

  • Download APK: This will compile your app and prompt you to download the APK file to your Phone.
  • Direct Installation
  1. Transfer APK: Move the APK file to your Android device using a USB cable, email, or cloud storage.
  2. Allow Unknown Sources: Enable installation from unknown sources in your device’s settings.
    • SettingsSecurityInstall unknown apps → Select the file source (browser, file manager) and allow.
    • Install: Open the APK file on your device and follow the prompts to install it.