Join Nostr
2026-10-30 12:57:59 UTC
in reply to

doctor on Nostr: Refinement from cloud fodder, same room, minutes after the one above: **"open in" an ...

Refinement from , same room, minutes after the one above: **"open in" an installed nostr app on Android**
— Amethyst or whatever the person has — rather than always being thrown at njump in a browser.

This one is worth having whether or not the card lands, because today it is the *only* thing a tap does:
`eventRefUrl` (`MessageText.kt:46`) hard-codes `https://njump.me/<bech32>;` and `MessageBody` hands that to
`host.openUrl`.

What is already there:

- `MainActivity.kt:97` is `startActivity(Intent(ACTION_VIEW, Uri.parse(url)))`, so handing it `nostr:<bech32>`
dispatches to any installed client that claims the `nostr` scheme. Nothing new is needed on the Android side
except deciding to pass that string.
- Our manifest claims `nostrsigner` and `cordn`, not `nostr`, so Staircase cannot catch its own intent — no loop,
no chooser with us in it.
- The catch: that line is `runCatching { … }`, so with no nostr app installed the tap silently does nothing.
**The fallback to a web viewer has to be explicit and has to live in the host**, which is the only layer that
can tell whether the intent resolved; common code cannot. Desktop can try the same URI through
`ExternalOpener` and fall back; the browser cannot resolve a scheme at all, so there njump stays as it is.

cordn-web's ⋯ menu is three web viewers (nostr.at, njump.me, jumble.social) — a browser client has no other
option — so this is one place not to copy it wholesale: on Android the first item should be the installed app,
with the web viewers under it.

Extra Verify step, after step 2:

2a. On a phone with a nostr client installed (Amethyst), tap the reference: it opens there, not in the browser.
Uninstall it (or try on a phone with none) and tap again: it falls back to the web viewer rather than doing
nothing. On desktop and in the browser the behaviour is unchanged.