Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Nov 2012

    Question Can Play audio file from SDCard in emulator but not in Handphone

    Hi everyone, please help me to solving my problem.
    I have some codes like shown below. My code can play audio file from emulator but not in Handphone.

    private void playLagu(String nada) {
    Player p = null;
    try {
    FileConnection connection = (FileConnection) Connector.open("file:///" + nada);
    InputStream inStream = connection.openInputStream();

    if (p == null || p.getState() != Player.STARTED) {
    p = Manager.createPlayer(inStream, "audio/x-wav");
    nada = "";
    } catch (IOException ex) {
    } catch (MediaException ex) {
    Thank you very muh

  2. #2
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Oslo, Norway

    Re: Can Play audio file from SDCard in emulator but not in Handphone

    What happens instead? On what device? How comes SDCard to the question? Does it play files well from the internal memory?
    What about the wav? Is it using some fancy encoding? Can you play it on the device?

  3. #3
    Super Contributor
    Join Date
    Apr 2007

    Re: Can Play audio file from SDCard in emulator but not in Handphone

    Also just to make ure you first might want to check the specific external memory directory name, like described here : http://www.developer.nokia.com/Resou...roperties.html

    So something like :
    String url = System.getProperty("fileconn.dir.memorycard") + "nada.jpg";
    Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them.

Similar Threads

  1. Replies: 1
    Last Post: 2010-05-01, 20:00
  2. how 2 play audio file
    By manmay.gupta in forum Symbian
    Replies: 4
    Last Post: 2009-05-26, 07:58
  3. play audio file
    By nitroxxx123 in forum Symbian
    Replies: 1
    Last Post: 2009-04-12, 07:52
  4. Replies: 2
    Last Post: 2008-02-20, 08:42
  5. Replies: 0
    Last Post: 2006-07-08, 06:23

Posting Permissions

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