https://kotlinlang.org logo
#android
Title
# android
t

tank777

02/05/2021, 4:08 AM
Hello Can any one help me to convert the bluetooth remove bond java code to Kotlin?
Copy code
Method m = device.getClass().getMethod("removeBond", (Class[]) null);
 m.invoke(device, (Object[]) null);
t

tateisu

02/05/2021, 5:36 AM
Copy code
device.javaClass.getDeclaredMethod("removeBond")
   .apply{  isAccessible =true }
   .invoke(device)
2 Views