I have some confusion about when to use various mechanisms in the capacitor plugin framework.
One the one hand, the standard capacitor plugin methods define 3 types of methods:
- Plugin method that returns no data
- Plugin method that returns a value
- Plugin method that returns values repeatedly
The addListener() mechanism and the type #3 plugin method both seem to be a way for the native plugin code to invoke a callback with some data.
Are these two mechanisms really redundant, or am I misunderstanding one or the other? When would you use one mechanism over the other?