You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to be able to have a custom return type with a plugin method that has a callback. According to the documentation about plugin method types the return type is a string which represents the callback id, but i want to be able to change this type when i don't need the callback id. For my use case i want to call a method which runs a task and gives status updates about it via the callback, after some time the task is expected to finish with a result which i want to receive via the resolved promise.
I would expect when i set keep alive to true to return values via the callback and when i set it again to false the promise is resolved with my custom type.
Feature Request
Description
I want to be able to have a custom return type with a plugin method that has a callback. According to the documentation about plugin method types the return type is a
string
which represents the callback id, but i want to be able to change this type when i don't need the callback id. For my use case i want to call a method which runs a task and gives status updates about it via the callback, after some time the task is expected to finish with a result which i want to receive via the resolved promise.Platform(s)
Android
Preferred Solution
I would expect when i set keep alive to true to return values via the callback and when i set it again to false the promise is resolved with my custom type.
Alternatives
Introduce a new method type which could be called
RETURN_CALLBACK_WITH_PROMISE
to allow a custom return type in the promise.Additional Context
Web
On the web this is already possible:
Calling the example method with the following code:
Prints the expected behaviour into the console:
Android
The preferred solution currently passes the object in the last
call.resolve()
after setting keep alive to false to the callback.The text was updated successfully, but these errors were encountered: