, , .
Using the hashCode method for activity is not recommended if you want to keep it longer. As we all know, activities can be cleaned up by the operating system. This means that when they are recreated, they probably have a different hashCode than the previous instance. The solution for this (if you want to stay with an integer as id) could be getIntent (). Hashcode ()
source
share