Skip to content
This repository was archived by the owner on Jan 4, 2023. It is now read-only.

Commit 92f94fc

Browse files
pierantoniomerlinopetreeftime
authored andcommitted
Added getInterfaceName method
Signed-off-by: pierantoniomerlino <[email protected]>
1 parent 6e580f4 commit 92f94fc

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

java/BluetoothAdapter.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,14 @@ public BluetoothDevice find(String name, String address) {
230230
* @return The local ID of the adapter.
231231
*/
232232
public native String getModalias();
233+
234+
/** Returns the interface name of the adapter.
235+
* @return The interface name of the adapter.
236+
*/
237+
public String getInterfaceName() {
238+
String[] path = getObjectPath().split("/");
239+
return path[path.length-1];
240+
}
233241

234242
private native void delete();
235243

0 commit comments

Comments
 (0)