2

I have a j2me app built for a CDC device. I have used Personal profile to display the UI. However now I need to play audio. AFAIK in j2me I can play audio only through J2me MMAPI i.e JSR135.
But on my device I don't have this. So can someone provide me input how I should go about porting this jsr on my device. It is a linux based ARM device. I had built and compiled cdc and personal profile by myself and ported on to the device. But now I am unable to find source code for Mobile media api.

Or do you have any option other than MMAPI to play audio?

gnat
  • 6,213
  • 108
  • 53
  • 73
Abhilasha
  • 929
  • 1
  • 17
  • 37

1 Answers1

1

I am unable to find source code for Mobile media api

Well as far as I can tell, above is available in an open source project PhoneME. MMAPI classes like Player, Manager, Control etc are shown at below link to their SVN code repository:

gnat
  • 6,213
  • 108
  • 53
  • 73
  • Thanks for the response. I did download the code, compiled n built the cvm i required. Now i'm trying to write a cdc app which plays audio. And each time i try to run the app it throws , java.lang.NoClassDefFoundError: javax.microedition.media.Player This is on my x86 machine not even on the target device ! I have even added the jsr135.jar to the j2me platform set for the project !! Have no clue why it behaves so :( – Abhilasha Nov 17 '11 at 10:11
  • interesting. You mentioned that you have _built and compiled cdc and personal profile_ - did you happen to see errors like that before? – gnat Nov 17 '11 at 11:16
  • Yes but these kind of errors came only when any of my libraries were not in place. – Abhilasha Nov 17 '11 at 11:28
  • I see. That `jsr135.jar` you have built, did you check its contents? is there a folder _javax/microedition/media_ inside? is there a file _Player.class_ inside? – gnat Nov 17 '11 at 12:01
  • Sorry!Was busy with client demo.As u suspected some of the files in personal profile were missing.Tried to build again.It failed.My GNUMakefile:
    J2ME_CLASSLIB=basis QT_TARGET_DIR=/home/pavan/Desktop/24-9 QTEMBEDDED=true USE_QT_FB=false USE_JUMP=true JDK_HOME=/usr/lib/jvm/java-6-sun CVM_PRELOAD_LIB=true CVM_COMPILER_INCOMPATIBLE=false CVM_DEFINES += -DAAPCS CVM_DEBUG=true CVM_TERSEOUTPUT=true USE_JSR135=true JSR_DIR=//pathtojsr135 However,I get the following err while building the personal profile _/linux-arm-generic/./btclasses/java/awt/Button.class dependency missing!_
    – Abhilasha Nov 19 '11 at 05:52
  • We tried building just the personal profile disabling the JSR related flags. Initially it had problems with QT.However, they were fixed after rebuilding the QT from scratch. Now when I have enabled the JSR flags.The build is successful it does generate cvm but, it does not have the JSR related classes i.e..javax.microedition.media the media folder is missing :( Anyways, will shortly post a detailed doc how to build the personal profile :) – Abhilasha Nov 19 '11 at 12:48
  • @Abhilasha _awt class dependency missing_ sounds like a problem integrating MIDP lcdui classes - most likely, phoneME uses these for some optional video features. Given that you mention only audio, there's probably a way to "cut" problematic features. If memory serves, MMAPI specification was designed to allow cuts like that; you just have to replace phoneME code with `throw MediaException` statements in a couple of appropriate places. – gnat Nov 21 '11 at 06:04