添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

Hi all, thanks for reading and if you help me I will be so greatful towards you
well I'm new to this app inventor thing and to the coding world so please don't judge me ( :slight_smile:

Ok I got the code down below from this website and I need you to tell or show me how to use it in the App inventor Blocks

the code is down below and my question is how can I used it in the code blocks
Any help will be appreciated thanks..

private void unpairDevice(BluetoothDevice device) {
    try {
        Method method = device.getClass().getMethod("removeBond", (Class[]) null);
        method.invoke(device, (Object[]) null);
    } catch (Exception e) {
        e.printStackTrace();
              

Hi @Manuel_Hernandez,
Did you manage to solve this problema from AppInventor, without the need to program an extension?

Thanks,

Thanks @Taifun four your answer,

I apologize for omitting that my devices are BLE connected (and paired/bond).
My app forget their addresses but it doesnt remove the bond info from Android.

Thanks anyway,
Osmany

Hi @Waloui
I'm sorry to tell you that I can't find a solution from App Inventor blocks, so I decided to incorporate security at the application level encoding the transmitted data.

Also, I removed the pairing/bonding process and made connection through saved real MAC address of my devices; Therefore, I do a kind of bonding (only at one end, the central one) at the application level without the intervention of the operating system. At the other end (peripherics) only one simultaneous connection is allowed (no whitelist used).

For my application, these solutions work. I'm sorry I can't help.

Osmany

1.Introduction BT extension provides some features to work with bluetooth. Latest Version: 1.2 Released: 2020-08-28T18:30:00Z (UTC) Last Updated: 2021-03-18T18:30:00Z (UTC) Required Api: 17 Permissions: android.permission.BLUETOOTH,android.permission.BLUETOOTH_ADMIN,android.permission.ACCESS_FINE_LOCATION,android.permission.ACCESS_COARSE_LOCATION 2.Blocks [image] [image] [image] 3.Documentation After Set Duration Event indicating whether duration was set successfuly or not. [image]