# πŸ• Flocon **Flocon** is an advanced debugging and inspection tool for Android applications, inspired by [Flipper](https://github.com/facebook/flipper) by Meta. It allows developers to connect an Android device to their computer and launch a desktop interface that can **observe, inspect, and interact with the running mobile app** in real time. With Flocon, you gain deep access to critical app internals β€” such as network requests, local storage, analytics events, and more β€” without needing root access or tedious ADB commands. It’s designed to accelerate development, QA, and debugging workflows. --- ## πŸš€ What Can Flocon Do? Once your Android device is connected and your app includes the Flocon SDK, you can use the desktop companion app to access the following features: --- πŸ› οΈ Getting Started in your module .kts ``` // use only on a debug buildType, do not distribute on the playstore build ! debugImplementation("io.github.openflocon:flocon:0.0.1") ``` in your `Application.kt` ``` Flocon.initialize(this) ``` Download & install the last `Desktop client` https://github.com/openflocon/Flocon/releases ### πŸ“‘ Network Request Inspector Network1 Network2 Flocon captures **all outgoing network requests** made by the Android app β€” whether they’re simple REST API calls or complex multipart uploads β€” and displays them in an organized UI. For each request, you can inspect: - HTTP method (GET, POST, etc.) - Full URL - Request headers and body - Response headers and body - Status code and response time - Timestamp This feature is invaluable for diagnosing backend issues, debugging unexpected API failures, and verifying request payloads and authentication headers. ``` debugImplementation("io.github.openflocon:flocon-okhttp-interceptor:0.0.1") ``` ``` val okHttpClient = OkHttpClient() .newBuilder() .addInterceptor(FloconOkhttpInterceptor()) .build() ``` ### πŸ–ΌοΈ Downloaded Image Viewer Capture d’écran 2025-07-30 aΜ€ 08 09 56 Flocon captures and displays **images downloaded by the Android app**, giving you a clear, visual representation of media fetched over the network β€” such as avatars, product thumbnails, banners, or any other images requested at runtime. For each image, Flocon shows: - A live **thumbnail preview** of the image - The **URL** from which it was downloaded - The **download timestamp** This feature is extremely useful for: - Verifying that images are loading correctly and not broken - Debugging CDN issues, placeholders, or misconfigured URLs - Comparing image quality and compression at runtime - Inspecting lazy loading or image caching behaviors Whether you're working on UI/UX, performance optimization, or just debugging a missing image, this tool gives you **immediate visibility** into every image fetched by your app. Usage with coil ``` // just add your okhttp client (with the flipper interceptor) SingletonImageLoader.setSafe { ImageLoader.Builder(context = context) .components { add( coil3.network.okhttp.OkHttpNetworkFetcherFactory( callFactory = { okHttpClient }, ), ) } .build() } ``` --- ### πŸ“Š Analytics Event Viewer Analytics Flocon shows a real-time stream of **analytics events** emitted by your application. Whether you’re using Firebase Analytics, Segment, or a custom solution, the Flocon SDK can be plugged and forward these events to the desktop UI. Each event includes: - The event name - Parameters and metadata - Timestamps This is especially useful for QA teams and product analysts to validate that the right events are triggered at the right time, with the correct payloads. ``` Flocon.analytics("firebase").logEvents( AnalyticsEvent( eventName = "clicked user", "userId" analyticsProperty "1024", "username" analyticsProperty "florent", "index" analyticsProperty "3", ), AnalyticsEvent( eventName = "opened profile", "userId" analyticsProperty "2048", "username" analyticsProperty "kevin", "age" analyticsProperty "34", ), ``` --- ### πŸ— SharedPreferences Explorer & Editor SharedPreferences Flocon provides complete access to your app’s **SharedPreferences**, which often store user tokens, feature flags, configuration options, and more. Key capabilities include: - Browsing all preference files - Viewing and filtering key-value pairs - Inspecting primitive values and JSON structures - **Editing values on the fly** from the desktop UI This is an extremely powerful way to test different user scenarios or simulate app states, without needing to rebuild the app or manually trigger edge cases. --- ### 🧩 Database Query Tool Database Flocon gives you direct access to your app’s **local databases** (SQLite, Room, etc.), with a clean interface for exploring and querying data. Features include: - Listing all available databases - Running **custom SQL queries** This makes it easy to debug persistent storage issues, verify migrations, or test app behavior with specific data sets β€” all without leaving your IDE. --- ### πŸ“ File Explorer Files Flocon allows you to explore the **internal file storage** of your Android application β€” something that typically requires ADB and knowledge of Android's file system. From the desktop app, you can: - Browse directories within the app's sandbox - View file metadata (size, modification date, path) - `TO DEVELOP :` Open or download files for inspection - `TO DEVELOP :`Preview text, JSON, or binary blobs This feature is ideal for inspecting log files, cache data, downloaded assets, or exported config files. --- ### πŸ“ˆ Configurable Dashboards (from the mobile app) Dashboards Your Android application can define and expose **custom dashboards**, which Flocon renders dynamically in the desktop interface. Use cases include: - Displaying live business metrics - Monitoring app state variables - Debugging real-time values (e.g., geolocation, battery, app mode) - Real time in-app variables editions - Perform from the desktop app mobile callbacks Dashboards are defined programmatically on the mobile side via the SDK, and they update live as data changes β€” making them ideal for live demos, QA testing, or in-field diagnostics. --- ### πŸ“‹ Configurable Data Tables tables In addition to dashboards, Flocon supports structured **data tables** that can be configured and updated by the mobile app. These tables can be used to visualize: - Lists of active users - Items in memory or cache - Custom logs or metrics - Backend response simulations Tables are interactive, scrollable, and they give developers and testers a straightforward way to inspect lists or collections in real time. To create a dynamic row : ``` Flocon.table("analytics").log( "name" toParam "nameValue", "value1" toParam "value1Value", "value2" toParam "value2Value", ) ``` --- ### πŸ”— Deeplink Launcher Deeplink Flocon includes a **deeplink runner**, which lists all the deeplinks supported by your app (either auto-discovered or manually registered). From the desktop UI, you can: - Browse available deeplinks - Enter parameters interactively - Execute deeplinks directly on the device - Instantly navigate to specific app screens No more typing long `adb shell am start` commands β€” Flocon makes deeplink testing accessible and efficient. **You can configure deeplinks directly from your android code !** ``` Flocon.deeplinks( listOf( Deeplink("flocon://home"), Deeplink("flocon://test"), Deeplink( "flocon://user/[userId]", label = "User" ), Deeplink( "flocon://post/[postId]?comment=[commentText]", label = "Post", description = "Open a post and send a comment" ), ) ) ``` --- # Grpc GRPC Similar to network inteceptions, Flocon works with grpc ``` debugImplementation("io.github.openflocon:flocon-grpc-interceptor:0.0.1") ``` ``` ManagedChannelBuilder ... .intercept( FloconGrpcInterceptor() ) .build() ``` ## 🧰 Requirements - An Android device with USB debugging enabled - Android Studio or SDK tools installed - ADB (Android Debug Bridge) accessible from your system path - Flocon Desktop app (JVM-based) - Flocon SDK integrated into your Android app ---