ble_provider 0.0.5 copy "ble_provider: ^0.0.5" to clipboard
ble_provider: ^0.0.5 copied to clipboard

This package provides Flutter access to Polestar indoor location provider.

ble_provider #

This package provides Flutter access to Pole Star indoor location provider. It is a Flutter wrapper that includes:

Adding the Pole Star key #

This project requires a Pole Star key, which can be found under the "Indoor Location" tab of your venue on the Mapwize Studio; without a valid key, the provider will crash when initialized.

To inject it into example app, create a example/.env file containing access token under POLESTAR_KEY key.

Available methods #

Future<void> init (String polestarKey) Must be called to initialize the Pole Star indoor location provider.

Future<bool> setLocationCallback (Function(IndoorLocation) callback) Sets the function to be called when the package receives a new location.

Future<bool> start() Starts the indoor location provider; returns true if started properly.

Future<bool> stop() Stops the indoor location provider; returns true if stopped properly.

iOS installation #

You have to setup keys in the Info.plist file to explain why you need location and Bluetooth access.

<key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
<string>This example app displays locations gathered from Polestar beacons.</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string>This example app displays locations gathered from Polestar beacons.</string>
<key>NSLocationAlwaysUsageDescription</key>
<string>We need to have access to your location for this example app to work.</string>
<key>NSBluetoothAlwaysUsageDescription</key>
<string>We need to have access to Bluetooth to receive location information from Bluetooth beacons.</string>

iOS known issues #

  • stop() returns false, even if provider does not send locations anymore
  • You might have to manually include NAO files into ble_provider target
3
likes
40
pub points
0%
popularity

Publisher

verified publisherremyraes.com

This package provides Flutter access to Polestar indoor location provider.

Homepage

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on ble_provider