Mobile App Detection Example
Current Environment:
- Is Mobile App: No
- Platform: N/A
- Version: N/A
- Detection Ready: No
Web Only: This content only appears in the web browser, not in the mobile app.
Platform Renderer - Web: Custom web content
CSS Web Only: This uses CSS classes for conditional display
CSS Mobile App Only: This uses CSS classes for conditional display
CSS Android Only: This uses CSS classes for conditional display
CSS iOS Only: This uses CSS classes for conditional display
Testing Instructions:
Web Browser Test: You should see "Web Only" content above.
Mobile App Test: Open this URL in the Flutter app to see mobile-specific content.
Query Parameter Test: Add ?mobile=true&platform=android to the URL to simulate mobile app.
JavaScript Test: Open browser console and run:
window.isSuperScoalaMobileApp = true;
window.superScoalaPlatform = 'android';
window.superScoalaAppVersion = '1.1.0';
window.dispatchEvent(new CustomEvent('superScoalaMobileReady', {
detail: {
platform: 'android',
version: '1.1.0',
}
}));