you only parsing html to get version name. But in real version code should be compared. You should use native api provided by google. read more https://developer.android.com/guide/playcore/in-app-updates