×

Discussion Board

Results 1 to 8 of 8
  1. #1
    Registered User
    Join Date
    Jun 2010
    Posts
    21

    Unhappy List of Bluetooth devices and saving it using FileConnection

    Hi to All!!!

    Is it possible to save all the detected bluetooth devices in a .txt file using a file connection??

    i created an application that detects nearby bluetooth devices, i used List for displaying the devices and what i want to have is to save the List of devices into a text file.


    Please, can somebody give me a guide to make the code. thanks a lot in advance.

  2. #2
    Registered User
    Join Date
    Oct 2009
    Location
    Noida
    Posts
    941

    Re: List of Bluetooth devices and saving it using FileConnection

    Yes, you can do it.

    Just open a fileConnection using JSR 75 FC API and write it.

    Ref to FN Wiki example - http://wiki.forum.nokia.com/index.ph...ile_in_Java_ME
    Thanks,
    Ekta

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

    Re: List of Bluetooth devices and saving it using FileConnection

    eian@nokia, as your are familiar with JSR-75 (File API) and JSR-82 (Bluetooth API) already, can you ask your question in more detail?

  4. #4
    Registered User
    Join Date
    Jun 2010
    Posts
    21

    Re: List of Bluetooth devices and saving it using FileConnection

    hmmm... what i want to happen sir is that after i displayed all the detected bluetooth devices and its respective bt mac address, i want to save it in a text file with its format..
    the format could be name_of bluetooth (space) mac_address ..
    like that..
    Last edited by eian@nokia; 2010-07-27 at 14:07.

  5. #5
    Registered User
    Join Date
    Jun 2010
    Posts
    21

    Re: List of Bluetooth devices and saving it using FileConnection

    .........up

  6. #6
    Registered User
    Join Date
    Oct 2009
    Location
    Noida
    Posts
    941

    Re: List of Bluetooth devices and saving it using FileConnection

    Quote Originally Posted by eian@nokia View Post
    .........up
    You are able to do it or still stuck somewhere ?
    Thanks,
    Ekta

  7. #7
    Registered User
    Join Date
    Jun 2010
    Posts
    21

    Re: List of Bluetooth devices and saving it using FileConnection

    i am able to do sir..but i can only save a device one at a time only..

    what i am planning is to save all the detected devices at the same time..write the details of the devices to the text file at the same time..

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

    Re: List of Bluetooth devices and saving it using FileConnection

    ‘Writing to one resource at the same time.’ Not possible. I think you mean something else. Consequently, because guessing is difficult, I recommend to find someone with a computer scientist in your vicinity and ask him/her in person.

    Does this help? Your devices pop up in an event called deviceDiscovered. There, you escape in a new Runnable+Thread (with that remote device in its constructor). Then, in that event run, you open your file (or record store), go to its end and append the information about that device. Are you sure, you need that friendly name? Often, the friendly name was not cached by your Nokia, consequently, you have to ask for it explicitly. Some devices allow to ask for this while the inquiry is running, some do not and getting the friendly name has to be done from the event inquiryCompleted.

Similar Threads

  1. Replies: 4
    Last Post: 2009-08-21, 11:30
  2. Problem saving an image using FileConnection
    By pmgf_14 in forum Mobile Java General
    Replies: 7
    Last Post: 2008-08-18, 23:41
  3. FileConnection and list()
    By masterchief2004 in forum Mobile Java General
    Replies: 3
    Last Post: 2007-08-14, 03:03
  4. saving data using fileconnection API
    By lachee in forum Mobile Java General
    Replies: 6
    Last Post: 2007-07-16, 12:52
  5. List of devices what supports FileConnection API
    By valery_bogdanov in forum Mobile Java General
    Replies: 7
    Last Post: 2007-06-29, 08:36

Posting Permissions

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