advertize

schedule a recurring post to advertise on nostr, no nsec is stored, only signed events

git clone https://git.smesh.lol/advertize.git

Advertize

Android app that pre-generates and schedules Nostr ad posts. Enter your nsec once, generate a batch of signed events, and the app posts them on schedule with no further interaction.

No key storage. The nsec is used only during batch generation, then wiped with 16-64 random cycles of SHA-256 overwrite.

Features

  • QR scan the nsec instead of typing it
  • Pre-generates 7 days of signed Nostr events (kind 1) with chained commitment tags
  • Randomized posting schedule ~8h intervals with +/-2h jitter
  • Smart relay discovery: fetches your follow list (kind 3), then their relay lists (kind 10002), picks the top 16 most common relays, refreshes 5 minutes before each post
  • Live countdown notification shows time to next post, persists in status bar while ads are pending
  • Auto-resumes on app launch or device reboot if pending ads exist
  • Low-battery alert notifies you a day before ads run out
  • BIP340 Schnorr signing via Go native library, compiled for all Android ABIs

APK Download

https://git.smesh.lol/advertize-releases/raw/branch/main/advertize-v1.0.0.apk

Screenshots

GenerateStatus
nsec input + QR scanpending queue
ad content editornext post countdown
days selectorposted history

Build from source

Requirements:

  • Go 1.25+
  • Android SDK 36 + NDK
  • gomobile
git clone https://git.smesh.lol/advertize.git
cd advertize

# Build native crypto library
cd crypto
gomobile bind -target=android -androidapi 26 -o ../app/libs/crypto.aar .
cd ..

# Build APK
echo "sdk.dir=$ANDROID_HOME" > local.properties
./gradlew assembleDebug

# Install
adb install app/build/outputs/apk/debug/app-debug.apk

Architecture

Kotlin/Compose UI
    |
    v
PostingService (foreground, AlarmManager-scheduled)
    |
    +-- RelayDiscovery (kind 3 -> kind 10002 -> top 16)
    +-- RelayPool (OkHttp WebSocket publisher)
    +-- BatchGenerator (pre-sign events in Room DB)
    +-- crypto.aar (Go gomobile: BIP340 Schnorr, secp256k1)

Crypto is a thin Go module over git.mleku.dev/mleku/nostr compiled to native code via gomobile. No JNI hand-writing. All 4 Android ABIs bundled (arm64-v8a, armeabi-v7a, x86, x86_64).

Permissions

  • Internet: relay communication
  • Camera: QR code scanning (nsec input only, on-demand)
  • Foreground service: persistent notification while posting, auto-starts on boot if pending
  • Exact alarms: scheduled post wakeups
  • Notifications: posting status and low-battery alerts

files