Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private IBluetoothProfileServiceListener _bluetoothProfileServiceListener;
- public BluetoothAdapter MBluetoothAdapter;
- MBluetoothAdapter = BluetoothAdapter.DefaultAdapter;
- _bluetoothProfileServiceListener = new ServiceListener();
- MBluetoothAdapter.GetProfileProxy(BaseContext,
- _bluetoothProfileServiceListener, ProfileType.A2dp);
- private class ServiceListener : IBluetoothProfileServiceListener
- {
- public void Dispose()
- {
- }
- public IntPtr Handle { get; }
- public void OnServiceConnected(ProfileType profile,IBluetoothProfile proxy)
- {
- if (profile == ProfileType.A2dp)
- {
- //service connected
- }
- }
- public void OnServiceDisconnected(ProfileType profile)
- {
- }
- }
Add Comment
Please, Sign In to add comment