Created
March 4, 2014 04:00
-
-
Save anirudh24seven/9340051 to your computer and use it in GitHub Desktop.
WordPress for Android - getVersionName() in WordPress.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
private String getVersionName() { | |
PackageManager pm = getPackageManager(); | |
try { | |
PackageInfo pi = pm.getPackageInfo(getPackageName(), 0); | |
return pi.versionName == null ? "" : pi.versionName; | |
} catch (NameNotFoundException e) { | |
return ""; | |
} | |
} | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment