Hello everyone,
I’m developing a plugin to handle bluetooth classic communication; everything seems to work fine, except for the write function. It looks like the method is not implemented, although the function is written both in the definitions.ts file and in the Java plugin file file
@PluginMethod
public void write(PluginCall call) {
call.unimplemented("not yet working");
}
If I execute the app on an android device and try to call the write function, nothing happens: looking at the logs yelds this:
2023-07-25 09:29:54.887 8624-8624 AutofillManager io.ionic.starter V requestHideFillUi(null): anchor = null
2023-07-25 09:29:54.976 8624-8624 Capacitor/Plugin io.ionic.starter V To native (Capacitor plugin): callbackId: 131962550, pluginId: Bluetooth, methodName: write
2023-07-25 09:29:54.976 8624-8624 Capacitor io.ionic.starter V callback: 131962550, pluginId: Bluetooth, methodName: write, methodData: {"message":"hello world"}
The definition.ts file looks like this:
init(): Promise<void>;
checkPermissions(): Promise<PermissionStatus>;
requestPermissions(): Promise<PermissionStatus>;
startListening(): Promise<boolean>;
stopListening(): Promise<boolean>;
write(data: {message: string}): Promise<boolean>;
All other methods work fine, but “write” does not. Anyone ever had this kind of problem?
Edit: already tried renaming the function, link/unlinking; nothing works