×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Dec 2005
    Posts
    26

    problems about playing music

    Hi,All:
    I encounter a problem when i write an application playing music.The problem is that:
    When i create a player with a file locator:"file:///C:/predefgallery/predefmusic/听妈妈的话.mp3",when run it on Nokia 8600 luna ,the jvm throws an exception "javax.microedition.media.MediaException:Invalid locator" , bug if i create a player with the locator "file:///C:/predefgallery/predefmusic/newMessageNotify.amr" ,every thing goes well.
    Can anybody help me solve this problem.I appreciate your kindness very much.
    Blow is my code snippet
    //fileURL="file:///C:/predefgallery/predefmusic/听妈妈的话.mp3";//error
    fileURL="file:///C:/predefgallery/predefmusic/newMessageNotify.amr";//ok

    private void playMusicByURL(String url){
    try {
    Player player=Manager.createPlayer(url);
    player.realize();
    player.prefetch();
    player.start();

    } catch (Exception e) {
    append(e.toString());
    }
    }

  2. #2
    Super Contributor
    Join Date
    Oct 2007
    Location
    Deva, Romania
    Posts
    3,471

    Re: problems about playing music

    Hi,

    A probable cause for this might be the fact that the file name contains Chinese characters. Try naming it with conventional characters and see if it works.

  3. #3
    Registered User
    Join Date
    Dec 2005
    Posts
    26

    Re: problems about playing music

    hi,
    bogdan.galiceanu:
    Thanks very much.As you say,when i change the name of the song into english, i can play it on Nokia 8600 now.
    Now the problem is that:when invoke createPlayer() with the file url containing chinese name,why it throws "javax.microedition.media.MediaException:Invalid locator",how can I solve this problem??
    Thanks again.
    Last edited by 02060515; 2008-09-26 at 02:49.

Similar Threads

  1. E65 Music Player Problems
    By mattoleson in forum General Development Questions
    Replies: 0
    Last Post: 2007-09-08, 10:32
  2. Replies: 4
    Last Post: 2007-08-24, 02:02
  3. Suggestions and Complaints regarding Music Organization on Nokia E61
    By Optikalusion in forum General Development Questions
    Replies: 0
    Last Post: 2007-06-09, 14:49
  4. Replies: 1
    Last Post: 2006-11-30, 04:16

Posting Permissions

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