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
[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 - Loading media from another applications resources

Loading media from another applications resources

All your problems with Audio, Video and Images.

Loading media from another applications resources

Postby samaldis » Wed Jan 13, 2010 1:11 pm

I have been trying to work this one out for a few days now,
I'm attempting to load an mp3 from another apk file (which i created
and so have all the information for).
but i keep hitting errors, here is my code:
Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. PackageManager pm = mContext.getPackageManager();
  2.  
  3. Resources res2 = pm.getResourcesForApplication(pm.getApplicationInfo(mSongID, 0));
  4.  
  5. mSongId = res2.getIdentifier("song", "raw", mSongID);
  6.  
  7. Log.e("Got Resource", "" + mSongId);
  8.  
  9. mp = MediaPlayer.create(mContext, mSongId);
Parsed in 0.012 seconds, using GeSHi 1.0.8.4


if anyone could point out what i've done wrong or if it is even possible with the current
framework?
Thanks,
Sam Aldis
samaldis
Freshman
Freshman
 
Posts: 6
Joined: Wed Jan 28, 2009 1:23 am
Location: Worcester, UK

Top

Postby samaldis » Wed Jan 13, 2010 1:26 pm

At the moment im getting

Code: Select all
Got Resource       2130968576
MediaPlayer         info/warning (1, 44)
MediaPlayer         Info (1, 44)
samaldis
Freshman
Freshman
 
Posts: 6
Joined: Wed Jan 28, 2009 1:23 am
Location: Worcester, UK

Top

Return to Multimedia Problems

Who is online

Users browsing this forum: No registered users and 7 guests