Results 1 to 4 of 4

Thread: How to manage the audio in J2ME

  1. #1
    Join Date
    Sep 2010
    Posts
    12

    How to manage the audio in J2ME

    I have started doing the potential of an optional package: the Mobile Multimedia API (MMAPI). The MMAPI specification JSR 135 and is identified by the version 2.0 of the MIDP profile, there is a subset of classes in 1.0 that this was an optional package. I need your help for knowing about the protocols supported media. I am not having much knowledge about this topic, since I have recently started doing it. Please tell me more about the managing an audio. In short, I want to know how to manage the audio in J2ME? I am hoping that some members from your side will help me soon.

  2. #2
    Join Date
    Feb 2010
    Posts
    188

    Re: How to manage the audio in J2ME

    You should start by writing instructions that will allow you to know what media formats and protocols which are supported by the terminal on which to install our software. When you create the project, with WTK, you must check the box on Mobile Media API (JSR 135) on the Settings for Project. The first class, we use, is the Manager class that allows us, using the methods getSupportedContentTypes and getSupportedProtocols , to discover the compatibility of our terminal (which obviously has to support MMAPI):
    Code:
    .. / / 
    String [] protocols = Manager.getSupportedProtocols (null); 
    String [] contentType = null; 
    formtrial = new Formtrial ("Supported"); 
    StringItem si = null; 
    for (int k = 0, k <protocols.length k + +) 
    { 
    Manager.getSupportedContentTypes contentType = (null); 
    for (int i = 0; i <contentType.length i + +) 
    { 
    is = new StringItem ("Content Type" + (i +1) + "for protocol '+ protocols [k] +": ", contentType [i]); 
    formtrial.append (yes); 
    } 
    } 
    display.setCurrent (formtrial); 
    
    ....//
    The method getSupportedProtocols accepts one argument, the content type for which you want to know the supported protocols: null letting you get a complete list of all those supported regardless of the type of content.

  3. #3
    Join Date
    Feb 2010
    Posts
    149

    Re: How to manage the audio in J2ME

    Once you have all supported protocols, with the two loops, one can trace the invalid content type for each protocol and appear in the form. To run the application in the emulator of WTK, you choose the MediaControlSkin device that displays a screen. The protocols are given in the form are:
    • Device means that media can be treated (for those content-type) that are in the jar by the terminal;
    • Http: you can download media files via http;
    • File: can be read from the file system of the terminal;
    • Capture: they can be captured (or recorded) media files.

  4. #4
    Join Date
    Feb 2010
    Posts
    118

    Re: How to manage the audio in J2ME

    Other features supported by mobile terminals can be tracked by a midlet through the method call System.getProperty , passing the following parameters:
    • microedition.media.version returns the supported version, "1.0" or "1.1", or null if the MMAPI are not supported;
    • supports.mixing returns true if the polyphonic sounds are supported, false otherwise;
    • supports.audio.capture returns true if audio capture is supported;
    • supports.video.capture returns true if video capture is supported
    • supports.recording returns true if the recording is supported
    • audio.encodings returns a string representing the format in the case of audio recordings (null if the audio recording is not supported);
    • video.encodings returns a string representing the format in the case of video recordings (null if the video recording is not supported);
    • video.snapshot.encodings returns a string representing the image format in case of capture (null if the capture);
    • streamable.contents returns a string representing the format supported streaming (null if the stream is not supported);

Similar Threads

  1. How to parse XML in J2ME
    By Abigail101 in forum Software Development
    Replies: 5
    Last Post: 19-02-2010, 03:39 AM
  2. J2ME basic Example
    By REDBULL in forum Software Development
    Replies: 3
    Last Post: 10-12-2009, 08:46 AM
  3. How to send sms using J2Me?
    By Amaresh in forum Software Development
    Replies: 3
    Last Post: 28-11-2009, 12:35 PM
  4. J2me
    By manjava in forum Software Development
    Replies: 1
    Last Post: 24-10-2009, 08:56 AM
  5. Which DBMS for J2ME?
    By EDALENE in forum Software Development
    Replies: 3
    Last Post: 09-10-2009, 06:16 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,714,260,685.43284 seconds with 17 queries