core_rtlsdr 0.2.0 copy "core_rtlsdr: ^0.2.0" to clipboard
core_rtlsdr: ^0.2.0 copied to clipboard

PlatformAndroid

Testable radio engine for RTL-SDR on Android/Flutter: tuning, streaming, demodulation, gain, squelch, stereo/RDS, spectrum, recording, band scan and presets as ChangeNotifier controllers on top of the [...]

0.2.0 #

  • Bumped the driver_rtlsdr dependency to ^0.2.0 for its new fd-based recording API (startRecordingFd/startIqRecordingFd on NativeBindings, plus DownloadsChannel).
  • Added RecordingController.startRecordingToDownloads/ startIqRecordingToDownloads: records into the real, shared Downloads folder via Android's MediaStore (API 29+) instead of app-specific storage. Falls back to the existing defaultRecordingPath/ startRecording(path) flow automatically on any failure opening the MediaStore entry (in practice: Android below API 29, where the MediaStore.Downloads collection doesn't exist and there's no plain path into the public Downloads folder to use instead) — the feature degrades gracefully rather than erroring out.
  • Added RecordingController.shareRecording/shareIqRecording: shares the last completed recording via Android's native share sheet, regardless of which flow started it (Downloads/MediaStore shares by content:// URI directly; a plain-path recording is resolved to a shareable URI via a bundled FileProvider first).
  • RtlSdrDriver interface + NativeRtlSdrDriver: added startRecordingFd/startIqRecordingFd. FakeRtlSdrDriver (testing.dart): added matching fakes (recordingFd/iqRecordingFd fields). New FakeDownloadsChannel (testing.dart) makes all of the above fully unit-testable on a host, no Android device/emulator needed.

0.1.0 #

  • Bumped the driver_rtlsdr dependency from ^0.0.2 to ^0.1.2 to pick up SSB demodulation and raw I/Q recording (0.0.2's tight caret constraint couldn't resolve past 0.0.x at all, so this package was stuck behind every driver_rtlsdr release since).
  • Added raw I/Q recording (.cu8, pre-demodulation), independent of the existing demodulated-PCM recording — both can run at once: RtlSdrDriver.startIqRecording/stopIqRecording/isIqRecording, RecordingController.startIqRecording/stopIqRecording (+ isIqRecording/currentIqFilePath/lastIqRecordingPath/lastIqError), defaultIqRecordingPath/buildIqRecordingFileName, and a new RadioStats.iqRecordingBytesWritten (mirrored on RadioController) for live progress.
  • Example app: the demod mode selector now covers all 5 DemodMode values (added USB/LSB), and the recording section now has independent PCM/I·Q controls with live bytes-written stats for both — exercising the whole new API surface manually, not just what integration_test touches.
  • Added a tag-triggered publish.yml workflow using dart-lang/setup-dart's reusable publish.yml (OIDC trusted publishing) — simpler and less brittle than a hand-rolled pub publish step, and avoids a bug the previous approach had (missing the dart-lang/setup-dart step that actually configures OIDC credentials, since fixed the same way in driver_rtlsdr). The hand-rolled publish-pub-dev job in release.yml is removed in favor of this dedicated workflow.

0.0.2 #

  • Switched the driver_rtlsdr dependency from a local path: reference to the published ^0.0.2 on pub.flutter-io.cn — no more monorepo checkout required to build this package. Requires ^0.0.2 specifically: 0.0.1's Android build only targets arm64-v8a/armeabi-v7a, which made the on-device integration test fail on the CI's x86_64 emulator (the native library simply wasn't packaged for that ABI) — 0.0.2 adds the opt-in x86_64 build needed there.
  • Fixed the on-device integration test job in CI: the arm64-v8a emulator on GitHub's shared macOS runners can't hardware-accelerate (HVF error: HV_UNSUPPORTED) — switched to a KVM-accelerated x86_64 emulator on ubuntu-latest, matching driver_rtlsdr's own CI fix.
  • Release workflow: the example APK is now attached to GitHub Releases as its own downloadable asset (previously only bundled inside the zip), and added a publish-pub-dev job (OIDC trusted publishing, with a timeout so a not-yet-configured trusted-publishing setup fails in minutes instead of hanging) so tagging a release also publishes to pub.flutter-io.cn.
  • README: expanded the single minimal snippet into an Android setup section plus 10 numbered usage examples (USB, tuning, demod mode, gain, stereo/ RDS, spectrum, recording, scanning, presets, full provider composition) and 3 more FakeRtlSdrDriver testing examples. Added pub.flutter-io.cn/CI badges.

0.0.1 #

  • Initial release: a testable radio engine on top of driver_rtlsdr.
  • RtlSdrDriver interface + NativeRtlSdrDriver (real, Android-only adapter over driver_rtlsdr's NativeBindings) + FakeRtlSdrDriver (package:core_rtlsdr/testing.dart), so every controller is unit -testable on a host with no dongle, emulator or Android device.
  • Controllers: RadioController (tuning/streaming/demod/gain/squelch/ stereo, owns spectrumController/rdsController), SpectrumController, RdsController, RecordingController (+ defaultRecordingPath), ScanController, PresetsController (+ PresetsRepository, SharedPreferencesPresetsRepository, InMemoryPresetsRepository). Ported from the rtl-sdr mobile reference app's lib/radio/ controllers, decoupled from FFI/dart:io and given full unit test coverage.
  • Re-exports UsbState/UsbChannel/UsbDeviceInfo/UsbConnectionStatus/ DemodMode from driver_rtlsdr, so consumers only need to depend on this one package.
  • example/: a complete Flutter app (USB permission → tuning → mode/gain/ squelch → stereo/RDS → spectrum → recording → band scan → presets) exercising every controller through a plain Material UI, plus an integration_test/ proving NativeRtlSdrDriver reaches libnative_rtlsdr.so on-device.
  • CI (flutter analyze/flutter test for the package and example app, a debug APK build, and an on-device integration test matrix) and a tag-triggered release workflow.
0
likes
140
points
35
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Testable radio engine for RTL-SDR on Android/Flutter: tuning, streaming, demodulation, gain, squelch, stereo/RDS, spectrum, recording, band scan and presets as ChangeNotifier controllers on top of the driver_rtlsdr plugin. Built so UI packages (e.g. widget_rtlsdr) never touch FFI directly.

Repository (GitHub)
View/report issues
Contributing

Topics

#android #radio #sdr #ffi #hardware

License

unknown (license)

Dependencies

driver_rtlsdr, ffi, flutter, path_provider, shared_preferences

More

Packages that depend on core_rtlsdr