我PhoneGap
为 android 创建了一个插件,它发送一个email
.
public PluginResult execute(String action, JSONArray args, String callbackId) {
try {
// i want to call a function from other class so i did the
// below, but it is throwing the above said error...
WebActivity wb = new WebActivity();
wb.createExternalStoragePrivateFile(img);
//sending email code here
}
}
在上面的代码中,当访问另一个类的函数时,我得到了错误:
无法创建未调用错误的
handler
内部线程。Looper.prepare()
调用函数的正确方法是什么?