Habit Tracking Bot in Mobile App

TRUETECH is engaged in the development, support and maintenance of iOS, Android, PWA mobile applications. We have extensive experience and expertise in publishing mobile applications in popular markets like Google Play, App Store, Amazon, AppGallery and others.
Development and support of all types of mobile applications:
Information and entertainment mobile applications
News apps, games, reference guides, online catalogs, weather apps, fitness and health apps, travel apps, educational apps, social networks and messengers, quizzes, blogs and podcasts, forums, aggregators
E-commerce mobile applications
Online stores, B2B apps, marketplaces, online exchanges, cashback services, exchanges, dropshipping platforms, loyalty programs, food and goods delivery, payment systems.
Business process management mobile applications
CRM systems, ERP systems, project management, sales team tools, financial management, production management, logistics and delivery management, HR management, data monitoring systems
Electronic services mobile applications
Classified ads platforms, online schools, online cinemas, electronic service platforms, cashback platforms, video hosting, thematic portals, online booking and scheduling platforms, online trading platforms

These are just some of the types of mobile applications we work with, and each of them may have its own specific features and functionality, tailored to the specific needs and goals of the client.

Showing 1 of 1 servicesAll 1735 services
Habit Tracking Bot in Mobile App
Simple
~2-3 business days
FAQ
Our competencies:
Development stages
Latest works
  • image_mobile-applications_feedme_467_0.webp
    Development of a mobile application for FEEDME
    756
  • image_mobile-applications_xoomer_471_0.webp
    Development of a mobile application for XOOMER
    624
  • image_mobile-applications_rhl_428_0.webp
    Development of a mobile application for RHL
    1054
  • image_mobile-applications_zippy_411_0.webp
    Development of a mobile application for ZIPPY
    947
  • image_mobile-applications_affhome_429_0.webp
    Development of a mobile application for Affhome
    862
  • image_mobile-applications_flavors_409_0.webp
    Development of a mobile application for the FLAVORS company
    445

Implementing a Habit Tracking Bot in a Mobile Application

A user marked a habit as complete three times in a row, then forgot for a week. The streak broke — motivation dropped. The primary goal of a habit tracker is to prevent this from happening. A reminder at the right moment matters more than beautiful design.

Reminder Logic — More Complex Than Just Cron

Naive implementation: cron runs daily at 20:00 — "Don't forget your habits". Works poorly: all notifications arrive simultaneously, users learn to ignore them.

Correct approach: each habit has its own schedule. "Exercise" — 7:00, "Reading" — 21:30, "Meditation" — 8:00 and 22:00. Plus smart reminders: if by 19:00 a habit isn't completed, send a reminder (only if the user enabled this option).

A server-side scheduler (Bull Queue) creates tasks for the next day for each habit of each user. At a scale of 10,000 users with 5 habits each — 50,000 tasks per day. Redis handles this; Bull processes the queue reliably.

User timezone is stored in the profile and factored into scheduling — all calculations in UTC, display in local time.

Mobile Application + Telegram Bot

Two interaction channels: mobile app (primary interface) and Telegram bot (quick marking without opening the app).

In Telegram, one button suffices: "✅ Done" — inline keyboard right in the notification. Tap it — streak is recorded, app updates on next open.

In the mobile app, push notifications with actionable notifications: on iOS via UNNotificationAction with identifier mark_done, on Android via RemoteInput or action button in NotificationCompat. User marks completion directly from the notification shade without opening the app.

Action handling on iOS:

UNUserNotificationCenter.current().delegate = self

func userNotificationCenter(_ center: UNUserNotificationCenter,
  didReceive response: UNNotificationResponse) async {
    if response.actionIdentifier == "mark_done" {
        let habitId = response.notification.request.content
            .userInfo["habit_id"] as? String
        await HabitService.markCompleted(habitId: habitId)
    }
}

Streaks and Gamification

Streak is the key motivational mechanic. Logic: completed today — streak +1, missed a day — streak resets (or give one "grace day" like Duolingo does).

Upon reaching milestones (7 days, 30 days, 100 days), the app sends a "congratulations" push with on-screen animation. In Flutter, lottie animation triggered when processing special FCM payload.

Developing a habit tracker bot + mobile app typically takes 3–5 weeks depending on gamification feature complexity.