Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4362: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4364: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4365: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4366: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
anddev.org • View topic - How to get application version?

How to get application version?

Put your problem here if it does not fit any of the other categories.

How to get application version?

Postby elmuSSo » Wed Feb 09, 2011 1:44 am

Hello. How can I get application version from installed applications?
I can get Application name, label, paths, but where is the version and how to get it?

This is what I got now:
PackageManager pm = this.getPackageManager();
Intent intent = new Intent(Intent.ACTION_MAIN, null);
intent.addCategory(Intent.CATEGORY_LAUNCHER);

List<ResolveInfo> list = pm.queryIntentActivities(intent, PackageManager.PERMISSION_GRANTED);

for (ResolveInfo rInfo : list) {
Log.w("Installed Applications", rInfo.activityInfo.applicationInfo.loadLabel(pm).toString() );
)

In applicationInfo structure I can't see anything about version of particular app.
elmuSSo
elmuSSo
Freshman
Freshman
 
Posts: 4
Joined: Tue Sep 15, 2009 3:18 am
Location: Poland

Top

Re: How to get application version?

Postby azekrot » Wed Feb 09, 2011 9:51 pm

It's in android.content.pm.PackageInfo: versionCode, versionName
azekrot
Developer
Developer
 
Posts: 49
Joined: Thu Sep 02, 2010 7:58 pm

Re: How to get application version?

Postby elmuSSo » Thu Feb 10, 2011 9:58 pm

Thank You. works fine.
elmuSSo
elmuSSo
Freshman
Freshman
 
Posts: 4
Joined: Tue Sep 15, 2009 3:18 am
Location: Poland

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: Exabot [Bot] and 18 guests