You Are Here:

Community: Developer Discussion Boards

#1 Old Arrow 6131: How to play an .amr or .mp3 file in SD card? - 2007-09-24, 09:51

Join Date: Sep 2007
Posts: 4
gorlab
Offline
Registered User
Hi all,

I try to play an audio file from the micro SD card in Nokia 6131. The following code is what I used:

try
{
FileConnection fileConnection = (FileConnection) Connector.open(path);
InputStream inputStream = fileConnection.openInputStream();
Player player = Manager.createPlayer(inputStream, mimeType);
player.realize();
String contentType = inputStream.getContentType();
player.setLoopCount(1);
player.start();
}
catch (Exception e)
{
...
}

However, I always get "Device Error" exception during start(). I have verified that getContentType() returns correctly.

I have also tried the MediaSampler midlet (original .jar as well as recompiled .jar), both give the same "Device Error" exception. What could be wrong? Any suggestion on the source code?
Reply With Quote

#2 Old Re: 6131: How to play an .amr or .mp3 file in SD card? - 2007-09-25, 12:47

Join Date: Sep 2007
Posts: 4
gorlab
Offline
Registered User
Hi all,

More testing revealed that the exception happens when prefetch() is called. My modified code is as follows:

try
{
FileConnection fileConnection = (FileConnection) Connector.open(path);
InputStream inputStream = fileConnection.openInputStream();
Player player = Manager.createPlayer(inputStream, mimeType);
player.realize();
String contentType = inputStream.getContentType();
if (contentType.equals(mimeType) != true)
{
// error
}
player.prefetch();
player.start();
}
catch (Exception e)
{
// error
}

I have no problem in playing .3gp videos in 6131 using similar code, but none of the audio file I tried (.amr, .mp3, .wav). Anyone has any clue to share?
Reply With Quote

#3 Old Re: 6131: How to play an .amr or .mp3 file in SD card? - 2007-10-03, 17:56

Join Date: Oct 2007
Posts: 24
dmunsie
Offline
Registered User
I'm getting the same error with one of our 6131s running v3.50 of the software. We have another one with v3.72 on it, and our application runs fine. This is the only difference between the phones that I've been able to find.

Is this a known issue with v3.50? Or is there something else we should be looking at?
Reply With Quote

#4 Old Re: 6131: How to play an .amr or .mp3 file in SD card? - 2007-10-04, 19:49

Join Date: Oct 2007
Posts: 24
dmunsie
Offline
Registered User
I just did a check, and the v3.50 firmware does not report 'audio/mpeg' as one of it's supported content types. Instead it lists 'audio/mpeg3'. But, using 'audio/mpeg3' still yields a MediaException.
Reply With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules

You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Forum Jump
Similar Threads
Thread Thread Starter Forum Replies Last Post
Theme Studio 3.1 not creating themes zemm Themes/Carbide.ui 11 2008-10-18 09:41
Help needed with a 3gp file... joedoe_1981 Streaming and Video 0 2007-07-18 19:58
Cannot play avi file in Nokia 9300i with Realplayer. Please help!! Yatin72 Streaming and Video 3 2006-12-04 21:10
cannot able to play a video file. shalini.mishra Mobile Java Media (Graphics & Sounds) 3 2006-11-13 17:54
Is it possible to play video file per frame. b4605318 Symbian Media (Graphics & Sounds) 0 2006-04-25 18:03

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia 
RDF Facets: qdcZidentifierQSxhttpE3aE2fE2fdiscussionE2eforumE2enokiaE2ecomE2fforumE2fshowthreadE2ephpE3ftE3d134434X qdcZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qdcZtypeQUqfntypeZCommunityContentQ qdcZtypeQUqfntypeZE44iscussionQ qdcZtypeQUqfntypeZE44iscussionContentQ qdcZtypeQUqfntypeZE52esourceQ qdcZtypeQUqfntypeZWebpageQ qdcZtypeQUqmarsZManagedE52esourceQ qdcZtypeQUqwebZInformationE52esourceQ qdcZtypeQUqwebZPageQ qdcZtypeQUqwebZE52esourceQ qdcZtypeQUqrdfsZE52esourceQ qfnZtopicQUqfnTopicZentertainmentQ qfnZtopicQUqfnTopicZj2meQ qfnZtopicQUqfnTopicZjavaQ qfnZtopicQUqfnTopicZmediaQ qfnZtypeQUqfntypeZCommunityContentQ qfnZtypeQUqfntypeZE44iscussionQ qfnZtypeQUqfntypeZE44iscussionContentQ qfnZtypeQUqfntypeZE52esourceQ qfnZtypeQUqfntypeZWebpageQ qmarsZlanguageQUxhttpE3aE2fE2fswE2enokiaE2ecomE2flanguageE2d1E2fenX qrdfZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qrdfZtypeQUqfntypeZCommunityContentQ qrdfZtypeQUqfntypeZE44iscussionQ qrdfZtypeQUqfntypeZE44iscussionContentQ qrdfZtypeQUqfntypeZE52esourceQ qrdfZtypeQUqfntypeZWebpageQ qrdfZtypeQUqmarsZManagedE52esourceQ qrdfZtypeQUqwebZInformationE52esourceQ qrdfZtypeQUqwebZPageQ qrdfZtypeQUqwebZE52esourceQ qrdfZtypeQUqrdfsZE52esourceQ