AI data-driven health recommendations in mobile app

NOVASOLUTIONS.TECHNOLOGY 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
AI data-driven health recommendations in mobile app
Medium
~1-2 weeks
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
    1052
  • 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

AI-Powered Health Recommendations Based on Data

Most health apps show data. User sees 7,340 steps and closes the app. Recommendation system changes this: instead of "here's your data"—"here's what it means for you today".

Recommendation System Architecture

Personalized health recommendations—not a single ML algorithm. Pipeline of several layers:

  1. Data collection—activity (steps, workouts), sleep, nutrition, biometrics (HR, SpO2, weight)
  2. User profile—age, goals, baseline metrics, behavior patterns
  3. Feature engineering—aggregation into meaningful metrics
  4. Recommendation model—rule engine + ML ranking
  5. Display—specific, relevant, at right moment

Data: HealthKit as Single Point on iOS

class HealthDataAggregator {
    private let store = HKHealthStore()

    func weeklyStats() async throws -> HealthWeekSnapshot {
        async let steps = fetchSum(.stepCount, days: 7)
        async let sleepHours = fetchCategorySamples(.sleepAnalysis, days: 7)
        async let restingHR = fetchAverage(.restingHeartRate, days: 7)
        async let activeEnergy = fetchSum(.activeEnergyBurned, days: 7)

        return try await HealthWeekSnapshot(
            avgDailySteps: steps / 7,
            avgSleepHours: sleepHours,
            avgRestingHR: restingHR,
            totalActiveKcal: activeEnergy
        )
    }
}

On Android—Health Connect SDK (HealthConnectClient) with similar data types. HealthConnectClient.readRecords(StepsRecord::class)—steps query for period.

Rule Engine as Recommendation Base

Rule-based approach—not outdated, but practical. Rules transparent, testable, don't require large training dataset. ML on top adds personalization in ranking.

Example rule structure:

struct HealthRule {
    let id: String
    let condition: (HealthWeekSnapshot) -> Bool
    let recommendation: Recommendation
    let priority: Int
}

let rules: [HealthRule] = [
    HealthRule(
        id: "low_sleep",
        condition: { $0.avgSleepHours < 6.5 },
        recommendation: Recommendation(
            title: "Insufficient sleep reduces recovery",
            body: "Average sleep this week—\($0.avgSleepHours.formatted(.number.precision(.fractionLength(1)))) hours. Try 30 min earlier for 3 days.",
            category: .sleep,
            urgency: .medium
        ),
        priority: 8
    ),
    HealthRule(
        id: "elevated_resting_hr",
        condition: { snapshot in
            guard let hr = snapshot.avgRestingHR else { return false }
            return hr > 80 && snapshot.avgSleepHours < 7
        },
        recommendation: ...,
        priority: 9
    )
]

Combined conditions important: "resting HR 85 bpm" alone might be normal for someone, but combined with poor sleep—overtraining or stress marker.

ML Layer: Ranking and Personalization

Rule engine generates candidate list—recommendations matching conditions. Then ML ranks by user execution probability.

Use collaborative filtering or simple gradient boosting on user + recommendation features:

  • Historical CTR of this recommendation type for user
  • Day-of-week pattern (user more active weekends—activity recommendations more relevant Friday)
  • Streak: user followed recommendation 5 days—boost next recommendation priority

Train on implicit feedback: recommendation shown → user opened → executed (HealthKit data) / ignored.

Timing and Push Notifications

Right moment more important than right content. "Go to bed early" at 8 PM works. At 11:30 PM—doesn't.

func scheduleRecommendation(_ rec: Recommendation) {
    let content = UNMutableNotificationContent()
    content.title = rec.title
    content.body = rec.shortBody
    content.sound = .default

    let bestTime = optimalDeliveryTime(for: rec, userSchedule: userProfile.typicalSchedule)
    let trigger = UNCalendarNotificationTrigger(
        dateMatching: Calendar.current.dateComponents([.hour, .minute], from: bestTime),
        repeats: false
    )
    let request = UNNotificationRequest(identifier: rec.id, content: content, trigger: trigger)
    UNUserNotificationCenter.current().add(request)
}

optimalDeliveryTime—logic based on user patterns: when they typically open app, bedtime (from HealthKit sleep data), workout times.

What Makes Recommendations Work

One specific recommendation daily better than five generic ones. "Walk 2,000 steps today by 6 PM, you're at 1,200"—works. "Move more"—doesn't.

Tie to real-time context: if CMMotionActivityManager shows user walking—don't suggest activity recommendation. Don't irritate.

Development Process

Define data sources and user model schema. Develop rules (15–30 initial set). Implement HealthKit / Health Connect aggregation pipeline. Train ranking model (need data—or synthetic, or pre-launch beta). Delivery system: in-app and push with optimal timing. A/B test effectiveness.

Timeframe Estimates

Rule-based system with basic recommendation set and HealthKit integration—1–2 weeks. Complete personalized system with ML ranking and optimal timing—3–5 weeks.