Code example for Service

Methods: getSystemService

0
                    return BluetoothAdapter.getDefaultAdapter();    
                } 
        }); 
        String ns = Context.NOTIFICATION_SERVICE;
        mNotificationManager = (NotificationManager) 
				this.mService.getSystemService(ns);
    } 
 
    @Rpc(description = "Tells if a given address is bonded") 
    public boolean bluetoothIsBonded( 
            @RpcParameter(name="address") String address
    ){ 
    	int bondstate;
        address = address.toUpperCase();
        BluetoothDevice mDevice = mBluetoothAdapter.getRemoteDevice(address);
        bondstate = mDevice.getBondState();
        Log.v(TAG, "Internal bluetoothIsBondend " + address + " -> " + bondstate);
        return bondstate == BluetoothDevice.BOND_BONDED;
    } 
 
    @Rpc(description = "Try to pair with the given PIN code")