Native Page Focus

Content Type: Widget
Categories: User Interface,Mobile,Visualization

Overview

Automatically trigger actions when users navigate between pages in your native mobile app - perfect for analytics, data refresh, and user experience optimization.

 

Transform your native mobile app's user experience with intelligent page focus detection. The Native Page Focus widget seamlessly monitors when users enter or exit pages, enabling you to create responsive, data-driven applications that react to user navigation patterns.

Documentation

Typical usage scenario

The Native Page Focus widget is designed for developers who need to execute specific actions when users navigate between pages in their native mobile applications. This widget is particularly useful for:

  • Analytics and tracking: Monitor user behavior by tracking when users enter or leave specific pages
  • Data refresh scenarios: Automatically refresh data when users return to a page (e.g., refreshing a news feed when the user navigates back to the home screen)
  • Resource management: Clean up resources or pause expensive operations when users leave a page
  • User experience enhancement: Show welcome messages, tips, or notifications when users arrive at important pages
  • Business logic automation: Trigger workflows based on user navigation patterns

Common use cases include e-commerce apps that need to refresh product availability when users return to catalog pages, social media apps that refresh feeds on focus, or business apps that need to sync data when users navigate to dashboard pages.

 

Features and limitations

Features:

  • Detects page focus events (when a page gains focus)
  • Detects page blur events (when a page loses focus)
  • Supports both nanoflows and microflows as action handlers
  • Works offline - no internet connection required for focus detection
  • Lightweight implementation with minimal performance impact
  • Compatible with React Navigation used in Mendix native apps
  • No visual interface - works invisibly in the background

Limitations:

  • Native mobile only - does not work in web or hybrid mobile apps
  • Actions are optional but at least one should be configured for the widget to be useful
  • Widget must be placed on each page where focus detection is needed

 

Dependencies

No additional marketplace modules or external libraries need to be downloaded separately.

 

 

Known bugs

Currently, there are no known critical bugs.

 

Frequently Asked Questions

Q: Can I use the same widget instance to handle focus events for multiple pages?

A: No, you need to place a separate widget instance on each page where you want to detect focus events.

 

Q: What's the difference between page focus and page load events?

A: Page focus events trigger every time a user navigates to a page (including returning from other pages), while page load events only trigger when a page is first loaded into memory.

 

Q: Can I pass parameters to the focus/blur actions?

A: The actions are executed in the context of the current page, so they have access to the page's context object and any page parameters that were passed during navigation.

 

Q: Does this widget affect app performance?

A: The widget has minimal performance impact as it only registers lightweight event listeners and executes actions when focus changes occur.

 

Q: Can I use this widget with offline apps?

A: Yes, the widget is fully offline-capable. Focus detection works regardless of internet connectivity.

Releases

Version: 2.0.0
Framework Version: 10.24.0
Release Notes: Initial version