You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've looked at the README 'Common Problems' section
Have you checked this problem on the example app?
No
FlutterBluePlus Version
1.34.5
Flutter Version
3.27.1
What OS?
iOS
OS Version
15.8.3 and higher
Bluetooth Module
Don't know
What is your problem?
Bluetooth feature is not mandatory for using our app. However, if we disable Bluetooth in iOS settings (or control panel) we get the popup "Your App would like to use Bluetooth for new connections. You can allow new connections in Settings.".
This happens every time opening the app without BLE turned on. It's annoying for our users.
We set the showPowerAlert option to false right at the start of the app in the Flutter main method, before calling any other FlutterBluePlus method:
Future<void> main() async {
awaitFlutterBluePlus.setOptions(showPowerAlert:false);
// Other initializations
}
In the FBP documentation it's said that this needs to be set before any other method of the package:
/// Set configurable options /// - [showPowerAlert] Whether to show the power alert (iOS & MacOS only). i.e. CBCentralManagerOptionShowPowerAlertKey /// To set this option you must call this method before any other method in this package. /// See: https://developer.apple.com/documentation/corebluetooth/cbcentralmanageroptionshowpoweralertkey /// This option has no effect on Android.
How can this system popup be prevented from being shown every time the app is started?
Example:
Logs
No logs since I don't have a MAC right here at the moment.
The text was updated successfully, but these errors were encountered:
@chipweinberger Here are the logs, when we restart the app (with await FlutterBluePlus.setOptions(showPowerAlert: false);
in the Flutter main method):
[FBP-iOS] handleMethodCall: flutterRestart
[FBP-iOS] initializing CBCentralManager
[FBP-iOS] showPowerAlert: no
[FBP-iOS] restoreState: no
API MISUSE: <CBCentralManager: 0x3025de580> has no restore identifier but the delegate implements the centralManager:willRestoreState: method. Restoring will not be supported
[FBP-iOS] initializing checkForMtuChangesTimer
[FBP-iOS] disconnectAllDevices(flutterRestart)
[FBP-iOS] connectedPeripherals: 0
Requirements
Have you checked this problem on the example app?
No
FlutterBluePlus Version
1.34.5
Flutter Version
3.27.1
What OS?
iOS
OS Version
15.8.3 and higher
Bluetooth Module
Don't know
What is your problem?
Bluetooth feature is not mandatory for using our app. However, if we disable Bluetooth in iOS settings (or control panel) we get the popup "Your App would like to use Bluetooth for new connections. You can allow new connections in Settings.".
This happens every time opening the app without BLE turned on. It's annoying for our users.
We set the showPowerAlert option to false right at the start of the app in the Flutter main method, before calling any other FlutterBluePlus method:
In the FBP documentation it's said that this needs to be set before any other method of the package:
How can this system popup be prevented from being shown every time the app is started?
Example:
Logs
No logs since I don't have a MAC right here at the moment.
The text was updated successfully, but these errors were encountered: