Class AppVersion



  • public class AppVersion
    extends java.lang.Object
    This class allows you to determine the Application's version information
    • Constructor Summary

      Constructors 
      Constructor and Description
      AppVersion(Context context)
      Creates an instance of AppVersion
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      int getAppVersionCode()
      Gets the Application's version code, android:versionCode
      java.lang.String getAppVersionName()
      Gets the Application's version name, android:versionName
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AppVersion

        public AppVersion(Context context)
        Creates an instance of AppVersion
        Parameters:
        context - A context, will be used to query the PackageManager
    • Method Detail

      • getAppVersionName

        public java.lang.String getAppVersionName()
        Gets the Application's version name, android:versionName
        Returns:
        the application's version name
      • getAppVersionCode

        public int getAppVersionCode()
        Gets the Application's version code, android:versionCode
        Returns:
        the application's version code