Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User smilecodes's Avatar
    Join Date
    Nov 2012
    Posts
    1
    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");
    p.start();
    }
    nada = "";
    } catch (IOException ex) {
    ex.printStackTrace();
    } catch (MediaException ex) {
    ex.printStackTrace();
    }
    }
    Thank you very muh

  2. #2
    Nokia Developer Moderator wizard_hu_'s Avatar
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    27,743
    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
    Nokia Developer Champion Tiger79's Avatar
    Join Date
    Apr 2007
    Posts
    2,697
    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 C++
    Replies: 4
    Last Post: 2009-05-26, 07:58
  3. play audio file
    By nitroxxx123 in forum Symbian C++
    Replies: 1
    Last Post: 2009-04-12, 07:52
  4. Audio file play from Rom when file copy is taking place
    By kutty_kichoos in forum Symbian C++
    Replies: 2
    Last Post: 2008-02-20, 08:42
  5. Is it possible to play audio and video files on Emulator
    By sriramadasu in forum Symbian C++
    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
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved