static String getAppVersion ( Context context ) { String appVersion = "" ; if ( context != null ) { try { final PackageInfo packageInfo = context . getPackageManager ( ) . getPackageInfo ( context . getPackageName ( ) , 0 ) ; appVersion = packageInfo . versionName ; } catch ( Exception e ) { PrefHelper . LogException ( "Error obtaining AppVersion" , e ) ; } } return ( TextUtils . isEmpty ( appVersion ) ? BLANK : appVersion ) ; }
Get the App Version Name of the current application that the SDK is integrated with .