Discussion Board

Page 1 of 2 12 LastLast
Results 1 to 15 of 25
  1. #1
    Regular Contributor
    Join Date
    Mar 2009
    Posts
    89

    Http connection using J2ME URL working on emulator but not on the Real Device

    Hi to all,
    I have developed the J2ME application for playing the audio and the video content on the mobile device,for this device need to download the audio and video content from the webserver(Tomcat 5.5) to the mobile device via the internet,for this application i'm able to download the Jar file via internet but unable to downlad the audio and video using the same server,can I have any suggestions regarding this? I have tested the this application using N 95 and Nokia 5310.
    Thank You.

  2. #2
    Registered User
    Join Date
    Apr 2009
    Posts
    16

    Re: Http connection using J2ME URL working on emulator but not on the Real Device

    Is it signed application? Have you added HTTPConnection API permission in jad file?

  3. #3
    Regular Contributor
    Join Date
    Mar 2009
    Posts
    89

    Re: Http connection using J2ME URL working on emulator but not on the Real Device

    Hi,first of all Thanks a lot for the reply,
    This application is not a signed apllaication,but coming to the JAD file I have mentioned the permission like this:MIDlet-Permissions: javax.microedition.io.Connector.http and my URL from the Tomcat webserver is like:http://localhost:8080/path/audio12.wav,(I have placed the audio file in the webapps folder of the tomcat),in the place of localhost i have mentioned the IP adress to acess the internet on the mobile,I also placed the jar file and the JAD file in the web apps folder,for this i'm able to download the Jar by mentioning URL like:
    MIDlet-Jar-URL: http://localhost:8080/path/filename.jar,but unable to donload the audio and video content for the real device,for emulator it's working.
    Thank You.

  4. #4
    Super Contributor
    Join Date
    Sep 2008
    Location
    Noida, U.P.
    Posts
    1,330

    Thumbs up Re: Http connection using J2ME URL working on emulator but not on the Real Device

    have u check the internet settings of ur device. Might be the problem of GPRS settings. Also check the network settings in App Manager(for nokia device). Whether it is set to allowed or not allowed. Also Please mention the exception if any comes during creating connection..
    thanks,
    jitu_goldie..

    KEEP TRYING..

  5. #5
    Registered User
    Join Date
    Apr 2009
    Posts
    16

    Re: Http connection using J2ME URL working on emulator but not on the Real Device

    Is it throwing any exception on devicev side?
    Last edited by techendeavour_abhijeet; 2009-05-26 at 06:36.

  6. #6
    Regular Contributor
    Join Date
    Mar 2009
    Posts
    89

    Re: Http connection using J2ME URL working on emulator but not on the Real Device

    Hi,
    As far as internet connection and device settings are considered every thing is ok,I have a doubt regarding i'm able to download the jar from the same server (if the device and internet settings are not correct,i think i may not be able to download the jar also(as far as my knowlegde)),I need to know whether any special settings needed to download the audio and video content from the internet to mobile device,is the fault with content I have provided(I'm using the wav(for audio) and mpg (for video)),for delivering the audio and the video content from the server to the mobile device is there any permissions required from the network operator side,I need these suggetions,Shall we send our own content from the webserver to the mobile device through internet without need of any settings from the internet providerside?.
    Thank You.

  7. #7
    Regular Contributor
    Join Date
    Mar 2009
    Posts
    89

    Re: Http connection using J2ME URL working on emulator but not on the Real Device

    ya its throwing the javax.microedition.io.Exception.

  8. #8
    Super Contributor
    Join Date
    Sep 2008
    Location
    Noida, U.P.
    Posts
    1,330

    Thumbs up Re: Http connection using J2ME URL working on emulator but not on the Real Device

    Quote Originally Posted by kpvrlakshmi View Post
    ya its throwing the javax.microedition.io.Exception.
    Please check the HTTP RESPONSE CODE. Whats that. Is it OK ie 200.
    thanks,
    jitu_goldie..

    KEEP TRYING..

  9. #9
    Registered User
    Join Date
    Apr 2009
    Posts
    16

    Re: Http connection using J2ME URL working on emulator but not on the Real Device

    It might be some data buffer problem that you r downloading, How r u downloading data? what chunk size you have given? Check exact exception using exception.printStackTrace(). try to download small chunk data. Add log on you code. Check, from where your code is throwing exception.

  10. #10
    Regular Contributor
    Join Date
    Mar 2009
    Posts
    89

    Re: Http connection using J2ME URL working on emulator but not on the Real Device

    I have mentioned the URL Like: http://Ip:8080/path/audio12.wav in J2Me code,how to provide the data downloading in terms of chunks,can u provide the example for this one?.
    Thank You.

  11. #11
    Super Contributor
    Join Date
    Sep 2008
    Location
    Noida, U.P.
    Posts
    1,330

    Thumbs up Re: Http connection using J2ME URL working on emulator but not on the Real Device

    Quote Originally Posted by kpvrlakshmi View Post
    I have mentioned the URL Like: http://Ip:8080/path/audio12.wav in J2Me code,how to provide the data downloading in terms of chunks,can u provide the example for this one?.
    Thank You.
    Still u dont give the answer of my previous post.
    Well, did u check the response code for connection. whats the response code??
    thanks,
    jitu_goldie..

    KEEP TRYING..

  12. #12
    Regular Contributor
    Join Date
    Mar 2009
    Posts
    89

    Re: Http connection using J2ME URL working on emulator but not on the Real Device

    Response code:
    java.io.IOException-34
    Thank You.

  13. #13
    Super Contributor
    Join Date
    Sep 2008
    Location
    Noida, U.P.
    Posts
    1,330

    Thumbs up Re: Http connection using J2ME URL working on emulator but not on the Real Device

    Quote Originally Posted by kpvrlakshmi View Post
    Response code:
    java.io.IOException-34
    Thank You.
    Im not talking about the error code.
    Use this to check response code..
    int code = connection.getResponseCode();
    now check and mention the value of code here..

    If response code is 200 then that means that the connection make is OK. Then might be there is some problem with stream or data not with the connection..
    thanks,
    jitu_goldie..

    KEEP TRYING..

  14. #14
    Regular Contributor
    Join Date
    Mar 2009
    Posts
    89

    Re: Http connection using J2ME URL working on emulator but not on the Real Device

    Response Code is: 200,but getting javax.microedition.media.mediaException on N70.
    Thank You.

  15. #15
    Super Contributor
    Join Date
    Sep 2008
    Location
    Noida, U.P.
    Posts
    1,330

    Thumbs up Re: Http connection using J2ME URL working on emulator but not on the Real Device

    Quote Originally Posted by kpvrlakshmi View Post
    Response Code is: 200,but getting javax.microedition.media.mediaException on N70.
    Thank You.
    MediaException - Thrown if a Player cannot be created for the given DataSource.
    java.io.IOException - Thrown if there was a problem connecting with the source

    check and reply. Else post ur code here..
    thanks,
    jitu_goldie..

    KEEP TRYING..

Similar Threads

  1. [moved] how to call a web service from Http connection in j2me?
    By mindIt in forum Mobile Java Networking & Messaging & Security
    Replies: 2
    Last Post: 2009-02-10, 10:17
  2. Http Connection and dialing a call not working on phone
    By electracool in forum Symbian Networking & Messaging (Closed)
    Replies: 1
    Last Post: 2007-12-14, 06:19
  3. working in emulator but not real mobile device
    By mmc18 in forum Mobile Java Networking & Messaging & Security
    Replies: 1
    Last Post: 2006-03-27, 17:56
  4. HTTP Connection issue
    By akhilss in forum Mobile Java Networking & Messaging & Security
    Replies: 2
    Last Post: 2005-09-12, 19:31
  5. HTTP connection on 6310i, 7650, 9210 and in sony-ericsson p800
    By mika1982 in forum Mobile Java Networking & Messaging & Security
    Replies: 1
    Last Post: 2003-07-24, 16:44

Posting Permissions

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