Android how to get installed package information
It's been a while since I've had a chance to actually make some post or even check on the blog itself. Sorry it's taken so long but it's been a long road to get to where I am now, and still a road a head. I've been developing Android apps now for a little over a year I believe not too sure but feels like more.
Currently I have two apps out in the market which both need major love in order to work correctly on all devices. One thing that I've been trying to do is to notify the user of a new version of the application being release into the market. I know that the Android Market now called 'PLAY" does this automatically but I want to notify them that a new better version is out.
It took some time to figure out the best solution for this but I have found one. Bellow are the steps and a small piece of code to get the version installed in the application.
Solutions:
The best solutions I have for this problem is to host an xml file or json file somewhere in my server containing the package name, the version number, version name, a what's new details and a link to download (the link isn't entirely necessary).
Once I have that file uploaded, I begin my android coding.
First I want to get the current installment the user has, I search all over stack over flow ( wasn't that hard to find once you have the correct key terms
) the code is as follows
try {
String pkg = mContext.getPackageName();
mVersionNumber = mContext.getPackageManager().getPackageInfo(pkg, 0).versionName;
} catch (NameNotFoundException e) {
mVersionNumber = "?";
}
Now here we have versionName but it can easily be versionNumber which return an Integer (best for me)
after that we just pull down the xml parse and get the versionNumber compare and then display the information if and only if the version on the website is the latest version compared to the installed one.
How you actually implement it is completely up to you.
Black Ops- Maps V 1.1 Released

Ok so I made some minor updates to the Black Ops App.
- Added a different interface
- Added Analytics
- Created a preferences Page to display App details.
There will be a new version in the works, with more Maps, Game Types. Version(2.0)
New NYC Train Status Released v1.8
Getting better with the design, thanks to Matt Burniston (http://www.heshereallweek.com). There are still some major updates and code clean up I want to do before the official 2.0 Release.
I expect to have a widget available and expose a service for others to use.
Check it out at the android Market (https://market.android.com/details?id=com.albertrosa.mta2) Check out the new landing designs