×

Discussion Board

Results 1 to 6 of 6
  1. #1
    Regular Contributor
    Join Date
    Aug 2005
    Posts
    78

    Opening a web page through my J2ME application.

    Hi All,

    I am creating a j2me application, that has to connect to the server online and open a page on that server, and then upload a file at a particular location in that server.

    I am using Nokia 6681. I was exploring it, but since I have very less time, I am posting a query here also.

    If this is possible (opening a connection with a server - I have the IP address of the server and also the path to that page), and display that page on my cell phone from within the j2me application.

    Is this somehow related to JSR-172 (Which is not supported on Nokia 6681).

    If this is not possible this way, Is there any way I can upload that file to the server from within the application.

    Urgent help is required.

    Thanking you in anticipation

    Ashish

  2. #2
    Registered User
    Join Date
    Mar 2005
    Posts
    6

    Re: Opening a web page through my J2ME application.

    Have you tried invoking the native browser, giving it the URL ?
    Code:
    if (midlet.platformRequest (url) == true)
    {
     // MIDlet must Exit before the browser can
    // launch
    midlet().notifyDestroyed();
    }
    Arvind

  3. #3
    Regular Contributor
    Join Date
    Aug 2005
    Posts
    78

    Re: Opening a web page through my J2ME application.

    Hi Arvind,

    Is it necessary to exit the midlet for the browser to launch.

    Have you tried this by yourself...

    I will try this on my midlet, and will definately get back to this thread, with the results.

    Thanks for the reply..

    Regards,
    Ashish

  4. #4
    Registered User
    Join Date
    Mar 2005
    Posts
    6

    Re: Opening a web page through my J2ME application.

    Yes, it is working for me on Nokia 6630, RAZR, 6680 and many other phones.

    You only close the browser if the API returns TRUE - that will depend on the device. On Nokia 6600 I didn't have to close the browser and after quiting the browser , control comes back to the MIDlet.
    Arvind

  5. #5
    Regular Contributor
    Join Date
    Aug 2005
    Posts
    78

    Re: Opening a web page through my J2ME application.

    Thankyou Arvind,

    It really did worked.

    Now I am thinking of another way of uploading the file to the server, which is the solution that is required: -

    Whether I can upload a file directly to the server as soon as "Upload File" command is clicked on the cell phone.

    I hope I am making sense.

    All I want is, to upload a file( path of the file hardcoded in the app) as soon as a "Upload File" button is clicked.

    Any solutions!!!!

    Regards,
    Ashish

  6. #6
    Super Contributor
    Join Date
    Mar 2005
    Location
    Paris
    Posts
    814

    Re: Opening a web page through my J2ME application.

    you may try to implement a client server of your own, optimised for what you are willing to do (like some tftp or so)
    basically, the server side is rather easy if you don't consider too much possiblity.
    it can simply be some thing like :
    wait until a socket connection arrives, open it, read from it, receive a couple of info to make sure you will receive the good stuff (token, login & passwd, or whatever)
    then read the filename, the length of the file, and the data

    on the other side, open a connector to your server (socket://url/), open a outputstream, and write your stuff : authentification, filename, file length, data.

    to get the basis to work shouldn't take you more than an hour
    to make it a little safe will be a bit longer, but all this will probably be faster than find the right server and implement the right protocol to speak with it, and it will also be more efficient


    if you already have an apache and a tomcat, you can try with a jsp, protocol will therefore be http, and so much more portable (some operators won't allow you to use anything else but http, and will may be close every thing but the 80 ; moreover, http is supported in midp1, socket is not)

Similar Threads

  1. J2ME Application Network Settings
    By madankn in forum Mobile Java Networking & Messaging & Security
    Replies: 2
    Last Post: 2009-03-25, 07:37
  2. Generating a HTML page from the J2ME application
    By ashishga in forum Mobile Java Networking & Messaging & Security
    Replies: 0
    Last Post: 2006-01-20, 11:21
  3. Uploading File From Series-60 Phone To Web Server Thru C++ Application?
    By periakaruppan in forum Symbian User Interface
    Replies: 0
    Last Post: 2005-06-02, 11:05
  4. Uploading File From Series-60 Phone To Web Server Thru C++ Application?
    By periakaruppan in forum Symbian Tools & SDKs
    Replies: 0
    Last Post: 2005-06-02, 11:04
  5. superdistribution a j2me application
    By ghauber in forum Digital Rights Management & Content Downloading
    Replies: 0
    Last Post: 2004-05-20, 04:29

Posting Permissions

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