1

I want to check if there is any app update on launch and update the app if it's old many links I have checked but they all are getting versionName I want to get versionCode. Is there anything we can do to get it ?

Adit Kothari
  • 421
  • 3
  • 16

2 Answers2

3

You can get the information you want through this link(https://learn.microsoft.com/en-us/xamarin/essentials/version-tracking), and there is a video that explains in detail how to control the version number. It is better to judge the version update inside the program.

Wen xu Li
  • 1,698
  • 1
  • 4
  • 7
  • Thanks for the answer but this wouldn't overcome my problem because how we will now that in Playstore app will be updated or not – Adit Kothari Aug 24 '21 at 07:05
  • This link(https://stackoverflow.com/questions/34309564/how-to-get-app-market-version-information-from-google-play-store) may help you. – Wen xu Li Aug 24 '21 at 09:40
1

What I do is I have my app send a GET request to my API at launch, which then scrapes and returns the version on the store. I then compare it to:

AppInfo.VersionString

If the store version is higher than the VersionString, I prevent the app from being used, forcing the user to update.

Resource wise, it may be wiser to hardcode the latest store version in the API instead of having the API reach out to find it.

Jack
  • 81
  • 2