Apparently recent changes with ViewModel affect the internal of Activity which lead to toast throwing BadTokenException in OS 7.1.2. The error is not easily catchable. This library use reflection to override a key function in WindowManager to catch the error. I have audit the code of the library. See https://github.com/PureWriter/ToastCompat for more details