×

Discussion Board

Results 1 to 7 of 7
  1. #1
    Registered User
    Join Date
    Nov 2004
    Posts
    4

    Sending List Objects using Bluetooth

    Hi,

    I'm designing a bluetooth application that can browse the file system of a remote PC running Windows. I'm using the J2ME API and the Wireless Toolkit and the program should run on a symbian series 60 (on a nokia N-gage).

    My initial approach is as follows: Have a program running on the PC (bluetooth USB dongle) listening for connections from the client program on the N-gage. When the client request the file
    system, a list object should be sent with the file/dir names and corresponding icon.

    The problem I have is with sending the object. Is there a way to send List objects (List object from lcdui package) to/from devices using the Java Bluetooth API (not OBEX)??

    I'd really appreciate any help on this.
    Sean

  2. #2
    Registered User
    Join Date
    Sep 2004
    Posts
    29
    Hi.
    To my knowledge serialization is not allowed in J2ME, at least in MIDP1.0 (I'm not sure about 2.0). One solution would be to create your own "light-weight" version of serialization in order to be able to send the lists. One approach would be to send all the list objects String values over bluetooth and on the recepient side try to recreate the list.



    hope this helps

    /MCrill

  3. #3
    Registered User
    Join Date
    Nov 2004
    Posts
    4

    sending strings and images

    Hey,

    Yeah I was thinking of sending the string through and forming the list on the client's side. But the reason I wanted to be able to send a list is so that I could include the icon for each file association. I need the string of the name and the associated type icon so that the client knows what's a file and what's a folder. Do you think it would be efficient to send the strings and images separately and then put them together when they're received? I just thought sending them together as a list would be better. Any ideas would be cool.

    Thanks,
    Sean

  4. #4
    Registered User
    Join Date
    Sep 2004
    Posts
    29
    To send the one image for each list item isn't recommendable from a bancwidth point of view. A better solution would be to send the file and directory image ONCE and to use a flag to indicate if a list object is a directory or a fiel. The recepient can then use the images to recreate the list in a correct manner.


    The best would be to implement a class that extends the List class and to define a serializable and deserializable method for it. this however is a little bit more tricky. By doing so you could "serialize" the whole list and send it over bluetooht to the recepient, which than can instantiate an object by using the deserialize method. This however is a little bit more tricky.



    /MCrill

  5. #5
    Registered User
    Join Date
    Sep 2004
    Posts
    29
    ....its also a little bit tricky to not repeat sentences in replies......



    ......sorry about that.....




    /MCrill

  6. #6
    Registered User
    Join Date
    Mar 2007
    Posts
    1

    Question Re: Sending List Objects using Bluetooth

    hi all,

    i am doing similar thing in which i want dirctory list from the root of mobiledevice at my server side which is made in j2se.
    so i want to know how to push object and set header or other related properties to get rootlist from mobile to server side.

  7. #7
    Registered User
    Join Date
    Mar 2003
    Posts
    4,105

Posting Permissions

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