Skip to content

Remove legacy Android controller and Nearby transport - #559

Merged
thias15 merged 6 commits into
masterfrom
thias15/remove-legacy-controller
Oct 21, 2026
Merged

thias15 merged 6 commits into
masterfrom
thias15/remove-legacy-controller

Conversation

@thias15

@thias15 thias15 commented Oct 19, 2026

Copy link
Copy Markdown
Collaborator

The controller APK in each release has been built from the Flutter controller since #553, so this removes the legacy Android controller and the Google Nearby transport that only it used.

Changes

Remove legacy Android controller app

  • Delete android/controller and drop :controller from android/settings.gradle
  • Remove its debug-APK upload step from .github/workflows/gradle.yml
  • Point docs at the Flutter controller in all translations; keep the package-ID note for users who still have the legacy app installed

Remove Google Nearby transport from the robot app

  • Delete NearbyConnection.java; ConnectionSelector now always returns the NSD network connection (its API is unchanged, so PhoneController needs no edits)
  • Drop play-services-nearby and the nearby_version ext
  • Document that phone control needs both phones on the same Wi-Fi network, or one phone on the other's hotspot

Without the legacy controller nothing advertises the Nearby service, so a robot without Wi-Fi was waiting for a controller that can never connect. The old selector also cached its choice, so a robot that started without Wi-Fi stayed on Nearby even after joining a network; NSD discovery now keeps listening and connects once both phones share a network.

Not changed: the Bluetooth "Nearby devices" permission toggle in Settings. That is Android 12's permission group for the BLE link to the robot body, not Google Nearby Connections.

Notes

The controller APK published with each release has been built from the
Flutter controller (controller/flutter) since #553, so the legacy
Android controller module is no longer shipped or maintained.

- Delete android/controller and drop it from settings.gradle
- Remove its debug-APK upload step from the Gradle CI workflow
- Point docs at the Flutter controller in all translations; keep the
  package-ID upgrade note for users who still have the legacy app

Nothing else in the Gradle build depends on :controller; :comlib stays
because :robot uses it.
With the legacy Android controller gone, nothing advertises the
OPENBOT_SERVICE_ID Nearby service anymore: the Flutter controller only
uses NSD over the local network. When the robot phone had no Wi-Fi,
ConnectionSelector fell back to Nearby and waited for a controller that
can never connect.

- Delete NearbyConnection and make ConnectionSelector always return the
  NSD network connection. Its public API is unchanged, so callers
  (PhoneController) need no edits.
- Drop the play-services-nearby dependency and the nearby_version ext.
- Document that both phones need the same Wi-Fi network or a hotspot.

Side benefit: the old selector cached its choice on first use, so a
robot that started without Wi-Fi stayed on Nearby even after joining a
network. NSD discovery now just keeps listening and connects once both
phones are on the same network.

Not touched: the Bluetooth "Nearby devices" permission toggle in
Settings (BLUETOOTH_SCAN/CONNECT). That is Android 12's permission group
for the BLE link to the robot body, not Google Nearby Connections.
@harishthakur52

Copy link
Copy Markdown
Contributor

@thias15 The Python check fails due to compile_all.py formatting. Fixed in 5a6a767 on #551. Once merged, it should pass here too.

@thias15
thias15 requested review from hardikgarg02 and a balanced review from Copilot October 20, 2026 05:13

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The removals and network-only selector are consistent with the remaining integration, with no unresolved blocking issues identified.

No open issues 🎉

What changed in this PR

Retires the legacy Android controller in favor of Flutter and simplifies robot phone control to use local-network discovery.

Changes:

  • Removes the legacy controller module, resources, tests, and debug artifact upload.
  • Removes Google Nearby transport and dependencies while preserving the connection selector API.
  • Updates translated documentation and connection requirements; clarifies PhoneController comments without changing behavior.
File Description
controller/​README.zh-CN.md Documents shared-network requirement.
controller/​README.md Documents shared-network requirement.
controller/​README.ko-KR.md Documents shared-network requirement.
controller/​README.fr-FR.md Documents shared-network requirement.
controller/​README.es-ES.md Documents shared-network requirement.
controller/​README.de-DE.md Documents shared-network requirement.
controller/​flutter/​README.zh-CN.md Updates migration and connection guidance.
controller/​flutter/​README.md Updates migration and connection guidance.
controller/​flutter/​README.ko-KR.md Updates migration and connection guidance.
controller/​flutter/​README.fr-FR.md Updates migration and connection guidance.
controller/​flutter/​README.es-ES.md Updates migration and connection guidance.
controller/​flutter/​README.de-DE.md Updates migration and connection guidance.
android/​settings.gradle Removes controller module inclusion.
android/​robot/​src/​main/​java/​org/​openbot/​app/​robot/​env/​PhoneController.java Clarifies comments only.
android/​robot/​src/​main/​java/​org/​openbot/​app/​robot/​env/​NearbyConnection.java Deletes robot Nearby transport.
android/​robot/​src/​main/​java/​org/​openbot/​app/​robot/​env/​ConnectionSelector.java Always selects network transport.
android/​robot/​README.zh-CN.md Links to Flutter controller.
android/​robot/​README.md Links to Flutter controller.
android/​robot/​README.ko-KR.md Links to Flutter controller.
android/​robot/​README.fr-FR.md Links to Flutter controller.
android/​robot/​README.de-DE.md Links to Flutter controller.
android/​robot/​build.gradle Removes Nearby dependency.
android/​README.zh-CN.md Updates controller links and migration guidance.
android/​README.md Updates controller links and migration guidance.
android/​README.ko-KR.md Updates controller links and migration guidance.
android/​README.fr-FR.md Updates controller links and migration guidance.
android/​README.es-ES.md Updates controller links and migration guidance.
android/​README.de-DE.md Updates controller links and migration guidance.
android/​controller/​src/​test/​java/​org/​openbot/​controller/​ExampleUnitTest.kt Deletes legacy unit test.
android/​controller/​src/​main/​res/​values/​styles.xml Deletes legacy styles.
android/​controller/​src/​main/​res/​values/​strings.xml Deletes legacy strings.
android/​controller/​src/​main/​res/​values/​ids.xml Deletes legacy resource IDs.
android/​controller/​src/​main/​res/​values/​colors.xml Deletes legacy colors.
android/​controller/​src/​main/​res/​layout/​activity_fullscreen.xml Deletes legacy screen layout.
android/​controller/​src/​main/​res/​drawable/​zen_mode.xml Deletes legacy drawable.
android/​controller/​src/​main/​res/​drawable/​volume_up_24.xml Deletes legacy drawable.
android/​controller/​src/​main/​res/​drawable/​volume_off_24.xml Deletes legacy drawable.
android/​controller/​src/​main/​res/​drawable/​toggle_mirror.xml Deletes legacy drawable.
android/​controller/​src/​main/​res/​drawable/​stop_indicator.xml Deletes legacy drawable.
android/​controller/​src/​main/​res/​drawable/​sliders_background.xml Deletes legacy drawable.
android/​controller/​src/​main/​res/​drawable/​shaded.xml Deletes legacy drawable.
android/​controller/​src/​main/​res/​drawable/​shade_dark.xml Deletes legacy drawable.
android/​controller/​src/​main/​res/​drawable/​seekbar_style.xml Deletes legacy drawable.
android/​controller/​src/​main/​res/​drawable/​seekbar_progress.xml Deletes legacy drawable.
android/​controller/​src/​main/​res/​drawable/​pedal_break.xml Deletes legacy drawable.
android/​controller/​src/​main/​res/​drawable/​pedal_accelerator.xml Deletes legacy drawable.
android/​controller/​src/​main/​res/​drawable/​left_notch.xml Deletes legacy drawable.
android/​controller/​src/​main/​res/​drawable/​ic_flip_camera_ios_24px.xml Deletes legacy drawable.
android/​controller/​src/​main/​res/​drawable/​ic_flashlight_on_24px.xml Deletes legacy drawable.
android/​controller/​src/​main/​res/​drawable/​ic_flash_on_24px.xml Deletes legacy drawable.
android/​controller/​src/​main/​res/​drawable/​ic_controller.xml Deletes legacy drawable.
android/​controller/​src/​main/​res/​drawable/​ic_circle.xml Deletes legacy drawable.
android/​controller/​src/​main/​res/​drawable/​ic_cameraswitch_black_24dp.xml Deletes legacy drawable.
android/​controller/​src/​main/​res/​drawable/​grip_dots.xml Deletes legacy drawable.
android/​controller/​src/​main/​res/​drawable/​exit.xml Deletes legacy drawable.
android/​controller/​src/​main/​res/​drawable/​direction_indicator.xml Deletes legacy drawable.
android/​controller/​src/​main/​res/​drawable/​custom_thumb.xml Deletes legacy drawable.
android/​controller/​src/​main/​res/​drawable/​control_mode.xml Deletes legacy drawable.
android/​controller/​src/​main/​res/​drawable/​button.xml Deletes legacy drawable.
android/​controller/​src/​main/​res/​drawable/​border_shadow.xml Deletes legacy drawable.
android/​controller/​src/​main/​res/​drawable-v23/​sliders_background.xml Deletes legacy drawable variant.
android/​controller/​src/​main/​java/​org/​openbot/​controller/​utils/​Utils.kt Deletes legacy utilities.
android/​controller/​src/​main/​java/​org/​openbot/​controller/​utils/​SensorReader.kt Deletes legacy sensor reader.
android/​controller/​src/​main/​java/​org/​openbot/​controller/​utils/​LocalEventBus.kt Deletes legacy event bus.
android/​controller/​src/​main/​java/​org/​openbot/​controller/​StatusEventBus.kt Deletes legacy status bus.
android/​controller/​src/​main/​java/​org/​openbot/​controller/​ScreenSelector.kt Deletes legacy screen selection.
android/​controller/​src/​main/​java/​org/​openbot/​controller/​PhoneSensorToDualDriveConverter.kt Deletes legacy tilt conversion.
android/​controller/​src/​main/​java/​org/​openbot/​controller/​NetworkServiceConnection.kt Deletes legacy controller network transport.
android/​controller/​src/​main/​java/​org/​openbot/​controller/​NearbyConnection.kt Deletes legacy controller Nearby transport.
android/​controller/​src/​main/​java/​org/​openbot/​controller/​ILocalConnection.kt Deletes legacy connection interface.
android/​controller/​src/​main/​java/​org/​openbot/​controller/​IDataReceived.kt Deletes legacy callback interface.
android/​controller/​src/​main/​java/​org/​openbot/​controller/​ForwardSpeed.kt Deletes legacy speed management.
android/​controller/​src/​main/​java/​org/​openbot/​controller/​DriveCommandReducer.kt Deletes legacy command filtering.
android/​controller/​src/​main/​java/​org/​openbot/​controller/​customComponents/​VideoViewWebRTC.kt Deletes legacy video rendering.
android/​controller/​src/​main/​java/​org/​openbot/​controller/​customComponents/​SwitchCamera.kt Deletes legacy camera control.
android/​controller/​src/​main/​java/​org/​openbot/​controller/​customComponents/​StopIndicator.kt Deletes legacy stop indicator.
android/​controller/​src/​main/​java/​org/​openbot/​controller/​customComponents/​SplashScreenLayout.kt Deletes legacy splash layout.
android/​controller/​src/​main/​java/​org/​openbot/​controller/​customComponents/​Sound.kt Deletes legacy sound control.
android/​controller/​src/​main/​java/​org/​openbot/​controller/​customComponents/​RightIndicator.kt Deletes legacy right indicator.
android/​controller/​src/​main/​java/​org/​openbot/​controller/​customComponents/​NoiseButton.kt Deletes legacy noise control.
android/​controller/​src/​main/​java/​org/​openbot/​controller/​customComponents/​NetworkButton.kt Deletes legacy network control.
android/​controller/​src/​main/​java/​org/​openbot/​controller/​customComponents/​MirrorImage.kt Deletes legacy mirror control.
android/​controller/​src/​main/​java/​org/​openbot/​controller/​customComponents/​MainFrameLayout.kt Deletes legacy main layout.
android/​controller/​src/​main/​java/​org/​openbot/​controller/​customComponents/​LogsButton.kt Deletes legacy logging control.
android/​controller/​src/​main/​java/​org/​openbot/​controller/​customComponents/​LeftIndicator.kt Deletes legacy left indicator.
android/​controller/​src/​main/​java/​org/​openbot/​controller/​customComponents/​IVideoPlayer.kt Deletes legacy video interface.
android/​controller/​src/​main/​java/​org/​openbot/​controller/​customComponents/​FlipCamera.kt Deletes legacy camera-flip control.
android/​controller/​src/​main/​java/​org/​openbot/​controller/​customComponents/​Flashlight.kt Deletes legacy flashlight control.
android/​controller/​src/​main/​java/​org/​openbot/​controller/​customComponents/​Flash.kt Deletes legacy flash control.
android/​controller/​src/​main/​java/​org/​openbot/​controller/​customComponents/​FadeableTextView.kt Deletes legacy fading text.
android/​controller/​src/​main/​java/​org/​openbot/​controller/​customComponents/​ExitButton.kt Deletes legacy exit control.
android/​controller/​src/​main/​java/​org/​openbot/​controller/​customComponents/​DualDriveSeekBar.kt Deletes legacy drive sliders.
android/​controller/​src/​main/​java/​org/​openbot/​controller/​customComponents/​DriveModeTiltLayout.kt Deletes legacy tilt layout.
android/​controller/​src/​main/​java/​org/​openbot/​controller/​customComponents/​DriveModeSlidersLayout.kt Deletes legacy slider layout.
android/​controller/​src/​main/​java/​org/​openbot/​controller/​customComponents/​DriveModeButton.kt Deletes legacy drive-mode control.
android/​controller/​src/​main/​java/​org/​openbot/​controller/​customComponents/​ControllerModeTilt.kt Deletes legacy tilt selection.
android/​controller/​src/​main/​java/​org/​openbot/​controller/​customComponents/​ControllerModeSliders.kt Deletes legacy slider selection.
android/​controller/​src/​main/​java/​org/​openbot/​controller/​customComponents/​ConnectionActiveIndicator.kt Deletes legacy connection indicator.
android/​controller/​src/​main/​java/​org/​openbot/​controller/​customComponents/​ButtonWithBorder.kt Deletes legacy bordered button.
android/​controller/​src/​main/​java/​org/​openbot/​controller/​customComponents/​Button.kt Deletes legacy base button.
android/​controller/​src/​main/​java/​org/​openbot/​controller/​customComponents/​Brake.kt Deletes legacy brake control.
android/​controller/​src/​main/​java/​org/​openbot/​controller/​customComponents/​BotSetupControlsLayout.kt Deletes legacy setup layout.
android/​controller/​src/​main/​java/​org/​openbot/​controller/​customComponents/​BlinkingTextView.kt Deletes legacy blinking text.
android/​controller/​src/​main/​java/​org/​openbot/​controller/​customComponents/​BlinkerAnimation.kt Deletes legacy blink animation.
android/​controller/​src/​main/​java/​org/​openbot/​controller/​customComponents/​Accelerator.kt Deletes legacy accelerator control.
android/​controller/​src/​main/​java/​org/​openbot/​controller/​ControllerActivity.kt Deletes legacy activity.
android/​controller/​src/​main/​java/​org/​openbot/​controller/​ConnectionSelector.kt Deletes legacy controller transport selection.
android/​controller/​src/​main/​java/​org/​openbot/​controller/​BotDataListener.kt Deletes legacy robot-data listener.
android/​controller/​src/​main/​AndroidManifest.xml Deletes legacy app manifest.
android/​controller/​src/​androidTest/​java/​org/​openbot/​controller/​ExampleInstrumentedTest.kt Deletes legacy instrumented test.
android/​controller/​README.zh-CN.md Deletes legacy documentation.
android/​controller/​README.md Deletes legacy documentation.
android/​controller/​README.ko-KR.md Deletes legacy documentation.
android/​controller/​README.fr-FR.md Deletes legacy documentation.
android/​controller/​README.es-ES.md Deletes legacy documentation.
android/​controller/​README.de-DE.md Deletes legacy documentation.
android/​controller/​proguard-rules.pro Deletes legacy ProGuard configuration.
android/​controller/​build.gradle Deletes legacy module build configuration.
android/​controller/​.gitignore Deletes legacy module ignore rule.
android/​build.gradle Removes Nearby version declaration.
.github/​workflows/​gradle.yml Removes legacy debug APK upload.

Review effort: Balanced

@harishthakur52

Copy link
Copy Markdown
Contributor

@thias15 Looks good to us.

We also found some broken README links (old paths):

android/README.de-DE.md (and es, fr, ko, zh): change app/ to robot/
android/robot/README.md (and de, fr, ko, zh): change org/openbot/ to org/openbot/app/robot/

Since this PR touches the same lines, we can fix them here to avoid merge conflicts, or send a separate PR after this one is merged.

@thias15
thias15 merged commit b93927c into master Oct 21, 2026
3 checks passed
@thias15
thias15 deleted the thias15/remove-legacy-controller branch October 21, 2026 04:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants