diegosouzapw/awesome-omni-skill/android-firebase

Claude Code and agent skill by diegosouzapw/awesome-omni-skill

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Firebase integration patterns for Android - Crashlytics, Analytics, Remote Config, FCM. Use when setting up crash reporting, analytics events, remote configuration, or push notifications.

Install

npx vskill@latest install diegosouzapw/awesome-omni-skill/android-firebase

SKILL.md

The same SKILL.md was published earlier as diegosouzapw/awesome-omni-skill/android-firebase.

Android Firebase Skill

Firebase integration patterns: Crashlytics, Analytics, Remote Config, FCM.

When to Use

  • Setting up Firebase SDK
  • Implementing crash reporting
  • Adding analytics events
  • Using Remote Config
  • Setting up FCM (Push Notifications)

Setup

Dependencies
toml
[versions]
firebase-bom = "33.8.0"
[libraries]
firebase-bom = { module = "com.google.firebase:firebase-bom", version.ref = "firebase-bom" }
firebase-analytics = { module = "com.google.firebase:firebase-analytics-ktx" }
firebase-crashlytics = { module = "com.google.firebase:firebase-crashlytics-ktx" }
firebase-config = { module = "com.google.firebase:firebase-config-ktx" }
firebase-messaging = { module = "com.google.firebase:firebase-messaging-ktx" }
Initialization
kotlin
// In Application class
FirebaseApp.initializeApp(this)

Crashlytics

kotlin
// Log non-fatal exception
Firebase.crashlytics.recordException(exception)
// Custom keys for debugging
Firebase.crashlytics.setCustomKey("user_id", userId)
Firebase.crashlytics.setCustomKey("screen", currentScreen)
// Log message
Firebase.crashlytics.log("User clicked purchase button")
// Set user identifier
Firebase.crashlytics.setUserId(userId)
// Force crash (for testing)
throw RuntimeException("Test Crash")

Analytics

kotlin
// Log standard event
Firebase.analytics.logEvent(FirebaseAnalytics.Event.SELECT_ITEM) {
param(FirebaseAnalytics.Param.ITEM_ID, itemId)
param(FirebaseAnalytics.Param.ITEM_NAME, itemName)
}
// Custom event
Firebase.analytics.logEvent("game_completed") {
param("score", finalScore.toLong())
param("level", currentLevel.toLong())
param("time_spent", timeInSeconds.toLong())
}
// Screen tracking
Firebase.analytics.logEvent(FirebaseAnalytics.Event.SCREEN_VIEW) {
param(FirebaseAnalytics.Param.SCREEN_NAME, screenName)
param(FirebaseAnalytics.Param.SCREEN_CLASS, screenClass)
}
// User properties
Firebase.analytics.setUserProperty("premium_user", "true")
Firebase.analytics.setUserId(userId)

Remote Config

kotlin
val remoteConfig = Firebase.remoteConfig
remoteConfig.setConfigSettingsAsync(remoteConfigSettings {
minimumFetchIntervalInSeconds = 3600 // 1 hour
})
// Set defaults
remoteConfig.setDefaultsAsync(R.xml.remote_config_defaults)
// Fetch and activate
remoteConfig.fetchAndActivate().addOnCompleteListener { task ->
if (task.isSuccessful) {
val featureEnabled = remoteConfig.getBoolean("new_feature_enabled")
val welcomeMessage = remoteConfig.getString("welcome_message")
val maxRetries = remoteConfig.getLong("max_retries")
}
}
// Real-time config (auto-update)
remoteConfig.addOnConfigUpdateListener(object : ConfigUpdateListener {
override fun onUpdate(configUpdate: ConfigUpdate) {
remoteConfig.activate()
}
override fun onError(error: FirebaseRemoteConfigException) {}
})

FCM (Push Notifications)

kotlin
class MyFirebaseMessagingService : FirebaseMessagingService() {
override fun onNewToken(token: String) {
// Send token to server
sendTokenToServer(token)
}
override fun onMessageReceived(message: RemoteMessage) {
// Handle notification
message.notification?.let { notification ->
showNotification(notification.title, notification.body)
}
// Handle data payload
message.data.let { data ->
handleDataPayload(data)
}
}
}
// Get current token
Firebase.messaging.token.addOnCompleteListener { task ->
if (task.isSuccessful) {
val token = task.result
}
}
// Subscribe to topic
Firebase.messaging.subscribeToTopic("news")

Version Compatibility

Firebase BOMMin SDKCompile SDK
33.8.02135
33.0.02134
32.0.01933

Error Handling

kotlin
// Remote Config error handling
remoteConfig.fetchAndActivate()
.addOnSuccessListener { activated ->
if (activated) Timber.d("Config activated")
else Timber.d("Config already up to date")
}
.addOnFailureListener { e ->
when (e) {
is FirebaseRemoteConfigException ->
Timber.w("Remote config fetch failed: ${e.code}")
else -> Timber.e("Unexpected error: ${e.message}")
}
// Use cached/default values
}
// Crashlytics non-fatal reporting
try {
riskyOperation()
} catch (e: Exception) {
Firebase.crashlytics.recordException(e)
// Handle gracefully
}

Troubleshooting

IssueSolution
Events not showingWait 24h or use DebugView
Crashes not reportingCheck google-services.json
FCM not receivingVerify token registration
Config not updatingCheck fetch interval

Security Checklist

  • [ ] Disable Crashlytics in debug builds (optional)
  • [ ] No PII in crash logs or analytics
  • [ ] Validate FCM token before use
  • [ ] Use App Check for backend protection
  • [ ] Review analytics data retention settings

Best Practices

  • Enable Crashlytics in release builds only
  • Use custom events sparingly (500 limit per app)
  • Cache Remote Config values locally
  • Handle FCM token refresh
  • Set user ID consistently across services
  • Use DebugView for testing analytics

References

Use Firebase for robust analytics and crash reporting.

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
0

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/diegosouzapw/awesome-omni-skill/android-firebase/badge)](https://verified-skill.com/skills/diegosouzapw/awesome-omni-skill/android-firebase)

Something wrong with this skill or its page? Tell us.