not getting friendly name [bluetooth connection]

Forum for discussion about developing multiplayer games for mobile platform including Httpconnection and bluetooth connections.

not getting friendly name [bluetooth connection]

Postby itskrishnaraj » Thu Nov 13, 2008 7:27 am

hi

i am trying to connect two devices through bluetooth , but not getting the local devices friendlyname (getFriendlyName()).

code:

LocalDevice loc;
String name;

// Set UUID
disc.setServiceUUID( "20000000000010008000006057028C19" );

// Check if Bluetooth is turned on
try
{
loc = LocalDevice.getLocalDevice(); //
System.out.println("localdevice>>"+loc);
name=loc.getFriendlyName();
System.out.println("nameeee>>"+name);
}
catch( BluetoothStateException e )
{ // display user notification
showAlertAndExit( "", "Please switch Bluetooth on!", AlertType.ERROR );
return;
}

// Sets the name how this device is shown to the remote user
disc.setName( name );
itskrishnaraj
 
Posts: 39
Joined: Thu Aug 07, 2008 1:28 pm

Return to Multiplayer Mobile Games

Who is online

Users browsing this forum: No registered users and 1 guest