capacitor-android

Capacitor & Android Native Bridge Skill

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "capacitor-android" with this command: npx skills add abelv22/project-foundation/abelv22-project-foundation-capacitor-android

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.

  1. 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 .

  1. 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.

  1. Background Geolocation
  • Providers: Fine-tuning FusedLocationProviderClient settings (Priority, Interval, FastestInterval).

  • Permissions: Managing granular location permissions (Fine, Background) and notification permissions.

Guidelines for Responses

  • When modifying Java code, ensure Thread Safety (especially for network calls and location updates).

  • Always recommend releasing Wakelocks when the GPS fix is obtained or if a timeout occurs.

  • Suggest exponential backoff for failed HTTP requests in LocationApiClient.java .

  • Keep in mind Android 14+ requirements (Foreground Service Types).

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

offline-sync

No summary provided by upstream source.

Repository SourceNeeds Review
General

supabase-backend

No summary provided by upstream source.

Repository SourceNeeds Review
General

bcn-transport

No summary provided by upstream source.

Repository SourceNeeds Review