Is SingleLiveEvent actually part of the Android Architecture Components Library?

Archie G. Quiñones picture Archie G. Quiñones · Aug 10, 2018 · Viewed 8.2k times · Source

I have been using the SingleLiveData class which can be found here. My questions are:

  1. Is SingleLiveData is actually part of the Android Architecture Components?

  2. Is it a good idea to use it?

Answer

Ghedeon picture Ghedeon · Mar 16, 2019

Is SingleLiveEvent actually part of the Android Architecture Components Library?

No, and it won't be: https://issuetracker.google.com/issues/122413110. Basically, the official answer is "Yes, regular livedata wasn't enough, so we introduced it in our examples but it's too hacky to be in the library".