×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Nov 2008
    Posts
    2

    Question Simple bluetooth question...

    hello folks, I have a simple question to you:
    I have two mobile devices (with bluetooth api, J2ME):

    mobile1 and mobile2,

    if I have the remote blueooth address of mobile2, can I get the RemoteDevice object of mobile2 without making a device inquiry?

    I really like to connect to an specific service on mobile2, an I like to do that as soon as possible, so I don't like to make a device inquiry if it is not necessary (having all data of the remote device), due to time consumption

    if you know a way to quick connect, please, tell me

    thanks in advance,

    Lancelot.
    Last edited by lancelot_abc; 2008-11-22 at 14:34.

  2. #2
    Nokia Developer Expert
    Join Date
    May 2007
    Location
    Mexico D.F
    Posts
    351

    Re: Simple bluetooth question...

    Hello

    You may try to retrieve cached or prekown devices using the method of the DiscoveryAgent class:


    public RemoteDevice[] retrieveDevices(int option)

    Returns an array of Bluetooth devices that have either been found by the local device during previous inquiry requests or been specified as a pre-known device depending on the argument. The list of previously found devices is maintained by the implementation of this API. (In other words, maintenance of the list of previously found devices is an implementation detail.) A device can be set as a pre-known device in the Bluetooth Control Center.
    Parameters:
    option - CACHED if previously found devices should be returned; PREKNOWN if pre-known devices should be returned
    Returns:
    an array containing the Bluetooth devices that were previously found if option is CACHED; an array of devices that are pre-known devices if option is PREKNOWN; null if no devices meet the criteria
    :Ruben

  3. #3
    Super Contributor
    Join Date
    Apr 2007
    Posts
    2,708

    Re: Simple bluetooth question...

    if u already have the services-url then u can simply use the Connector class to open the url to the bluetooth device :

    StramConnection connection = (StreamConnection)Connector.open(serviceUrl);

    If u only have the remote adress then u should first start a services search on that device, cause in the end u still need the url of the services offered by the device...

Similar Threads

  1. Bluesoleil Software
    By kencooper in forum Bluetooth Technology
    Replies: 9
    Last Post: 2008-08-29, 19:46
  2. Question on Bluetooth Compatibility
    By Viola27 in forum Bluetooth Technology
    Replies: 3
    Last Post: 2006-04-14, 22:50
  3. question about, BCC and bluetooth, help !!
    By username3 in forum Bluetooth Technology
    Replies: 0
    Last Post: 2004-12-11, 16:16
  4. simple question . midp 1.0 support bluetooth and obex function ?
    By helloeveryone in forum Mobile Java General
    Replies: 1
    Last Post: 2003-12-03, 21:25
  5. Bluetooth simple ?
    By int01h in forum Symbian
    Replies: 2
    Last Post: 2003-10-16, 13:46

Posting Permissions

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