mirror of https://github.com/openflocon/Flocon also На днях себе в pet-project затащил такую либу. https://github.com/openflocon/Flocon Что понравилось: - Подключается к приложению без каких либо бубнов. Просто запустил приложение и она сразу цепляется. Помну кучу проектов, где надо было перезапускать соединение. - Сохраняет старые сессии сетевых запросов. - Сетевые запросы можно фильтровать. - Можно делать моки на запросы. Удобно включать и отключать их. - Есть полезные сетевые тулзы. Типа замедлить сеть, прислать 500, повысить таймаут запросов. - Раздел аналитики вынесен в отдельную вкладку. Не надо по logcat искать. Правда нужно обёртку из либы использовать. - Можно делать дашборды и выводить информацию о пользователе и др. инфу. - Симпатично выглядет. - Куча чего ещё, можно почитать на странице. Что не понравилось: - Ui интерфейс не очень отзывчивый. - Есть баги по выделению и копированию. В целом прикольный проект на KMP, может быть кому-нибудь ещё пригодится. И можно KMP попрактиковать, по контрибьютить.
Find a file
Florent CHAMPIGNY fcb569d667
Update README.md
2025-07-31 08:29:39 +02:00
.github/workflows Update README.md 2025-07-30 19:43:26 +02:00
FloconAndroid Update README.md 2025-07-30 19:43:26 +02:00
FloconDesktop Update README.md 2025-07-30 19:43:26 +02:00
README.md Update README.md 2025-07-31 08:29:39 +02:00

flocon_small

Flocon is an advanced debugging and inspection tool for Android applications, inspired by 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. Its 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

Maven Central

// use only on a debug buildType, do not distribute on the playstore build !
debugImplementation("io.github.openflocon:flocon:LAST_VERSION")

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 theyre 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.

Maven Central

debugImplementation("io.github.openflocon:flocon-okhttp-interceptor:LAST_VERSION")
val okHttpClient = OkHttpClient()
            .newBuilder()
            .addInterceptor(FloconOkhttpInterceptor())
            .build()

🖼️ Downloaded Image Viewer

Capture d’écran 2025-07-30 à 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 youre 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 apps 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 apps 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.

userFlow.collect { user ->
     Flocon.dashboard(id = "main") {
        user?.let {
            section(name = "User") {
                text(label = "username", value = user.userName)
                text(label = "fullName", value = user.fullName, color = Color.Red.toArgb())
                text(label = "user id", value = user.id)
                button(
                    text = "Change User Id",
                    id = "changeUserId",
                    onClick = {
                        userFlow.update { it.copy(userName = "__flo__") }
                    }
                )
                textField(
                    label = "Update Name",
                    placeHolder = "name",
                    id = "changeUserName",
                    value = user.fullName,
                    onSubmitted = { value ->
                        userFlow.update { it.copy(fullName = value) }
                    })
            }
        }
    }
}

📋 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

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

Maven Central

debugImplementation("io.github.openflocon:flocon-grpc-interceptor:LAST_VERSION")
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
  • At least kotlin 2.0.0

🚨 Why Flocon Cant See Your Device Calls (And How to Fix It) 🚨

To enable Flocon to intercept and inspect network traffic from your Android app, the app must be allowed to connect to localhost (typically 127.0.0.1), which is where the desktop companion listens for traffic.

If you're already using a custom networkSecurityConfig, make sure it includes a rule to allow cleartext traffic to localhost

AndroidManifest.xml

<application
        android:networkSecurityConfig="@xml/network_security_config"/>

network_security_config.xml

<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
    <domain-config cleartextTrafficPermitted="true">
        <domain includeSubdomains="true">localhost</domain>
        <domain includeSubdomains="true">127.0.0.1</domain>
    </domain-config>
</network-security-config>

🤝 Contributors

Thanks to these amazing people for making Flocon better every day!

Florent Champigny
florent37