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
[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 another application's resource

How to get another application's resource

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

How to get another application's resource

Postby ForD » Tue Jan 15, 2008 2:44 am

Assuming I know the resource id, does anyone know how I could retrieve the resource of another application stored on the phone? Note the the constants that come on the ResolveInfo, ActivityInfo, and ApplicationInfo classes aren't working for what I need.
ForD
Freshman
Freshman
 
Posts: 3
Joined: Tue Jan 15, 2008 2:42 am

Top

Postby ForD » Wed Jan 16, 2008 12:31 am

anybody have any ideas? I just tried to resources object as well, which didn't work.
ForD
Freshman
Freshman
 
Posts: 3
Joined: Tue Jan 15, 2008 2:42 am

Postby ForD » Wed Jan 16, 2008 3:19 am

Well, I ended up figuraing out how to do this, here's the code for posterity:

Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. Intent mainIntent = new Intent(Intent.MAIN_ACTION, null);
  2.  
  3. mainIntent.addCategory(Intent.LAUNCHER_CATEGORY);
  4.  
  5. List<ResolveInfo> apps = ZoomGrid.context.getPackageManager().queryIntentActivities(mainIntent, 0);
  6.  
  7. Resources r = ZoomGrid.pm.getResourcesForApplication(apps.get(1).activityInfo.applicationInfo);
Parsed in 0.014 seconds, using GeSHi 1.0.8.4


change the 1 in apps.get(1) to a different number to change the app. Then use the properties of the r (Resources) object to get the resource by id.
ForD
Freshman
Freshman
 
Posts: 3
Joined: Tue Jan 15, 2008 2:42 am

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: Yahoo [Bot] and 11 guests