Skip to content

Suggestion: move the initialization of the CBPeripheralManager out from the init #39

Description

@Intellithings

Today, CBPeripheralManager manager is being initialized inside the init method.
That causes the app to show the OS permission popup immediately when you run the app.

In many cases you want to show your own explanation message before you request permission. You might want to do it later on your app flow.

if you place it in the getState method, it will only request permission once you subscribe to the onStateChanged event.
Alternatively, a new bleInit method can be added that initializes the manager.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions