I get android id with code below:
DeviceID = Secure.getString(this.getContentResolver(),
Secure.ANDROID_ID);
But it changes on every update. Is it wrong way to get it or is there anything different that i can use, that never changes and stays unique for same device everytime?
Link only answers are normally discouraged but I don't see an alternative in this case as the article is quite in depth for and relates to various different API levels.
See the documentation for the correct way to handle this (according to Google):
http://developer.android.com/training/articles/user-data-ids.html