I was using the commit method in my project that built it with fragments.
Anyway, sometimes I was getting IllegalStateException: Can not perform this action a
IllegalStateException: Can not perform this action a
There is only one difference between commit() and commitAllowingStateLoss(): the latter doesn't throw an exception if state loss occurs. Other than that, they have identical behavior.
commit()
commitAllowingStateLoss()
See my blog post about this topic for more information.