문제

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