mirror of
https://github.com/tytydraco/LADB.git
synced 2026-04-27 00:15:59 +03:00
[PR #141] feature: Add persistent notification for wireless pairing (Fixes non-split-screen pairing) #139
Labels
No labels
bug
documentation
enhancement
enhancement
good first issue
help wanted
pull-request
question
question
question
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/LADB#139
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/tytydraco/LADB/pull/141
Author: @Golgrax
Created: 12/20/2025
Status: 🔄 Open
Base:
main← Head:main📝 Commits (1)
030589ffeat: add persistent notification for wireless pairing with RemoteInput📊 Changes
7 files changed (+330 additions, -9 deletions)
View changed files
📝
app/src/main/AndroidManifest.xml(+12 -0)➕
app/src/main/java/com/draco/ladb/receivers/PairingReceiver.kt(+188 -0)➕
app/src/main/java/com/draco/ladb/services/PairingService.kt(+77 -0)📝
app/src/main/java/com/draco/ladb/utils/ADB.kt(+15 -8)📝
app/src/main/java/com/draco/ladb/views/MainActivity.kt(+32 -1)📝
app/src/main/res/menu/main.xml(+5 -0)📝
app/src/main/res/values/strings.xml(+1 -0)📄 Description
This PR addresses a major UX barrier for devices that do not support split-screen or floating windows.
This new feature allows the user to complete the entire pairing and connection process directly from the notification shade while the Developer Options screen remains open in the foreground.
Key Features
Two-Step Stateful Pairing:
Step 1: User inputs the Port (or IP:Port) via the notification.
Step 2: The notification updates to ask for the Pairing Code.
The app statefully remembers the port between steps, providing a clean, conversational flow.
Real-time Feedback: Displays actual output logs from the ADB command in the notification text (e.g., "Successfully paired" or real error messages like "Wrong password").
Automatic Connection: Immediately triggers mDNS discovery and initServer() upon successful pairing, ensuring the app is connected and ready to use as soon as the user returns to it.
Dynamic UI: The input field and "Enter" button automatically disappear once the status reaches "Connected!", leaving a clean confirmation message.
Retry Mechanism: If pairing fails, a "Retry" action button appears to reset the flow without needing to reopen the app.
Sample Testing
View Screenshots
Allow it.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.