Repository inventory

abelv22/project-foundation

Skills indexed from this repository, with install-style signals scoped to the repo.
3 skills0 GitHub stars0 weekly installsTypeScriptGitHubOwner profile

Overview

This skill specializes in Capacitor cross-platform development with deep expertise in Android native Java for reliable background tracking and battery-aware services. It focuses on building and maintaining foreground services, wakelock management, and a robust Capacitor plugin bridge between React and native code. The goal is consistent location updates with minimal battery impact and smooth Web-to-Native communication.

How this skill works

The skill inspects and designs Android foreground services (e.g., LocationTrackingService.java) with correct lifecycle handling, persistent notifications, and boot persistence. It configures wakelocks and Doze-safe scheduling (setExactAndAllowWhileIdle) while tuning FusedLocationProviderClient for desired intervals and accuracy. Capacitor plugin code (ProTrackingPlugin.java) and native clients (LocationApiClient.java) are implemented with thread-safe event delivery using notifyListeners and exponential backoff for network retries.

When to use it

  • Building background location tracking for a Capacitor React app
  • Implementing Android foreground services with correct notification and boot restart behavior
  • Optimizing battery use while maintaining reliable periodic work (60s or similar)
  • Creating a native-capacitor bridge for real-time location/status updates to the Web layer
  • Hardening network calls from native code with retry/backoff logic

Best practices

  • Manage wakelocks sparingly: acquire only when needed and always release after GPS fix or on timeout
  • Use AlarmManager.setExactAndAllowWhileIdle for critical periodic work during Doze, avoid continuous wakeups
  • Implement exponential backoff for failed HTTP calls in LocationApiClient.java to reduce battery and server load
  • Ensure thread safety for location callbacks and network I/O; use background threads or executors, marshal UI updates to the main thread
  • Request and handle Fine and Background location permissions and notification permission flows according to Android 14+ requirements

Example use cases

  • Persistent step-by-step route tracking while app is backgrounded, with UI updates pushed via notifyListeners
  • Restarting location tracking after device reboot using BOOT_COMPLETED receiver
  • 60s interval telemetry uploads with Doze-safe alarms and exponential backoff on failures
  • Whitelisting flow to request REQUEST_IGNORE_BATTERY_OPTIMIZATIONS where needed for critical tracking

FAQ

Use partial wakelocks only briefly, prefer AlarmManager.setExactAndAllowWhileIdle for 60s scheduling, tune FusedLocationProviderClient intervals, and implement exponential backoff for uploads.

How should I deliver location updates to the Web layer?

Use Capacitor plugin notifyListeners for native-to-Web events, keep payloads compact, and ensure listener registration happens on the main thread.

What Android 14+ considerations matter?

Declare appropriate foregroundServiceType, request background & notification permissions explicitly, and validate runtime permissions for location and foreground service use.

3 skills

More from this maintainer
Other repositories and skills published under the same GitHub owner.
Skills library
Jump back to the full directory or explore grouped topics.
Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational