need this permission: 
<uses-permission android:name="android.permission.BLUETOOTH"></uses-permission>
and code snap:
                AudioManager audioManager = (AudioManager)context.getSystemService(Context.AUDIO_SERVICE);
                if (audioManager.isWiredHeadsetOn()
                        || audioManager.isBluetoothA2dpOn()
                        || audioManager.isBluetoothScoOn() ) {
      // headset connected 
}
Subscribe to:
Post Comments (Atom)
Enable HP Zbook Thunderbolt 3 Dock on Ubuntu
As mention in previously post, I installed Ubuntu on my HP ZBook. After two days used all things work just fine, but the Thunderbolt 3 Dock ...
- 
As mention in previously post, I installed Ubuntu on my HP ZBook. After two days used all things work just fine, but the Thunderbolt 3 Dock ...
 - 
I tried to add a VideoView to a layout dynamic via code in my Android app, but the whole screen flashes when the VideoView was added first ...
 - 
To create a button in Android app like this: The layout XML: <Button android:layout_width="match_parent" andro...
 
No comments:
Post a Comment