Skip to content

BLE Architecture Best Practices? #614

Description

@libhide

I am working on an Android app that needs to communicate with a BLE device. I am using Android-BLE-Library for this as this is a production-grade app. I had a question around using the library within an architecture I desire for my codebase.

I would ideally like a way to have clean separation between Nordic and business logic about the device I am working with. Specifically:

  • I want a "general peripheral layer" that uses Nordic to expose a BLE API that lets me connect to a peripheral, discover services, read/write to characteristics, etc.
  • Next, I want a "device-specific layer" that uses the general layer and exposes functionality to other higher layers of my app

Is an architecture like this possible with this library? My hunch is that it isn't given the recommended usage guide that recommends creating a BleManager instance. But, maybe I am missing something?

I would love any guidance possible here to help me achieve my goal. Pseudo code would be really helpful too.

Thanks!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions