EddyVerbruggen / Nativescript Headset Detection
Licence: mit
Detect when a headphone (jack or bluetooth) is (dis)connected.
Stars: ✭ 11
Programming Languages
typescript
32286 projects
Labels
Projects that are alternatives of or similar to Nativescript Headset Detection
Ble
Connect to and interact with Bluetooth LE peripherals.
Stars: ✭ 156 (+1318.18%)
Mutual labels: bluetooth, nativescript
Nativescript Masked Text Field
#️⃣ A NativeScript Masked Text Field widget
Stars: ✭ 24 (+118.18%)
Mutual labels: nativescript
Esp32 Ble Keyboard
Bluetooth LE Keyboard library for the ESP32 (Arduino IDE compatible)
Stars: ✭ 533 (+4745.45%)
Mutual labels: bluetooth
Room Assistant
Presence tracking and more for automation on the room-level
Stars: ✭ 764 (+6845.45%)
Mutual labels: bluetooth
Androbd
Android OBD diagnostics with any ELM327 adapter
Stars: ✭ 573 (+5109.09%)
Mutual labels: bluetooth
Blue
Easily switch bluetooth peripherals between multiple macs
Stars: ✭ 18 (+63.64%)
Mutual labels: bluetooth
Nativescript Vue
Native mobile applications using Vue and NativeScript.
Stars: ✭ 4,784 (+43390.91%)
Mutual labels: nativescript
Bluesmirf
RN-41/42 bluetooth module breakout boards, available from SparkFun Electronics
Stars: ✭ 9 (-18.18%)
Mutual labels: bluetooth
Bluejay
A simple Swift framework for building reliable Bluetooth LE apps.
Stars: ✭ 917 (+8236.36%)
Mutual labels: bluetooth
Galaxybudsclient
Unofficial Galaxy Buds Client for Windows
Stars: ✭ 733 (+6563.64%)
Mutual labels: bluetooth
Rpi Audio Receiver
Raspberry Pi Audio Receiver with Bluetooth A2DP, AirPlay, UPnP and Spotify Connect
Stars: ✭ 650 (+5809.09%)
Mutual labels: bluetooth
Nativescript Particle
🕹 Control your https://particle.io devices from NativeScript
Stars: ✭ 19 (+72.73%)
Mutual labels: nativescript
Fix Bt A2dp
Workaround fixing no A2DP when BT headphone reconnects automatically (after being paired)
Stars: ✭ 25 (+127.27%)
Mutual labels: bluetooth
Sparrow Wifi
Next-Gen GUI-based WiFi and Bluetooth Analyzer for Linux
Stars: ✭ 525 (+4672.73%)
Mutual labels: bluetooth
Broadcom Bt Firmware
Repository for various Broadcom Bluetooth firmware
Stars: ✭ 677 (+6054.55%)
Mutual labels: bluetooth
Openhaystack
Build your own 'AirTags' 🏷 today! Framework for tracking personal Bluetooth devices via Apple's massive Find My network.
Stars: ✭ 794 (+7118.18%)
Mutual labels: bluetooth
Nativescript Paystack
Nativescript integration for Paystack payment platform
Stars: ✭ 10 (-9.09%)
Mutual labels: nativescript
NativeScript Headset Detection plugin
Installation
tns plugin add nativescript-headset-detection
API
isConnected
To check for a headset at any given moment, use this method:
JavaScript
var headsetDetection = require("nativescript-headset-detection");
headsetDetection.isConnected()
.then(function (connected) { console.log("Connected? " + connected); })
.catch(function (err) { console.log("Error: " + err)});
TypeScript
import * as headsetDetection from 'nativescript-headset-detection';
headsetDetection.isConnected()
.then(connected => console.log(`Connected? ${connected}`))
.catch(err => console.log(`Error: ${err}`));
onConnectionStateChanged
To listen to changes to the headset state, use this one (adding it to a high level component like `app.[ts|js] makes sense); you can pass in a callback function that gets invoked whenever a headset is (dis)connected:
JavaScript
var headsetDetection = require("nativescript-headset-detection");
headsetDetection.onConnectionStateChanged(function (connected) {
console.log("Connection changed to: " + connected);
});
TypeScript
import * as headsetDetection from 'nativescript-headset-detection';
headsetDetection.onConnectionStateChanged(connected => console.log(`Connection changed to: ${connected}`));
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].