android-ble

Implement Android BLE central role with GATT connection management and background operations.

Updated Jul 20, 2026
One-click install
npx skills add https://github.com/trancee/MeshLink-template --skill android-ble
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: android-ble
Source: https://github.com/trancee/MeshLink-template/tree/main/.agents/skills/android-ble
Command: npx skills add https://github.com/trancee/MeshLink-template --skill android-ble

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill simplifies the complex, multi-layered process of implementing Bluetooth Low Energy (BLE) on Android, handling everything from permission management and scanning to GATT connection lifecycles and background operations.

Core Features & Use Cases

  • GATT Lifecycle Management: Provides robust patterns for connecting to peripherals, discovering services, and managing characteristic read/write/notify operations.
  • Background BLE Support: Offers guidance on using PendingIntent scanning, CompanionDeviceManager, and foreground services to maintain connectivity when the app is in the background.
  • Use Case: Use this Skill when building a cross-platform mesh messaging SDK to ensure reliable BLE scanning, stable GATT connections, and power-efficient background data transfer between Android devices.

Quick Start

Use the android-ble skill to implement a bound service that manages a GATT connection and handles characteristic notifications for a peripheral device.

Frequently Asked Questions about android-ble

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

FAQPage Schema
How do I manage the Android BLE GATT connection lifecycle reliably?

Android BLE GATT connection lifecycle management requires robust patterns for connecting to peripherals, discovering services, and handling characteristic read/write/notify operations to ensure stable device communication.

How do I maintain Bluetooth Low Energy scanning when the app is in the background?

BLE background operations are maintained using PendingIntent scanning, CompanionDeviceManager, and foreground services to preserve peripheral connectivity and enable power-efficient data transfer when the app is backgrounded.

Do I need special permission handling for Bluetooth Low Energy on Android API 31+?

Android API 31+ requires specific permission handling for Bluetooth Low Energy, enforcing strict runtime checks before scanning to ensure secure and compliant peer-to-peer peripheral connectivity.

What is the best way to handle memory-safe GATT callbacks in Android BLE development?

Memory-safe GATT callbacks in Android BLE development utilize robust patterns for characteristic operations and connection management, preventing leaks during long-lived peripheral connectivity and sensor data acquisition.

Can I use CompanionDeviceManager for peer-to-peer Android BLE data transfer?

CompanionDeviceManager supports peer-to-peer Android BLE data transfer by facilitating background scanning and pairing without requiring continuous foreground location permissions, streamlining peripheral connectivity.

Why does my Android BLE foreground service drop connectivity to peripheral devices?

Foreground service connectivity drops occur when proper lifecycle management and PendingIntent scanning are absent, requiring robust patterns to maintain long-lived peripheral connections during background operations.