プラグイン内でアプリケーションコンテキストを取得しようとしていますが、次のエラーがスローされます。
Looper.prepare()を呼び出していないスレッド内にハンドラーを作成できません
これが私のコードです:
ResourceManager manager = ResourceManager.getInstance(this, this.ctx.getApplicationContext());
コードを次のように変更しました:
ResourceManager manager = ResourceManager.getInstance(this, this.cordova.getContext());
と
ResourceManager manager = ResourceManager.getInstance(this, this.cordova.getActivity());
また試した:
ResourceManager manager = ResourceManager.getInstance(this, cordova.getActivity().getApplicationContext());
しかし、それでも同じエラーメッセージがスローされます