Keep callback context in PhoneGap plugin?

后端 未结 3 878
深忆病人
深忆病人 2021-01-13 10:05

I need to implement some functionality that triggers an action on an interval and emits the results back to javascript.

To simplify things I will use the echo examp

3条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-13 10:46

    Just if it helps somebody, in Android I am not using PluginResult and I am still able to keep a reference to the CallbackContext and call it anytime. I am not sure if this is the right way, but I can confirm that it worked for me.

提交回复
热议问题