IoT Sensor Threshold Settings via 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
IoT Sensor Threshold Settings via 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
    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

IoT Sensor Threshold Configuration via Mobile Application

Thresholds — sensor normal boundaries: above +28°C — warning, below +5°C — critical, send push. User configures these boundaries in the app, server stores them and generates alerts on violation. Task seems simple but requires careful UX and reliable backend sync.

UI for Threshold Configuration

Numeric input fields are a poor choice for thresholds. Users don't remember parameter range, see no context. Better — Range Slider showing current sensor value on the same scale.

On Android Compose — custom RangeSlider or Slider from Material3. Standard Material3 RangeSlider supports two sliders:

var thresholds by remember { mutableStateOf(sensor.minThreshold..sensor.maxThreshold) }

Column {
    Text("Temperature: ${sensor.currentValue}°C")
    Text("Allowed range: ${thresholds.start.roundToInt()}°C — ${thresholds.endInclusive.roundToInt()}°C")

    RangeSlider(
        value = thresholds,
        onValueChange = { thresholds = it },
        valueRange = sensor.absoluteMin..sensor.absoluteMax,
        steps = 0,
        onValueChangeFinished = {
            viewModel.updateThresholds(sensor.id, thresholds.start, thresholds.endInclusive)
        }
    )
}

onValueChangeFinished — send to server only after slider release, not on every movement. Otherwise API request spam during dragging.

Show current sensor value on slider scale — vertical mark. Via Canvas above slider: calculate X position from (currentValue - min) / (max - min) * sliderWidth.

Threshold Types

Different parameters need different configurations:

Parameter Logic Example
Temperature Lower + upper bound +5°C … +25°C
Motion Only boolean trigger Detected/not
CO2 Level Only upper bound > 1000 ppm
Pressure Lower + upper + rate of change < 950 or > 1050 hPa

Don't try one universal component for all. Better — specialized set: BooleanThreshold, SingleBoundThreshold, RangeThreshold. Different config screens for different sensor types.

Server Sync and Local Cache

Thresholds stored on server, applied on server when processing telemetry. Mobile app is UI only.

On screen open: load current thresholds from server, display. On change: save locally (optimistic update), send to server, rollback on error.

fun updateThreshold(deviceId: String, min: Float, max: Float) {
    val previous = _thresholds.value
    // Optimistic update
    _thresholds.update { it.copy(minValue = min, maxValue = max) }

    viewModelScope.launch {
        val result = repository.saveThreshold(deviceId, min, max)
        if (result.isFailure) {
            // Rollback
            _thresholds.value = previous
            _events.emit(UiEvent.ShowError("Failed to save settings"))
        }
    }
}

Optimistic update makes UI responsive — user doesn't wait for server. Rollback protects against data loss on network error.

Notifications on Threshold Violation

Alerts arrive via push (FCM/APNS). Payload must contain device_id, parameter, current_value, threshold_exceeded — so app can open right screen on tap.

On Android: setNotification() in FCM payload only if app in background. For foreground — FirebaseMessagingService.onMessageReceived() with local NotificationManager. Different channels (NotificationChannel) for warnings and critical alerts — different sounds and priorities.

Implementing threshold configuration with Range Slider, optimistic update, and push alerts: 2–3 weeks. Pricing calculated individually.