diff options
author | pierantoniomerlino <[email protected]> | 2017-05-30 11:23:56 +0200 |
---|---|---|
committer | petreeftime <[email protected]> | 2017-06-30 02:40:44 +0300 |
commit | 92f94fc2f2d443a5ffb2c6030bcedb08cc57ca5f (patch) | |
tree | 310f893f3515368d9b0f7ef07653dd13f6980b4f | |
parent | 6e580f494ced312ed8f56bcd3fc33499d91720e3 (diff) |
Added getInterfaceName method
Signed-off-by: pierantoniomerlino <[email protected]>
-rw-r--r-- | java/BluetoothAdapter.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/java/BluetoothAdapter.java b/java/BluetoothAdapter.java index 10c39a2d..2761b4bb 100644 --- a/java/BluetoothAdapter.java +++ b/java/BluetoothAdapter.java @@ -230,6 +230,14 @@ public class BluetoothAdapter extends BluetoothObject * @return The local ID of the adapter. */ public native String getModalias(); + + /** Returns the interface name of the adapter. + * @return The interface name of the adapter. + */ + public String getInterfaceName() { + String[] path = getObjectPath().split("/"); + return path[path.length-1]; + } private native void delete(); |