title: What is the best way to set a Firebase Crash user identifier in a widget?
body: <p>I have been using Crashlytics quite a lot, but now I'm trying out Firebase Crash in an app. </p>
  
  <p><strong>I would like to set some kind of user identifier</strong> to be able to cross check reports sent by users themselves and crash reports.</p>
  
  <p>In Crashlytics I have always used <code>Crashlytics.setUserIdentifier()</code> (<a href="https://docs.fabric.io/android/crashlytics/enhanced-reports.html?identifier#user-information" rel="nofollow">https://docs.fabric.io/android/crashlytics/enhanced-reports.html?identifier#user-information</a> ).</p>
  
  <p>As far as I can see I have to use <code>FirebaseCrash.log()</code> (<a href="https://firebase.google.com/docs/crash/android#create_custom_logs" rel="nofollow">https://firebase.google.com/docs/crash/android#create_custom_logs</a> ), <strong>but</strong> that won't set the identifier one time, right? I suppose it will log it every time I call that method.</p>
  
  <p>That leads me to the real question. <strong>The app is a widget with a service that runs relatively often without the user needing to access an activity. What will be the best place to do that logging?</strong></p>
  
  <p>Using Crashlytics I have set the user identifier either in the main activity or in a class extending <code>Application</code>. Doing the last of the two with Firebase Crash seems to trigger <a href="https://firebase.google.com/docs/crash/android#known-issues" rel="nofollow">a known issue</a>.</p>