capacitor-android

Installation
SKILL.md

Capacitor & Android Native Bridge Skill

This skill enables the assistant to handle the complex interaction between the Web layer (React) and the Native layer (Java/Android) specifically for background tracking.

Knowledge Areas

1. Android Foreground Services

  • Lifecycle Management: Start/stop/restart logic for LocationTrackingService.java.
  • Notifications: Maintaining persistent notifications required by Android for foreground tasks.
  • Boot Persistence: Implementing BOOT_COMPLETED receivers to restart tracking on device reboot.

2. Battery & Power Management

  • Wakelocks: Smart management of PARTIAL_WAKE_LOCK to balance tracking consistency with battery life.
  • Doze Mode: Using AlarmManager.setExactAndAllowWhileIdle() for reliable 60s intervals.
  • Optimization Whitelisting: Handling REQUEST_IGNORE_BATTERY_OPTIMIZATIONS.

3. Capacitor Plugin Development

  • Bridge Communication: Efficiently passing data between ProTrackingPlugin.java and React.
  • Native-to-Web Events: Using notifyListeners for real-time status updates in the UI.
Related skills
Installs
89
First Seen
Jan 29, 2026