×

Discussion Board

Results 1 to 6 of 6
  1. #1
    Registered User
    Join Date
    Nov 2013
    Posts
    11

    Nokia Asha Youtube Player Java ME

    Hi All,

    I have tried to create a youtube video player in the Nokia Asha (SDK 1.0). I have followed the instructions in the tutorial here:
    http://developer.nokia.com/Community...r_with_Java_ME

    However, after implementation, I get the error saying that rtsp is an un-supported protocol. Upon further research, I have read here that RTSP is not supported in Series 40 and up.

    I have also tried with the instruction to use http: such as
    String url = "http://www.myhost.com/videos/video.3gp";
    Player player = Manager.createPlayer(url);

    When I try this, My app crashes as it says "Sorry, not enough memory"

    Im also testing it on the Asha 501 device and emulator.

    Can someone please point me to a tutorial/learning material where they talk about implementing a youtube player in Asha SDK 1.0?

    Thanks much in advance.

    Rgds
    Mo

  2. #2
    Registered User
    Join Date
    Nov 2013
    Posts
    11

    Re: Nokia Asha Youtube Player Java ME

    My Logs are as follows:

    Emulator command: C:\Nokia\Devices\Nokia_Asha_SDK_1_0\bin\Nokia_Asha_SDK_1_0_em.exe -classpath "C:\Users\XXX\AppData\Local\Temp\_mtj.tmpXXX\ExampleStreamingMIDlet4308970159705158741.launch\ExampleStreamingMIDlet.jar" "C:\Users\XXX~1\AppData\Local\Temp\_mtj.tmpXXX\ExampleStreamingMIDlet4308970159705158741.launch\ExampleStreamingMIDlet.jad"
    Connecting to Running "Nokia Asha SDK 1.0" Instance #10002 ...
    connected to port 59444
    connected to port 59445
    MIDlet Saved: ExampleStreamingMIDlet.jad inside Memory card://Midlets folder.
    MIDlet Saved: ExampleStreamingMIDlet.jar inside Memory card://Midlets folder.
    MIDlet Saved: ExampleStreamingMIDlet.jad inside Memory card://Midlets folder.
    MIDlet Saved: ExampleStreamingMIDlet.jar inside Memory card://Midlets folder.
    null

    java.lang.RuntimeException: Blocking call performed in the event thread
    - com.sun.midp.security.PermissionDialog.waitForAnswer(), bci=26
    - com.sun.midp.security.SecurityHandler.askUserForOneShotPermission(), bci=104
    - com.sun.midp.security.SecurityHandler.checkForPermission(), bci=917
    - com.sun.midp.security.SecurityHandler.checkForPermission(), bci=26
    - com.sun.midp.midletsuite.MIDletSuiteImpl.checkForPermission(), bci=20
    - com.sun.midp.midletsuite.MIDletSuiteImpl.checkForPermission(), bci=18
    - com.sun.midp.main.CldcAccessControlContext.checkPermissionImpl(), bci=34
    - com.sun.j2me.security.AccessControlContextAdapter.checkPermission(), bci=4
    - com.sun.j2me.security.AccessController.checkPermission(), bci=29
    - com.sun.j2me.app.AppPackage.checkForPermission(), bci=36
    - com.sun.mmedia.protocol.Source.checkPermission(), bci=17
    - com.sun.mmedia.protocol.Source.checkPermission(), bci=66
    - com.sun.mmedia.protocol.Source.<init>(), bci=26
    - javax.microedition.media.Manager.createPlayer(), bci=466
    - example.VideoCanvas.playVideo(VideoCanvas.java:205)
    - example.VideoCanvas.pointerPressed(VideoCanvas.java:188)
    - javax.microedition.lcdui.CanvasLFImpl.uCallPointerPressed(), bci=10
    - javax.microedition.lcdui.DisplayableLFImpl.uCallPointerEvent(), bci=120
    - javax.microedition.lcdui.Display$DisplayEventConsumerImpl.handlePointerEvent(), bci=16
    - com.sun.midp.lcdui.DisplayEventListener.process(), bci=337
    - com.sun.midp.events.EventQueue.run(), bci=182
    - java.lang.Thread.run(), bci=5


    and then the app says "something went wrong with running this app"

    In the code"

    -- instead of this lines below- -----
    player = Manager.createPlayer("rtsp://v1.cache5.c.youtube.com/CjYLENy73wIaLQm8E_KpEOI9cxMYDSANFEIJbXYtZ29vZ2xlSARSBXdhdGNoYLm0hv_ig5HRTww=/0/0/0/video.3gp");
    player.realize();
    player.prefetch();

    ---- ----

    Iv tried
    --------------------
    player = Manager.createPlayer("http://www.xyz.com/prni/3gp.3gp");
    player.realize();
    player.prefetch();


    and still does not work

    Im a n00b to Asha, please help me with this regards,

    Much appreciate your inputs.

    Thanks.

  3. #3
    Nokia Developer Champion
    Join Date
    Mar 2013
    Posts
    603

    Re: Nokia Asha Youtube Player Java ME

    There used a great table in the java library with difference in playing locators of different os's and versions, i cant seem to find it now BUT as far as i remember the new Asha 1.0 did not support RTSP locators but Asha FT supported it.
    My app sc2casts http://store.ovi.com/content/387063 which is available for Asha FT plays the RTSP streams of the casted starcraft2 video games from youtube.

  4. #4
    Registered User
    Join Date
    Nov 2013
    Posts
    11

    Re: Nokia Asha Youtube Player Java ME

    == Update ===

    I have also tried this Tutorial (scroll to the bottom and find this topic :: Topic - Series 40 Java Training: Progressive Video) @URL:

    http://developer.nokia.com/gen/videos_all.xhtml

    When I Run it in the emulator and mobile, it says "Error Unable to Create Native Player",
    For this:
    Iv tried hosting 3gp video on Dropbox and streaming - same error
    Iv tried youtube URL for video - Not the same error, but video does not play.

    Seriously, why is this so hard? Can't I get one good resource to learn from ? Am I missing something obvious here?

    Thanks

  5. #5
    Nokia Developer Champion
    Join Date
    Mar 2003
    Posts
    4,105

    Re: Nokia Asha Youtube Player Java ME

    Quote Originally Posted by mponnada View Post
    Can someone please point me to a tutorial/learning material where they talk about implementing a youtube player in Asha SDK 1.0?
    The Nokia Asha 501 supports RTSP natively, outside of Java†. Therefore, there is no need for a general YouTube player beside m.youtube.com. All you have to do is to configure your device correctly for Streaming and all RTSP based services run. Do you need help with that?
    Quote Originally Posted by shai.i View Post
    My app sc2casts which is available for Asha FT plays the RTSP streams of the casted starcraft2 video games from youtube.
    Nokia Series 40 Full Touch, like the Nokia 305, Nokia 306, Nokia 308, Nokia 309, and Nokia 311? Good news. If you find that overview again, I am interested as well.

    † I have not double-checked whether RTSP is offered within J2ME in nowadays Nokia devices. Anyway, a platformRequest should do, or you hit a bug.
    Last edited by traud; 2013-11-15 at 09:21.

  6. #6
    Registered User
    Join Date
    Aug 2011
    Posts
    39

    Re: Nokia Asha Youtube Player Java ME

    Quote Originally Posted by mponnada View Post
    My Logs are as follows:

    java.lang.RuntimeException: Blocking call performed in the event thread
    It might help you if you would read the error message(s). You can not block the event thread on Nokia Asha software platform 1.0 (and later), see http://developer.nokia.com/Resources...tive-apis.html

Similar Threads

  1. Decoded response in Java ME (Nokia Asha)
    By Hospodar in forum Mobile Java General
    Replies: 9
    Last Post: 2013-08-01, 15:39
  2. Cookies in Java ME (Nokia Asha)
    By Hospodar in forum Mobile Java General
    Replies: 4
    Last Post: 2013-07-30, 11:34
  3. Streaming youtube videos on j2me MIDlet(java)
    By pavanragi in forum General Development Questions
    Replies: 2
    Last Post: 2012-08-12, 22:06
  4. Include Youtube player
    By pamepros in forum Nokia Asha Web Apps
    Replies: 1
    Last Post: 2011-08-23, 11:09
  5. Playing Youtube videos in Java Apps
    By scharffc in forum Mobile Java Media (Graphics & Sounds)
    Replies: 2
    Last Post: 2010-06-06, 09:46

Posting Permissions

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