0

I have an android app that records audio and does other stuff, and I wanted to make a PC applet in java to allow users to listen to what they record on their androids. I got everything to work, but came to a halt at the playing part. Android can only record 3 formats (MPEG4, AMR, and 3GPP). And I'm having trouble finding a java api or code to play any of those formats. Does anyone have any suggestions or solutions?

Thanks in advance.

Mark
  • 700
  • 2
  • 7
  • 17
  • Or how can I make android record wav? AudioRecord seems long, but maybe a solution. Is it? – Mark Aug 02 '11 at 19:48

1 Answers1

0

On this thread you can find numerous java API to playback audio files : Any good recommendations for MP3/Sound libraries for java?

Also, you probably want to write a desktop application, not an applet. Applets are an old technology that never really catched up (to be honest Microsoft helped quite a lot to kill that tech...).

Community
  • 1
  • 1
Snicolas
  • 37,840
  • 15
  • 114
  • 173
  • How do you make desktop applications with java? I thought the way to do it was with jars. – Mark Aug 02 '11 at 11:23
  • A desktop application basically has a main method. An applet is a special class that will only display in a browser. Jar is a way to package applications or applets. What you want to do is a runnable jar file. Here is a tuto for cli & eclipse : http://viralpatel.net/blogs/2008/12/create-jar-file-in-java-eclipse.html – Snicolas Aug 02 '11 at 11:29
  • Oh, then I have an application, sorry. It has a main. Also, since I'm new to swing I was told to use netbeans. The way I do it is by cleaning and building, and then just running the jar it creates. – Mark Aug 02 '11 at 11:57
  • That's fine. Actually any IDE would do. Netbeans is nice. I prefer eclipse and last version (indigo, 3.7) includes a GUI builder too. Learn how to use your IDE to produce a runnable jar file so that it can be launched by your users and you will achieve your goal. You could accept this answer if it suits you. Regards, Stéphane – Snicolas Aug 02 '11 at 13:54
  • Yeah, I know, let me just see if it's what I need, just got to my computer. – Mark Aug 02 '11 at 15:59
  • Ok, so I read it all, but I still need help understanding what to do... So I save the file as mp4 on the android app, but when I open it with the javazoom.jl.player.Player or javazoom.spi classes, it doesn't play anything. Am I supposed to decode or convert it? or what? – Mark Aug 02 '11 at 17:16