×

Discussion Board

Results 1 to 11 of 11
  1. #1
    Regular Contributor
    Join Date
    Jul 2008
    Posts
    97

    Question API to read file information in S60 2nd FP2 sdk?

    Hi all,

    Can anyone plzz tell me which API are available in S60 2nd edition FP2 java SDK to read some data from file and send those info to a server? Is there any way in which i can send the file information (some text and numbers) to the server? I heard about xml/soap, but cant be sure whether the transfer of info can be done using xml or any other way from my device which is nokia 6630...plz give me some poineters how to get this thing done...I m morely concentrating on transfering data from device to server and vice-versa on 2nd edition fp2 v8.0a device...plz do reply me..I m tired of finding any methods..

    also about my environment, I have Eclipse 3.2/3.4 and Java MIDP s60 2ndFP2 SDK...does this suffice to make the mobile application on Nokia 6630...Just now i installed Sun WTK but dont know exactly what purpose it make if I already have eclipse and S60 2nd fp2 MIDP sdk...does the Sun WTK is a better option instead of using eclipse?

    somehow later on I need web services feature for my app on this phone...does this SDK provide that, or I have to use the HTTP or TCP/IP sockets to achieve the sam ething...

    plz be patient..and reply me as I am depressed in deciding what to use if I make the java application on the phone...

    also tell me how to integarete the above SDK with eclipse IDE(if eclipse is the good choice)..

    thank you very much for your kind cooperation and help...
    regards,
    sanjay

  2. #2
    Regular Contributor
    Join Date
    Oct 2005
    Location
    Cairo,Egypt
    Posts
    72

    Re: API to read file information in S60 2nd FP2 sdk?

    Dear sanjay,
    first about the envirnment... its better to use NetBeans with mobility back..its easy to use and don't need any extra configration.

    About accessing file and read data from it. yes it can be done from java using
    JSR 75 FileConnection and PIM API.
    and its already exist on 6630.
    and you can send it by http connection or socket connection as you wish..
    about the server side i think you should do it by your self jsp/servlet or even dotnet as you wish..

    I hope this is valuable info for you.

    Regards
    Wael Nabil
    Product Manager
    CITGlobal MOBiDIV
    Egypt.

  3. #3
    Regular Contributor
    Join Date
    Jul 2008
    Posts
    97

    Re: API to read file information in S60 2nd FP2 sdk?

    Thanks a lot. One more question I want to put before you. Does the sdk provide the http connection or socket API for sending of file data to server? and can I use xml/SOAP for this type of application?

    where can I get the info about http or sockets used in this device if they are not mentioned in the sdk...?

    thank you very much..
    regards,
    sanjay

  4. #4
    Regular Contributor
    Join Date
    Oct 2005
    Location
    Cairo,Egypt
    Posts
    72

    Re: API to read file information in S60 2nd FP2 sdk?

    Regarding the http and socket api, its already with the sdk nothing extra needed.
    about xml/soap api its already exist in j2me in JSR 172 u can get more information on:
    http://developers.sun.com/mobility/apis/articles/wsa/

    but it doesn't supported on 6630 u can see the supported api on
    http://www.forum.nokia.com/devices/6630

    Regards
    Wael Nabil
    Product Manager
    CITGlobal MOBiDIV
    Egypt.

  5. #5
    Regular Contributor
    Join Date
    Jul 2008
    Posts
    97

    Re: API to read file information in S60 2nd FP2 sdk?

    Hi, thanks for the quick help.I saw the specification page of Nokia 6630 asn I found the JSR 172 is not supported. ut as u told that is available in JEME lib.so can i use the JEME for my s60 2nd edition FP2 device to support xml/soap ? if not then how can I achieve tranfering file data to server? plz tell me which IDE specific to this edition shall I use, is it eclipse3.2/NetBeans/Sun WTK? I m doing this on Windows XP SP2..

    thanks and regards,
    sanjay

  6. #6
    Regular Contributor
    Join Date
    Oct 2005
    Location
    Cairo,Egypt
    Posts
    72

    Re: API to read file information in S60 2nd FP2 sdk?

    Dear sanjay,
    As the api is not exist on the device so you can't use it.
    but there is alternative to send ur data directly as byte array throw socket connection.
    about the IDE all u said is supported because it doesn't depend on the IDE more than the SDK....but i perfer to use netbeans with mobility back as its easy to config as i told u before.

    Regards.
    Wael Nabil
    Product Manager
    CITGlobal MOBiDIV
    Egypt.

  7. #7
    Regular Contributor
    Join Date
    Jul 2008
    Posts
    97

    Re: API to read file information in S60 2nd FP2 sdk?

    Hi Wael,

    As you told I installed Netbeans Mobility pack and then installed the s60_2nd_fp2_MIDP sdk. But does the sdk integrate with Netbeans automatically? Netbeans provides all the MIDP related stuff..plz tell me whether any extra add plug-in required to integrate SDK with Netbeans...And one more thing where can I get sockets example in the SDK? I cudnt find that...plz help me..
    regards,
    sanjay

  8. #8
    Regular Contributor
    Join Date
    Oct 2005
    Location
    Cairo,Egypt
    Posts
    72

    Re: API to read file information in S60 2nd FP2 sdk?

    Dear sanjay,
    you don't need to install any further sdk on the mobility pack.
    google about socket example you will find a lot of example and on forum nokia page document section
    Wael Nabil
    Product Manager
    CITGlobal MOBiDIV
    Egypt.

  9. #9
    Regular Contributor
    Join Date
    Jul 2008
    Posts
    97

    Re: API to read file information in S60 2nd FP2 sdk?

    Thanks Wael,
    I have got some sample example in the Netbeans related to networking sockets..I ll try that to send file data to a server.
    regards,
    sanjay

  10. #10
    Regular Contributor
    Join Date
    Jul 2007
    Posts
    50

    Re: API to read file information in S60 2nd FP2 sdk?

    Dear Friend ..

    I dont know my solution will help or not ,I have tried to read a .txt file from server and it works well on S40 3rd and S60 2nd ed devices.

    The code is

    private String url = "http://www.iworktech.com/DNN/Portals/0/PriceAlert.txt";


    private void readFileFrom(String url) throws IOException {

    StringBuffer b = new StringBuffer();
    InputStream is = null;
    HttpConnection c = null;

    try {
    long len = 0 ;
    int ch = 0;

    c = (HttpConnection)Connector.open(url);
    is = c.openInputStream();

    len =c.getLength() ;
    if ( len != -1)
    {
    // Read exactly Content-Length bytes
    for (int i =0 ; i < len ; i++ )
    if ((ch = is.read()) != -1)
    b.append((char) ch);
    } else
    {
    while ((ch = is.read()) != -1)
    {
    len = is.available() ;
    b.append((char)ch);
    }
    }
    t= new TextBox("Stock Values", b.toString(),1026,0);
    } finally
    {
    is.close();
    c.close();
    }
    display.setCurrent(t);
    }

    and i called this methode in Start() ...

  11. #11
    Regular Contributor
    Join Date
    Jul 2008
    Posts
    97

    Re: API to read file information in S60 2nd FP2 sdk?

    Thanks for the code snippet. So i can put that code in client file and invloke the method in start() in the same file. Can I test that code with the emulator/actual device? for that the device/emulaotr should be internet connected? for emulator how can I configure internet so that I test your code? plz guide me if I m not going in wrong direction...I really appreciate ur help..lot thanks.

    regards,
    sanjay

Similar Threads

  1. S60 2nd FP2 MIDP SDK error
    By saintfalcon in forum Mobile Java Tools & SDKs
    Replies: 10
    Last Post: 2009-04-21, 10:17
  2. Replies: 3
    Last Post: 2008-08-29, 10:21
  3. Can Nokia connectivity Framwork work with S60 3rd FP2 SDK?
    By luckyapplehead in forum Symbian Networking & Messaging (Closed)
    Replies: 2
    Last Post: 2007-12-18, 12:52
  4. S60 2nd SDK FP2 - Emulator connecting to Internet problem
    By Unico in forum Symbian Networking & Messaging (Closed)
    Replies: 0
    Last Post: 2007-04-30, 12: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
  •  
×