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()
関数を呼び出すための正しいアプローチは何ですか?