質問

I am writing custom plugins for Phone Gap android app. Using cordova's PluginResult or CallbackContext, we can send string, byte array, JSON object or array to JavaScript success callback.

Is there any way we can pass some custom object like Person Or Employee or some complex object from Native(Java in my case) code to JS callback using cordova's PluginResult or CallbackContext? or any other way to achieve this?

Any inputs or example code snippets are most welcome.

役に立ちましたか?

解決

You can pass only strings and objects, that can be serialized in strings, between native code and javascript parts.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top