android-bluetooth-expert

Guide Android Bluetooth Classic and BLE development across API levels 21 through 34.

1|Updated Mar 19, 2026
One-click install
npx skills add https://github.com/trancee/MeshLink-old --skill android-bluetooth-expert
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: android-bluetooth-expert
Source: https://github.com/trancee/MeshLink-old/tree/main/.agents/skills/android-bluetooth-expert
Command: npx skills add https://github.com/trancee/MeshLink-old --skill android-bluetooth-expert

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Android Bluetooth and BLE development is complex, and this skill provides practical guidance, code samples, and debugging strategies to implement, diagnose, and review Bluetooth functionality across Classic, BLE, CDM, and LE Audio on Android.

Core Features & Use Cases

  • Comprehensive coverage for Bluetooth Classic (RFCOMM, SPP, A2DP) and BLE (scanning, GATT client/server, notifications, descriptors)
  • Companion Device Manager (CDM) pairing guidance to avoid location permissions, API 26+ differences, and best practices across API levels
  • Debugging and architecture patterns, including GATT operation queuing and bound-service models for BLE, with status-code diagnostics (e.g., 133)

Quick Start

Initialize Bluetooth, request proper permissions per API level, scan for devices, connect to a chosen device, then exchange data with RFCOMM or GATT as appropriate.

Frequently Asked Questions about android-bluetooth-expert

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I handle Android Bluetooth permissions correctly across different API levels?

Android Bluetooth permissions require different approaches before and after API 31. You must request legacy location permissions for older API levels while using the newer Bluetooth permissions introduced in API 31 and above to ensure proper scanning and connectivity.

Why does my Android BLE GATT connection fail with status code 133?

Android BLE GATT status code 133 typically indicates a connection failure caused by overlapping GATT operations or improper connection management. Serializing GATT operations through a queue and using a bound-service pattern helps diagnose and resolve this error.

How do I use Companion Device Manager to pair Bluetooth devices without location permissions?

Companion Device Manager (CDM) pairs Bluetooth devices without location permissions by using API 26+ specific pairing flows. It handles API level differences automatically, allowing you to bypass standard location permission requirements for BLE and Classic devices.

What is the best way to structure an Android BLE service for GATT operations?

The best way to structure an Android BLE service is using a bound-service pattern. This approach serializes GATT operations through a queue, preventing concurrent operation failures and ensuring robust data transfer and connection management.

Does Android BLE support LE Audio routing across API levels 21 through 34?

Android BLE supports LE Audio routing across API levels 21 through 34 with specific implementation differences. You must apply API-specific coding practices to handle audio routing correctly while maintaining secure and safe connections.

How do I scan for and exchange data with Bluetooth Classic devices using RFCOMM?

To exchange data with Bluetooth Classic devices using RFCOMM, initialize Bluetooth, request proper permissions, scan for devices, and establish an SPP connection. This allows bidirectional data transfer streams distinct from BLE GATT operations.