Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PlatformException (PlatformException(18, UNDOCUMENTED, startAdvertising, null)) #160

Open
zhuwei opened this issue Oct 31, 2023 · 1 comment

Comments

@zhuwei
Copy link

zhuwei commented Oct 31, 2023

Setting includeDeviceName: true on Android will result in an exception

@CellCS
Copy link

CellCS commented Mar 27, 2024

If add "includeDeviceName: true", here is using Android 12.

  final AdvertiseData advertisePeriodicData = AdvertiseData(
      localName: "bletester",
      includeDeviceName: true);

This exception log:

I/BluetoothLeAdvertiser(22345): startAdvertising is called
I/BLE Peripheral state (22345): idle
E/flutter (22345): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(2, ADVERTISE_FAILED_TOO_MANY_ADVERTISERS, startAdvertising, null)
E/flutter (22345): #0      StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:651:7)
E/flutter (22345): #1      MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:334:18)
E/flutter (22345): <asynchronous suspension>
E/flutter (22345): #2      FlutterBlePeripheral.start (package:flutter_ble_peripheral/src/flutter_ble_peripheral.dart:89:9)
E/flutter (22345): <asynchronous suspension>
E/flutter (22345): #3      FlutterBlePeripheralExampleState.build.<anonymous closure> (package:mybleperitest/main.dart:172:19)
E/flutter (22345): <asynchronous suspension>
E/flutter (22345): 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants