1
votes

I was looking throughout documentations of Firebase and I think that my use case is not accomplishable. But I will ask here anyway.

I have Android app using Firebase. Crashlytics and Firebase Cloud Messaging among others. I want to send push notification to user if he experiences fatal crash in my app. Something like "We are sorry, working on fix".

To identify user in Crashlytics I would use Crashlytics.setUserIdentifier(registrationToken) in MyFirebaseInstanceIdService (documented here https://firebase.google.com/docs/cloud-messaging/android/first-message). This will ensure, that I have token for sending message. Now I need to write trigger function (using Firebase functions) and send FCM message (trigger: https://firebase.google.com/docs/functions/crashlytics-events, API for FCM: https://firebase.google.com/docs/reference/admin/node/admin.messaging.Messaging).

Issue in this case is, that I cannot obtain userIdentifier in this callback because (according to this documentation: https://firebase.google.com/docs/reference/functions/functions.crashlytics.Issue), there is no such information.

Is there a way to solve this now? Or maybe in future? (Using only Firebase stuff)

1
We don't currently pass the userIdentifier so there isn't a way to do this right now. I've let the team know this is something you're interested in seeing as an enhancement and we can reach out if we have something to test out!Alexizamerican

1 Answers

0
votes

There should be some way or api to read crashlytics reports so that desired action can be automated utilizing the information in the crash report.