Could somebody post some code with an example of passing only an integer by bluetooth?

I know where define ServiceRecord in SERVER:

myServiceRecord = localDevice.getRecord(myStreamConnectionNotifier);

But I dont know how define ServiceRecord in CLIENT:
it must be before this line no?:

String url = myServiceRecord.getConnectionURL(

Many thanks for your replies