views:

39

answers:

0

Greetings Coders.

I'm trying to establish a connection between my Android Phone and an old Dumbphone.

When I use this:

tmp = device.createRfcommSocketToServiceRecord(UUID.randomUUID());

I get:

"Exception: Service Discovery Failed"

With This:

Method m = device.getClass().getMethod("createRfcommSocket", new Class[] {int.class});
tmp = (BluetoothSocket) m.invoke(device, 1);

I get:

"Exception: Connection Refused"

What should I do?