Building a Custom Kiosk Mode Solution: Balancing Control and Reliability

Karan Champaneri / Senior Mobile Developer

In the world of mobile device management, ensuring the uninterrupted operation of applications in a controlled, private environment can be a complex challenge. Recently, we encountered a scenario where our React Native-based Android application needed to run 24x7 on a host of devices in a private network. To maintain control and prevent manual interruptions, we explored Mobile Device Management (MDM) solutions. However, not all MDM solutions provided the necessary features, and device compatibility became an issue. Ultimately, we adopted a custom approach, building a lightweight Kiosk Mode using Android Lock Task Mode and implementing a Watchdog Service.

In this extensive blog post, we'll delve into our solution, discussing the pros and cons of ready-made MDM solutions versus custom solutions, and exploring the benefits and side-effects of running a Watchdog service for application monitoring.

The Challenge: 24x7 Operation in a Private Network

Our Android application operates in a private network and is expected to run continuously without manual interruptions. However, several challenges arose:

  • Control: We needed a way to prevent users from manually exiting or disrupting the application. Android devices typically allow users access to system settings, which can pose a threat to uninterrupted operation.

  • Device Compatibility: We operated various Android devices with different OS versions and firmware, making it challenging to find a single MDM solution that worked consistently well across all devices.

  • Custom Features: The application required custom features and policies that were not easily achievable with standard device settings. We needed a solution that allowed for fine-grained control over the application's behavior.

The Solution: Building a Custom Kiosk Mode

To address these challenges and ensure reliable 24x7 operation, we took a custom approach, building our Kiosk Mode solution using Android Lock Task Mode and implementing a Watchdog Service. Here's how it works:

1. Android Lock Task Mode for Kiosk Mode

Android's Lock Task Mode, also known as "Kiosk Mode," allows you to lock a device into running a single app while preventing users from accessing system settings or other apps. Here's how we leveraged this feature:

  • Single App Mode: We configured the devices to run our React Native-based Android application exclusively. This prevented users from accessing other apps or system settings.

  • User Restrictions: Android's Lock Task Mode allowed us to impose user restrictions, ensuring that no manual interruptions or exits from the application were possible.

  • Custom Features: We used Android Lock Task Mode to enforce custom features like Brightness Dimming, Screen Off, and Active Mode, providing fine-grained control over the application's behavior.

2. Watchdog Service for Monitoring

In addition to Android Lock Task Mode, we developed a Watchdog Service, a separate Android application that continuously monitored the main application in use. Here's how it improved reliability:

  • Application Health: The Watchdog Service regularly checked the health of the main application. If the main application became unresponsive or crashed, the Watchdog could restart it automatically, ensuring continuous operation.

  • Logs and Alerts: The Watchdog Service logged information about the application's behavior and sent alerts in case of anomalies. This allowed us to proactively address issues and maintain uptime.

  • Device Compatibility: The Watchdog was designed to work consistently across various Android devices and OS versions, providing a uniform monitoring solution.

Pros and Cons: Building vs. Using MDM Solutions

Our custom Kiosk Mode solution using Android Lock Task Mode and a Watchdog Service offered several advantages over ready-made MDM solutions. However, it's essential to weigh the pros and cons of building your solution versus using off-the-shelf MDM solutions:

Pros of Building a Custom Solution

1. Full Control

  • Custom solutions provide complete control over device behavior and application behavior, allowing for tailored configurations.

2. Flexibility

  • Custom solutions can adapt to unique requirements, accommodating specific features and policies.

3. Device Compatibility

  • Custom solutions can be fine-tuned to work reliably across a range of Android devices and OS versions.

4. Cost Control

  • Building a custom solution can offer cost savings compared to subscription-based MDM solutions. For exaple, we have a test MDM account with around 4 devices that costs $500 a year but only provides 200Mb in App storage.

Cons of Building a Custom Solution

1. Development Effort

  • Building and maintaining a custom solution requires ongoing development effort and resources. This is the most significant factor, IT'S NOT EASY TO BUILD MDM SOLUTION.

2. Complexity

  • Custom solutions may introduce complexity, especially if multiple applications and devices need management.

3. Maintenance

  • Ongoing maintenance and updates are necessary to ensure the solution remains effective and secure.

Benefits and Side-Effects: Watchdog Service

Running a Watchdog Service alongside our custom Kiosk Mode solution had notable benefits and side-effects:

Benefits of Watchdog Service

  • Application Reliability: The Watchdog Service significantly improved application reliability by monitoring and restarting the main application as needed.

  • Proactive Issue Detection: Logs and alerts from the Watchdog Service allowed us to identify and address issues before they impacted users.

  • Device Compatibility: The Watchdog was designed to work consistently across various Android devices, providing a uniform monitoring experience.

Side-Effects of Watchdog Service

  • Resource Utilization: The Watchdog Service consumes device resources, including CPU and memory, which can impact overall device performance.

  • Battery Consumption: Continuous monitoring may lead to increased battery consumption, especially on devices with limited power sources.

  • Complexity: Introducing a Watchdog Service adds complexity to the overall solution, requiring its development and maintenance.

Conclusion: Finding the Right Balance

In our quest to ensure reliable 24x7 operation in a private network, we found that building a custom Kiosk Mode solution using Android Lock Task Mode and a Watchdog Service offered us the control and reliability we needed. While ready-made MDM solutions provide convenience and ease of use, they may not always meet unique requirements or work consistently across diverse devices.

Organizations should carefully evaluate their needs and weigh the advantages of building a custom solution against the complexity and maintenance efforts involved. Our experience demonstrates that a well-designed custom approach can provide the control, flexibility, and reliability required for 24x7 operation, even in challenging environments.

MDM Services We are using:

Reference Links:

More articles

The Arrows, Not the Boxes: Systems Thinking for AWS Architects

You can configure an ALB flawlessly and explain IAM policies from memory. But can you articulate why an ALB is better than an NLB for your specific constraints? The different between "knowing AWS services" and "thinking in systems" is what separates engineers who implement from architects who design.

Read more

AWS CodeCommit Returns: What the Reversal Means for You

In an unprecedented reversal, AWS has restored CodeCommit to general availability after deprecating it in July 2024. This decision validates teams that remained committed to AWS-native git repositories while leaving migrated teams questioning their investment.

Read more

Tell us about your project

Our office

  • 425, Avadh Kontina
    Vip Road, Canal Road Corner, near CB patel club
    Surat, Gujarat 395007
    Google Map

© 2025 APPGAMBiT. All rights reserved.