Increment of version number

Asked

Viewed 89 times

1

I would like your opinion and help on version 1.0.0.1 (example).

How can I make this increment automatically? Or more, as is usually or good practice, increase this number before and after the "points"?

Thank you!

  • http://stackoverflow.com/questions/3377655/code-version-change-rules/3377717#3377717

1 answer

1


I add a field on the screen that I want to show the version and feed that field as follows:

  Date buildDate = new Date(BuildConfig.TIMESTAMP);
  idversion.setText("Versão: " + buildDate.toString());

Of course, you can format it as you want based on the current date.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.