@JSMethod(uiThread = true) public void testText(String come, JSCallback callBack){ Context context = this.mWXSDKInstance.getContext(); Context context2 = this.mUniSDKInstance.getContext(); }
兩種方式都可以獲取到context,且內容一致,項目中我使用了this.mWXSDKInstance.getContext()來獲取。