Skip to content

Proposal: Android SDK #17

Closed
Closed

Description

@easyhooon

Hi! Thank you for open-sourcing Necto. It's a great tool, and I wanted the same experience on Android.

Problem

Android apps can't connect to Necto. I'd like to debug Android apps with the same Mac app, panels and CLI.

Proposal

An Android (Kotlin) port of the app-side SDK.
I have a working version: https://github.com/easyhooon/necto-android

necto-android-demo.mp4

The video shows the unchanged Necto Mac app with an Android sample app: Network, DataStore and Files panels, then Control driving the phone, then Performance.

  • It uses the existing protocol v1 and the bundled panels unchanged. No Mac app changes are needed: the app listens on loopback, and adb forward tcp:9979 tcp:9979 makes it show up like a simulator app.
  • Default plugins: Events, Network (OkHttp), Preferences (DataStore), Files, Performance, and Control (Views and Jetpack Compose).
  • I tested it with Necto 0.2.0 on a Galaxy S25+ (Android 17), with an Android port of ExampleApp. It has unit tests, including Robolectric tests for Control. What I checked is in docs/verification.md.

One rough edge: the sidebar shows osVersion as "iOS …". An optional platform field in the handshake would fix that.

Would you be open to this? If so, where should it live (for example android/ in this repo, or a separate repo)? I'm happy to split it into small PRs and maintain it. If it doesn't fit, I'll keep it as a separate project.

Where it lives

Core (SDK), as a new platform. The platform field would be a small change to the handshake and the sidebar.

This can't be a plugin: plugins reach an app through its SDK, so Android needs an SDK first. The existing plugins and panels are reused unchanged.

Thanks for taking a look!

Activity

  1. heoblitz commented on Oct 2, 2026

    @heoblitz
    Collaborator

    Hi! Thanks so much for your interest in Necto and for your work on Android support.

    We’re planning to start working on Android support soon and will set up a dedicated feature branch for it. Alongside basic connectivity, we’ll also be working on an Android SDK, plugin migration, CI, and testing to make sure everything works well together.

    Once the branch is ready, would you be open to contributing your work to it? It may take us a little time to get everything set up, but I’ll keep you posted and let you know when it’s ready.

  2. easyhooon commented on Oct 2, 2026

    @easyhooon
    ContributorAuthor

    @heoblitz
    I'd be glad to contribute to the feature branch!

    My port already covers parts of that plan: a Kotlin SDK on protocol v1, UI Control for Views and Compose, Robolectric tests, and an Android port of ExampleApp that could serve as a CI target. I'll follow the structure you set up once the branch is ready.

  3. heoblitz commented on Oct 13, 2026

    @heoblitz
    Collaborator

    @easyhooon The feature/android-support branch is now ready.

    We’ll also be starting our work on Android support in this branch. You can now open a PR targeting this branch. Thank you!

  4. easyhooon commented on Oct 14, 2026

    @easyhooon
    ContributorAuthor

    @heoblitz Thanks for setting up feature/android-support! Before porting, I'd like to confirm a few things:

    1. Connection & security
    My port listens on TCP 127.0.0.1:9979 inside the app and connects via adb forward, so the Mac app picks it up as a simulator with no host changes. It's meant for debug builds only (excluded from release), but loopback TCP on Android is still reachable by other apps on the same device. android-poc used a unix socket with a peer-UID check, and there's also feature/sdk-connection-authentication. Which direction do you have in mind for Android?

    2. Package / Maven coordinates
    To match iOS (im.toss.necto.*), I plan to use im.toss.necto as the package root and Maven group. Does that work for you?

    3. Layout
    I'm thinking of a Gradle root under SDK/Android/ with necto-core, necto-android, necto-okhttp, and a sample app. Does that work, or would you prefer the sample next to ExampleApp/?

    Meanwhile, I'll work on parts that don't depend on these, like aligning preferences with #21.

  5. heoblitz commented on Oct 14, 2026

    @heoblitz
    Collaborator
    1. Connection & security
      The android-poc approach you mentioned seems like a good fit for Android: ADB forwarding to a Unix socket with a peer-UID check to prevent access from other apps on the device. We could consider optional TLS with client authentication later.

    2. Package / Maven coordinates
      im.toss.necto looks good for both the package root and Maven group.

    3. Layout
      The proposed modules and Gradle root under SDK/Android/ look good, including keeping the sample there. It would also be good to move the iOS SDK and ExampleApp under SDK/iOS/.

    Please let me know if you have any other thoughts!

  6. easyhooon commented on Nov 3, 2026

    @easyhooon
    ContributorAuthor

    @heoblitz Thanks for reviewing and merging #30, #31 and #32! Here's what's now on feature/android-support:

    • Android SDK under SDK/Android/ (necto-core, necto-android, necto-okhttp, sample)
    • Connection over ADB to a Unix socket with a peer-UID check, as we discussed
    • Shipped plugins: Network, Files, Preferences, Performance and UI Control

    Do you plan to merge it into main? And is there anything else I should work on before that?

  7. heoblitz commented on Nov 4, 2026

    @heoblitz
    Collaborator

    @easyhooon Thanks for your contributions!

    We plan to merge this into main within the next week or two. Before that, we’ll do a bit more testing to make sure we haven’t missed anything.

    No additional feature work is needed for now.

  8. easyhooon commented on Nov 4, 2026

    @easyhooon
    ContributorAuthor

    Please let me know if you have any other thoughts!

    Thanks for the update!

    One idea for later: would a WebView bridge inspection plugin be useful for Necto? I’ve been working on Dari, which records Web ↔ Native bridge calls and pairs requests with responses, including payloads, status, and timing. I think inspecting those calls in Necto could help when debugging hybrid apps.

    Would this be worth discussing in a separate issue after the Android merge?

  9. heoblitz commented on Nov 5, 2026

    @heoblitz
    Collaborator

    Appreciate the suggestion! Let's discuss it in a separate issue after the Android merge. We should also think about whether it fits better as a built-in Necto plugin or as something provided from a separate repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions