especially the versionName and versionCode which i wanted to check. one is null the other is 0.
The package name is correct. i verified, any ideas ?
final PackageManager pm = getPackageManager();
final String packageName = getPackageName();
if (getMyApp().getURL() == URLS.PROD && getMyApp().IS_CHECK_VERSION == 1) {
try {
new Thread() {
public void run() {
HttpURLConnection conn = null;
String responseString = null;
try {
String versionName = "1.0";
try {
PackageInfo pi = pm.getPackageInfo(packageName, 0);
versionName = pi.versionName;
} catch (NameNotFoundException e) {
e.printStackTrace();
}
ok, found it.
You guys could not se it since you don’t have my manifest…
accidentally the build system changed android:versionName to android.versionName. so no versionName was defined.
Strangely enough even Lint didn’t see it.
🙁 stupidity and nothing more.