OiO.lk Community platform!

Oio.lk is an excellent forum for developers, providing a wide range of resources, discussions, and support for those in the developer community. Join oio.lk today to connect with like-minded professionals, share insights, and stay updated on the latest trends and technologies in the development field.
  You need to log in or register to access the solved answers to this problem.
  • You have reached the maximum number of guest views allowed
  • Please register below to remove this limitation

Music is not being played through BLE connected headphone on iPhone

  • Thread starter Thread starter Ganesh Pawar
  • Start date Start date
G

Ganesh Pawar

Guest
I have created a demo iOS app to create BLE connection with surrounding headphone.

I am able to connect to headphone successfully through my demo iOS app. I can also see in iPhone Bluetooth Setting that headphone is connected but when i am playing music from Spotify/YouTube then music is not being played through headphone. It is still using iPhone speakers.

First i am scanning sarounding bluetooth Devices through CBCentralManager and then connecting one of the found device.

cBCenteralManager.scanForPeripherals(withServices: nil, options: nil)

For connecting:

cBCenteralManager.connect(peripheral, options: nil)

Do i need to make any code changes while connecting via BLE?

I am expecting when i am connecting to headphone via my Demo app. Same connection is visible in iPhone Bluetooth setting too then when i play music on spotify/youtube then sound should be played on headphone and not on iPhone speakers.
<p>I have created a demo iOS app to create BLE connection with surrounding headphone.</p>
<p>I am able to connect to headphone successfully through my demo iOS app. I can also see in iPhone Bluetooth Setting that headphone is connected but when i am playing music from Spotify/YouTube then music is not being played through headphone. It is still using iPhone speakers.</p>
<p>First i am scanning sarounding bluetooth Devices through CBCentralManager and then connecting one of the found device.</p>
<p><code>cBCenteralManager.scanForPeripherals(withServices: nil, options: nil)</code></p>
<p>For connecting:</p>
<p><code>cBCenteralManager.connect(peripheral, options: nil)</code></p>
<p>Do i need to make any code changes while connecting via BLE?</p>
<p>I am expecting when i am connecting to headphone via my Demo app. Same connection is visible in iPhone Bluetooth setting too then when i play music on spotify/youtube then sound should be played on headphone and not on iPhone speakers.</p>
Continue reading...
 

Latest posts

I
Replies
0
Views
1
impact christian
I
Top