Skip to content

Instantly share code, notes, and snippets.

@kjunichi
Last active September 26, 2016 08:47
Show Gist options
  • Save kjunichi/861f905d93c5c84113399a5769184584 to your computer and use it in GitHub Desktop.
Save kjunichi/861f905d93c5c84113399a5769184584 to your computer and use it in GitHub Desktop.
2016/9/26

Cordova Plugin

plugin

hogeはJavaだとどうやって取得できるのか インスタンス化されているのほぼ間違いない

cordova.exec のJava側の対応の実装が分かれば、いけそう

CordovaPlugin

CordovaInterface this.cordova

/** * Called when a message is sent to plugin. * * @param id The message id * @param data The message data * @return Object or null */ public Object onMessage(String id, Object data);

CordovaWebView this.webView

mrubyからみたAPI

proc = plugin.execute("methodname",args,block)

CordovaInterface

cordova.getActivity()

appView.getPluginManager()

appView = makeWebView(); createViews();

WebViewとViewの関係は?

android.webkit.WebChromeClient.CustomViewCallback

PluginManager

CordovaWebView app;

CordovaPlugin plugin = getPlugin(service);

関連

アクセス解析タグ

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment