Monday, March 7, 2011

Android System How to get your application informations?

By Magesh Kumar   Posted at  4:56 AM   Android No comments


Want to print what you put in your manifest? 
PackageManager manager = this.getPackageManager();
try {
   PackageInfo info = manager.getPackageInfo(this.getPackageName(), 0);
   String packageName = info.packageName;
   int versionCode = info.versionCode;
   String versionName = info.versionName;
   } catch (NameNotFoundException e) {
   // TODO Auto-generated catch block
   }

About the Author

Nulla sagittis convallis arcu. Sed sed nunc. Curabitur consequat. Quisque metus enim, venenatis fermentum, mollis in, porta et, nibh. Duis vulputate elit in elit. Mauris dictum libero id justo.
View all posts by: BT9

0 comments:

Back to top ↑
Connect with Us

What they says

© 2013 MaGeSH 2 help. WP Mythemeshop Converted by BloggerTheme9
Blogger templates. Proudly Powered by Blogger.