Android Agent
📄️ Quickstart
Get your NetFUNNEL 4 Android Agent up and running in 5-10 minutes with this quickstart guide.
📄️ Installation & Initialization
This guide covers the essential setup steps for integrating the NetFUNNEL Android Agent into your application.
🗃️ Integration Methods
2 items
📄️ Initialization Option Reference
Complete reference for all NetFUNNEL Android Agent configuration options and parameters.
📄️ API Reference
Complete reference for NetFUNNEL Android Agent functions, callbacks, and response formats.
📄️ Troubleshooting & FAQ
Common issues, solutions, and frequently asked questions for NetFUNNEL Android Agent integration.
Overview
Android Agent is a native Android SDK that provides NetFUNNEL traffic control functionality for Android applications. It integrates directly into your Android app code to implement queue management and waiting room functionality, distributing server load and ensuring stable user experience during high-traffic periods.
Key Features
- Native Android SDK: Direct integration into Android app code with simple API calls
- Two Control Methods: Choose between Basic Control (entry speed limiting) and Section Control (concurrent user management)
- Dedicated APIs: Basic Control uses
nfStart()/nfStop(), Section Control usesnfStartSection()/nfStopSection() - Native Waiting Rooms: WebView-based waiting room templates with customizable UI options
- Real-time Queue Updates: Receive live queue position, wait time, and progress information
- Network Recovery: Automatic recovery from network issues to maintain user experience
- Robust Error Handling: Comprehensive callback system with smart error handling strategies
- Lightweight SDK: Minimal dependencies with Ktor and Kotlinx Serialization
- Android Lifecycle Integration: Seamless integration with Activity lifecycle and Android components
System Requirements
- Android API Level: 22+ (Android 5.1 Lollipop or higher)
- Java: 1.8 or higher
- Kotlin: 1.9.0 or higher (for Kotlin-based projects)
- Dependencies: Ktor 2.1.0+ (< 3.0.0), Kotlinx Serialization
Compatible Environments
- Native Android Apps: Java/Kotlin-based Android applications with full SDK integration
- Hybrid Apps: Applications with native Android components (WebView content is not protected by this SDK)
- All Android Build Types: Debug and release builds with ProGuard/R8 support
How It Works
The Android SDK integrates seamlessly with your app's lifecycle:
- SDK Initialization: Initialize NetFUNNEL SDK in your Application class
- Native Integration: Call
nfStart()for Basic Control ornfStartSection()for Section Control in your Android Activities/Fragments - WebView Waiting Room: SDK displays WebView-based waiting room (default template or custom UI)
- Queue Management: NetFUNNEL server handles queue position and admission automatically
- Key Return: Call
nfStop()for Basic Control ornfStopSection()for Section Control when users complete their actions
Control Flow Examples
Basic Control Flow:
User Action → nfStart() → Waiting Room → onSuccess() → User Proceeds → nfStop()
Section Control Flow:
User Action → nfStartSection() → Waiting Room → onSuccess() → User in Section → nfStopSection()
Important Limitations
- WebView Content: This SDK does not protect WebView content (HTML/JavaScript pages)
- Native Components Only: Traffic control applies only to native Android components (Activities, Fragments, etc.)
- Web/JavaScript Agent: For WebView-based content, use the JavaScript Agent instead
Getting Started
To quickly begin with Android Agent, refer to the Quickstart guide.
Need a basic project to practice with? Check out our Sample Projects which include an Android Application (Single Activity) template ready for NetFUNNEL SDK integration practice.
Documentation
Core Documentation
- Quickstart: Get up and running in 5-10 minutes with basic examples
- Installation & Initialization: Detailed setup guide with dependencies and configuration
- Integration Methods: Compare Basic Control vs Section Control approaches
- API Reference: Complete function specifications, callbacks, and response formats
- Configuration Options: All initialization parameters and their usage
- Troubleshooting: Common issues, solutions, and FAQ
Implementation Guides
- Basic Control Integration: Complete implementation guide for Basic Control
- Section Control Integration: Complete implementation guide for Section Control