Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Playing Amr

 
Burak Celebi
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can we play amr in midlets? Code snippet below didn't work:

try{
Player player = Manager.createPlayer( getClass().getResourceAsStream("test.amr"), "audio/amr");
player.start();
}catch(Exception e){
e.printStackTrace();
}

Thanks in advance.
 
Danish Shaukat
Ranch Hand
Posts: 341
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes you can.

But its a little tricky. The MIDP implementation and the phone must support this format.

I have played AMR files on Nokia 6600 and various Siemens devices.

However in Nokia 6230, the phone supports the AMR format but MIDP implementation does not, so AMR files can't be played.

So you have to test on every phone to be sure

Danish
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!