Is there a way to check the last version of the app, after updating to the newest version?
— edited
I'm sorry because I was not clear. I'm wondering if there is a built-in method instead of saving version value in database or SharedPreferences
?
Have a look at the this answer to a previous question. Basically, you use PackageManager to get the current app version and compare it to the previously stored version in a shared preference.
For more details look into the SharedPreference class, and the PackageManager class.