Skip to content

Your Android phone and your Windows PC, working as one. Local-first, end-to-end encrypted, no account.

README and screenshots for where the project stands

Bee7617a03672db
diff --git a/README.md b/README.md
index dd3738b..4b61383 100644
--- a/README.md
+++ b/README.md
@@ -15,12 +15,12 @@ no account and no cloud.
</div>
> [!IMPORTANT]
-> **Nectarlink is in early development.** The foundations work end to end (pairing,
-> encrypted connections, live device status, find my device), but most features
-> are still ahead. There are no releases yet. See [Project status](#project-status).
+> **Nectarlink is in active development.** The everyday features work end to end
+> (notifications, clipboard, files, media) and mirroring, messages and calls are
+> well along, but there are no releases yet. See [Project status](#project-status).
<p align="center">
- <img src="docs/screenshots/desktop-graphite-home.png" alt="Nectarlink for Windows, home screen, Graphite theme" width="880">
+ <img src="docs/screenshots/desktop-bloom-home.png" alt="Nectarlink for Windows, home screen with notifications and what plays on the phone, Bloom theme" width="880">
</p>
## Why Nectarlink
@@ -54,9 +54,10 @@ is in [docs/PLAN.md](docs/PLAN.md).
## Project status
-Nectarlink is completing **Phase 0: Foundations** of the
-[roadmap](docs/PLAN.md#8-roadmap). The pieces every feature builds on are in
-place and tested; the user-facing features of Phase 1 come next.
+Nectarlink has finished **Phase 1** of the [roadmap](docs/PLAN.md#8-roadmap)
+(the everyday features) and is working through **Phase 2** (mirroring,
+messages and calls). Everything below works end to end and is covered by
+tests; there are no releases yet.
**Working today**
@@ -91,7 +92,9 @@ place and tested; the user-facing features of Phase 1 come next.
that pick up where they left off after a dropped connection.
- **Screen mirroring**: see the phone's screen on the PC, in a window of
its own, at up to 1920 pixels and 60 frames a second, hardware encoded on
- the phone; Android asks each time. Turn on **Control from your PC** in
+ the phone, with the phone's sound playing on the PC (Android 10 and
+ later; mute it from the window); Android asks each time. Turn on
+ **Control from your PC** in
the phone's Nectarlink settings to tap, swipe, scroll and type with the
PC's mouse and keyboard (right-click is Back), or set up **Wireless
debugging** there once for real touch (live dragging) and keys, with
@@ -99,20 +102,26 @@ place and tested; the user-facing features of Phase 1 come next.
itself after a reboot.
- **Texts** on the PC: a Messages page with the phone's conversations
(pictures included), to reply or start a new one; texts go out through
- the phone.
+ the phone. Search them, copy a one-time code with one click, and open
+ links.
- **Calls**: see who's calling on the PC (with the contact's name and
- photo), and answer, decline or silence it from there; the call itself
- stays on the phone. Calls nobody answered show as missed.
+ photo), and answer, decline or silence it from there. During the call,
+ the PC shows how long it has been going and can hang up and change the
+ volume; with Wireless debugging set up (Android 12 and later), also mute,
+ switch to the speaker, hold and use the keypad. The call itself stays
+ on the phone. Calls nobody answered show as missed.
- **New photos and screenshots** from the phone pop up on the PC with a
preview: save them to Downloads or copy them, ready to paste.
- **Media** both ways: what plays on the phone shows on the PC, in the app and
in Windows' own media flyout (so the keyboard's media keys work too), and
what plays on the PC shows in the phone's media controls, with artwork and
a seek bar.
+- **Battery alerts** on the PC when the phone runs low or is fully charged.
+ Phone notifications follow Windows' Do not disturb (they wait in the app).
- **Capability matrix**: both apps compute which features work for a pair of
devices and what would enable the rest, so the interface never offers
something that can't work.
-- **Windows app**: home and settings, two themes in light and dark (Bloom,
+- **Windows app**: home, messages and settings, two themes in light and dark (Bloom,
which takes its colors from the desktop wallpaper, and Graphite), Mica, a
custom title bar with Snap Layouts, and a tray icon. In the background it
uses about 10 MB of memory (as shown in Task Manager).
@@ -127,8 +136,9 @@ place and tested; the user-facing features of Phase 1 come next.
against their SHA-256 sums.
- **Command-line client** for development and testing (`nectarlink`).
-**Next**: Phase 2: mirroring, messages, calls and the other features in the
-plan.
+**Next**: phone apps in windows of their own on the PC, contacts and the
+call log, talking on calls through the PC (Bluetooth), and the rest of the
+[plan](docs/PLAN.md).
## Screenshots
@@ -137,16 +147,23 @@ and colorful. Both come in light and dark.
| Graphite | Bloom |
|:---:|:---:|
-| <img src="docs/screenshots/desktop-graphite-home.png" alt="Home, Graphite theme"> | <img src="docs/screenshots/desktop-bloom-home.png" alt="Home, Bloom theme"> |
+| <img src="docs/screenshots/desktop-graphite-home.png" alt="Home during a call, Graphite theme"> | <img src="docs/screenshots/desktop-bloom-home.png" alt="Home, Bloom theme"> |
| <img src="docs/screenshots/desktop-graphite-settings.png" alt="Settings, Graphite theme"> | <img src="docs/screenshots/desktop-bloom-settings.png" alt="Settings, Bloom theme"> |
+<p align="center">
+ <img src="docs/screenshots/desktop-messages.png" alt="Messages: the phone's conversations on the PC" height="436">
+ <img src="docs/screenshots/desktop-mirroring.png" alt="The phone's screen in a window on the PC" height="436"><br>
+ <sub>The phone's texts on the PC, and its screen in a window of its own.</sub>
+</p>
+
<p align="center">
<img src="docs/screenshots/desktop-pairing.png" alt="Pairing a phone by QR code" width="640"><br>
<sub>Pairing a phone: scan the code, or pair nearby with a 6-digit code.</sub>
</p>
<sub>Screenshots are from the current development build. The connected phone is
-simulated with the command-line client.</sub>
+simulated with the command-line client (`nectarlink --as-phone demo`); the
+mirrored screen is the Android app on an emulator.</sub>
## How it works
diff --git a/core/nectarlink-cli/src/main.rs b/core/nectarlink-cli/src/main.rs
index 30170a0..dd12fd0 100644
--- a/core/nectarlink-cli/src/main.rs
+++ b/core/nectarlink-cli/src/main.rs
@@ -138,8 +138,6 @@ enum Command {
#[arg(long)]
reply: Option<String>,
},
- /// Show a notification on paired PCs as if this were a phone (use with
- /// --as-phone), then stay online to show what the PC does with it.
/// Control what plays on a paired device: play, pause, next, previous,
/// or seek with --position.
Media {
@@ -205,6 +203,18 @@ enum Command {
/// Act as a phone with a few sample conversations (use with --as-phone),
/// so a PC can read them and text through this client; stays online.
Texts,
+ /// Act as a phone with sample content all at once (use with
+ /// --as-phone): notifications, a song playing, conversations and,
+ /// with --call, a call in progress. For screenshots and trying the PC
+ /// app; stays online.
+ Demo {
+ /// Also a call in progress.
+ #[arg(long)]
+ call: bool,
+ /// Artwork for the song (JPEG or PNG).
+ #[arg(long)]
+ art: Option<PathBuf>,
+ },
/// Act as a phone with an incoming call (use with --as-phone): PCs can
/// answer it, then mute, use the speaker, hold, press keys or hang up,
/// as on a phone that controls its calls. Stays online.
@@ -264,6 +274,8 @@ enum Command {
#[arg(long)]
art: Option<PathBuf>,
},
+ /// Show a notification on paired PCs as if this were a phone (use with
+ /// --as-phone), then stay online to show what the PC does with it.
Notify {
title: String,
text: String,
@@ -279,6 +291,10 @@ enum Command {
/// A picture it shows (JPEG, at most 160 KiB).
#[arg(long)]
image: Option<PathBuf>,
+ /// More notifications shown with it, each "App|Title|Text"
+ /// (repeatable).
+ #[arg(long)]
+ also: Vec<String>,
},
}
@@ -1114,6 +1130,87 @@ async fn run(cli: &Cli, node: &Node) -> Result<()> {
println!("Ringing on connected PCs (and on others when they connect).");
watch(node, false).await?;
}
+ Command::Demo { call, art } => {
+ if !cli.as_phone {
+ bail!("the demo is a phone: add --as-phone");
+ }
+ sample_texts();
+ let _ = TEXTS_NODE.set(node.clone());
+ let _ = CALL_NODE.set(node.clone());
+ CALL_CONTROLS.store(true, std::sync::atomic::Ordering::Relaxed);
+ let mut offers = cli.offers.clone();
+ offers.extend(
+ [
+ "notify.mirror",
+ "notify.reply",
+ "media.control",
+ "clip.write",
+ "clip.share",
+ nectarlink_core::SMS_READ,
+ nectarlink_core::SMS_SEND,
+ nectarlink_core::CALLS_STATE,
+ nectarlink_core::CALLS_CONTROL,
+ nectarlink_core::CALLS_IN_CALL,
+ ]
+ .map(str::to_owned),
+ );
+ node.update_power(node_power(cli), offers).await;
+ let now = std::time::SystemTime::now().duration_since(std::time::UNIX_EPOCH)?.as_millis() as i64;
+ let samples = [
+ ("Messages", "Sam Rivera", "Are we still on for dinner tonight?", true),
+ ("Calendar", "Design review", "Today 15:30 · Room 4", false),
+ (
+ "Gmail",
+ "Alex Chen",
+ "Photos from Saturday: here they are, plus the ones from the lake",
+ false,
+ ),
+ ];
+ for (i, (app, title, text, reply)) in samples.into_iter().enumerate() {
+ let mut actions = vec![NotificationAction {
+ id: "read".into(),
+ title: "Mark as read".into(),
+ reply: false,
+ }];
+ if reply {
+ actions.insert(
+ 0,
+ NotificationAction { id: "reply".into(), title: "Reply".into(), reply: true },
+ );
+ }
+ node.notification_posted(Notification {
+ key: format!("demo|{i}"),
+ app: format!("dev.nectarlink.demo.{}", app.to_lowercase()),
+ app_name: app.into(),
+ title: Some(title.into()),
+ text: Some(text.into()),
+ sub: None,
+ when: now - 7 * 60_000 * i as i64,
+ actions,
+ silent: true,
+ icon: None,
+ image: None,
+ })
+ .await;
+ }
+ if *call {
+ let call = nectarlink_core::CallState {
+ id: now.to_string(),
+ state: "active".into(),
+ incoming: true,
+ number: Some("+15550144".into()),
+ name: Some("Sam Rivera".into()),
+ photo: None,
+ missed: false,
+ since: Some(now - 83_000),
+ controls: Some(nectarlink_core::CallControls { can_hold: true, ..Default::default() }),
+ };
+ *CALL.lock().unwrap() = Some(call.clone());
+ node.call_changed(call).await.context("can't tell PCs")?;
+ }
+ println!("Showing sample content to paired PCs.");
+ play(node, "Golden Hour Drive", "Lumen Coast", "Music", 215, art.as_deref()).await?;
+ }
Command::Sms { device, action } => {
let mut offers = cli.offers.clone();
offers.push(nectarlink_core::SMS_SHOW.into());
@@ -1291,7 +1388,7 @@ async fn run(cli: &Cli, node: &Node) -> Result<()> {
println!("Announced to connected PCs that show photos.");
watch(node, false).await?;
}
- Command::Notify { title, text, app, reply, silent, image } => {
+ Command::Notify { title, text, app, reply, silent, image, also } => {
let image = image.as_deref().map(std::fs::read).transpose().context("can't read the picture")?;
if !cli.as_phone {
bail!("notifications come from phones: add --as-phone");
@@ -1320,6 +1417,26 @@ async fn run(cli: &Cli, node: &Node) -> Result<()> {
image,
})
.await;
+ for (i, extra) in also.iter().enumerate() {
+ let mut parts = extra.splitn(3, '|');
+ let (Some(app), Some(title), Some(text)) = (parts.next(), parts.next(), parts.next()) else {
+ bail!("--also takes \"App|Title|Text\"");
+ };
+ node.notification_posted(Notification {
+ key: format!("cli|{when}|{i}"),
+ app: format!("dev.nectarlink.cli.{i}"),
+ app_name: app.into(),
+ title: Some(title.into()),
+ text: Some(text.into()),
+ sub: None,
+ when: when - 60_000 * (i as i64 + 1),
+ actions: Vec::new(),
+ silent: true,
+ icon: None,
+ image: None,
+ })
+ .await;
+ }
println!("Notification sent to connected PCs (and to others when they connect).");
watch(node, false).await?;
}
diff --git a/desktop/app/qml/components/CallCard.qml b/desktop/app/qml/components/CallCard.qml
index 5f3d5e2..a5e5758 100644
--- a/desktop/app/qml/components/CallCard.qml
+++ b/desktop/app/qml/components/CallCard.qml
@@ -55,7 +55,7 @@ Card {
Rectangle {
z: -1
anchors.fill: parent
- radius: width / 2
+ radius: Theme.pill(height)
visible: control.on
color: Theme.graphite ? Theme.surfaceContent : Theme.primary
}
diff --git a/desktop/app/qml/pages/HomePage.qml b/desktop/app/qml/pages/HomePage.qml
index 802b865..1e540cc 100644
--- a/desktop/app/qml/pages/HomePage.qml
+++ b/desktop/app/qml/pages/HomePage.qml
@@ -266,7 +266,7 @@ Item {
ActionTile {
width: actions.tileWidth
title: qsTr("Send clipboard")
- subtitle: Preferences.autoClipboard ? qsTr("Copies go over by themselves") : qsTr("To the phone")
+ subtitle: Preferences.autoClipboard ? qsTr("Syncs automatically") : qsTr("To the phone")
iconPath: Icons.clipboard
feature: home.feature("clipboard.pc_to_phone")
onClicked: AppController.sendClipboard(home.deviceId)
diff --git a/desktop/app/qml/pages/MessagesPage.qml b/desktop/app/qml/pages/MessagesPage.qml
index 0c2c0e0..6248c1c 100644
--- a/desktop/app/qml/pages/MessagesPage.qml
+++ b/desktop/app/qml/pages/MessagesPage.qml
@@ -99,12 +99,15 @@ Item {
}
onDeviceIdChanged: { composing = false; load() }
- // "14:05", "Tue", or a date.
+ // "14:05", "Yesterday", "Tue", or a date.
function shortTime(ms) {
const date = new Date(ms)
const now = new Date()
if (date.toDateString() === now.toDateString())
return date.toLocaleTimeString(Qt.locale(), Locale.ShortFormat)
+ const yesterday = new Date(now.getFullYear(), now.getMonth(), now.getDate() - 1)
+ if (date.toDateString() === yesterday.toDateString())
+ return qsTr("Yesterday")
if (now - date < 6 * 24 * 3600 * 1000)
return date.toLocaleDateString(Qt.locale(), "ddd")
return date.toLocaleDateString(Qt.locale(), Locale.ShortFormat)
diff --git a/docs/screenshots/desktop-bloom-home.png b/docs/screenshots/desktop-bloom-home.png
index d3de1d1..0fa91cb 100644
Binary files a/docs/screenshots/desktop-bloom-home.png and b/docs/screenshots/desktop-bloom-home.png differ
diff --git a/docs/screenshots/desktop-bloom-settings.png b/docs/screenshots/desktop-bloom-settings.png
index 6d073a8..dce963e 100644
Binary files a/docs/screenshots/desktop-bloom-settings.png and b/docs/screenshots/desktop-bloom-settings.png differ
diff --git a/docs/screenshots/desktop-graphite-home.png b/docs/screenshots/desktop-graphite-home.png
index 5e81d6e..6e4125e 100644
Binary files a/docs/screenshots/desktop-graphite-home.png and b/docs/screenshots/desktop-graphite-home.png differ
diff --git a/docs/screenshots/desktop-graphite-settings.png b/docs/screenshots/desktop-graphite-settings.png
index ad9b0b2..63d85e0 100644
Binary files a/docs/screenshots/desktop-graphite-settings.png and b/docs/screenshots/desktop-graphite-settings.png differ
diff --git a/docs/screenshots/desktop-messages.png b/docs/screenshots/desktop-messages.png
new file mode 100644
index 0000000..2bcd405
Binary files /dev/null and b/docs/screenshots/desktop-messages.png differ
diff --git a/docs/screenshots/desktop-mirroring.png b/docs/screenshots/desktop-mirroring.png
new file mode 100644
index 0000000..3232cfd
Binary files /dev/null and b/docs/screenshots/desktop-mirroring.png differ