×

Discussion Board

Results 1 to 8 of 8
  1. #1
    Registered User
    Join Date
    Jun 2007
    Posts
    2

    Invalid locator in MMAPI

    Hi!

    I've tried to write a very simpe wav-player midlet. The main part is the following:

    Player player = Manager.createPlayer("http://java.sun.com/products/java-media/mma/media/test-wav.wav");
    player.start();

    I've compiled , and run under Wireless Toolkit, and it works.
    When i've run the midlet on my phone (Nokia 6070), i've got the following error:
    javax.microedition.media.MediaException: Invalid locator: .... {url}

    Have You got any idea?
    Thanx!

    gus

  2. #2
    Nokia Developer Expert
    Join Date
    Jun 2005
    Posts
    923

    Re: Invalid locator in MMAPI

    Some Series 40 devices do not suport .wav files. You check with your 6070 (I don't have one at hand) using MediaSampler: http://forum.nokia.com/info/sw.nokia..._v1_0.zip.html

    Daniel

  3. #3
    Registered User
    Join Date
    Jun 2007
    Posts
    2

    Re: Invalid locator in MMAPI

    Thank you for your answer!

    You're right!

    I've checked my phone with MediaSamper, and i've got the following informaton:
    Unsupported sounds:
    ...[audio/wav], [audio/x-wav].

    gus

  4. #4
    Registered User
    Join Date
    May 2012
    Posts
    14

    Re: Invalid locator in MMAPI

    Hi All,

    I'm trying to capture an image, but always gives an error:
    javax.microedition.media.MediaException: Invalid locator: capture://video?encoding=image/jpeg
    or
    javax.microedition.media.MediaException: Invalid locator: capture://video?encoding=png

    I'm trying in NetBeanse 6.9.1 and emulator for Nokia Series 40
    my code is ==>
    player = Manager.createPlayer("capture://image"); //("capture://video");
    player.realize();
    videoControl = (VideoControl) (player.getControl("VideoControl"));
    videoControl.initDisplayMode(videoControl.USE_DIRECT_VIDEO,this);
    player.start();
    videoControl.setVisible(true);
    ................
    ...............
    if(videoControl != null){
    byte[] image = videoControl.getSnapshot("encoding=image/jpeg"); //Exception is giving in this location
    ........
    ...................
    }
    also I have tried videoControl.getSnapshot("null"); but same Exception I am getting javax.microedition.media.MediaException: Invalid locator: capture://video?null

    Please help me,

  5. #5
    Regular Contributor
    Join Date
    Dec 2011
    Posts
    174

    Re: Invalid locator in MMAPI

    Hi shailendra98 and welcome to the Nokia Developer Discussion Boards!

    You should use the Manager.createPlayer("capture://image") and videoControl.getSnapshot("null") with Series 40 devices. See more from the following link
    http://www.developer.nokia.com/Commu...ure_in_Java_ME

    -tiviinik

  6. #6
    Registered User
    Join Date
    May 2012
    Posts
    14

    Re: Invalid locator in MMAPI

    Hi tiviinik,

    Thanks for reply, actually I have already use both but I am getting same Exception javax.microedition.media.MediaException: Invalid locator: capture://video?null

  7. #7
    Regular Contributor
    Join Date
    Dec 2011
    Posts
    174

    Re: Invalid locator in MMAPI

    Hi shailendra98,

    The MediaException is thrown if the requested format is not supported or the Player doesn't suppot snapshots. Did you try the code in the link of my last post. That should work. What devices and SDK are you using?

    -tiviinik

  8. #8
    Registered User
    Join Date
    May 2012
    Posts
    14

    Re: Invalid locator in MMAPI

    Hi tiviinik,

    It is working proper and I am able to capture the image I am using Manager.createPlayer("capture://image") and videoControl.getSnapshot("encoding=jpeg&width=240&height=320"); but I have one problem I want to save captured image in gallery folder or phone memory but when I save it , it give Exception on device Security Java/lang/SecurityException Access denied could u give me any suggesion .


    Thnaks,
    Shailendra

Similar Threads

  1. MMAPI Book released - two free copies up for grabs
    By brokendove in forum Mobile Java Media (Graphics & Sounds)
    Replies: 9
    Last Post: 2007-05-18, 01:21
  2. Cannot play MP3 with chinese filename in MMAPI
    By domicch in forum Mobile Java Media (Graphics & Sounds)
    Replies: 6
    Last Post: 2006-05-17, 07:36
  3. MMAPI video in a midlet query
    By greggiannis in forum Mobile Java Media (Graphics & Sounds)
    Replies: 0
    Last Post: 2005-09-02, 02:15
  4. mmapi 1.0 vs mmapi 1.1
    By garyjoel in forum Mobile Java Media (Graphics & Sounds)
    Replies: 2
    Last Post: 2005-04-27, 08:53
  5. partially MMAPI Support in MMAPI Supported device
    By emailmsgbox in forum Mobile Java Media (Graphics & Sounds)
    Replies: 2
    Last Post: 2003-11-25, 14:32

Posting Permissions

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