How to access build version from build.gradle from Java class

Its available in BuildConfig.java.

So simply access version name like this:
BuildConfig.VERSION_NAME

And Version code could be accessed like this:
BuildConfig.VERSION_CODE 

No comments:

Post a Comment

Scheduling Repeating Local Notifications using Alarm Manager

Learn about Scheduling Repeating Local Notifications using Alarm Manager in this post .