Android 尝试在没有解码器的情况下使虚拟上下文成为当前上下文

Android 尝试在没有解码器的情况下使虚拟上下文成为当前上下文,android,paytm,Android,Paytm,我正在尝试将Paytm API集成到我的应用程序中。Paytm在生成校验和后尝试访问webview,但我收到此错误 Trying to make virtual context current without decoder 主要原因是什么 这是我的api调用,paytm从中生成校验和,我得到校验和并启动paytm服务。但是在打开这个webview时,我发现了一个错误 public void paymentVerification(String authToken, String farmer

我正在尝试将Paytm API集成到我的应用程序中。Paytm在生成校验和后尝试访问webview,但我收到此错误

Trying to make virtual context current without decoder
主要原因是什么

这是我的api调用,paytm从中生成校验和,我得到校验和并启动paytm服务。但是在打开这个webview时,我发现了一个错误

public void paymentVerification(String authToken, String farmerId, Context context) {
        EndPoints.getPaymentDetails( authToken, farmerId, new Callback<BasicResponse>() {
            @Override
            public void onResponse(@NonNull Call<BasicResponse> call, @NotNull Response<BasicResponse> response) {
                if (response.isSuccessful()) {
                    BasicResponse basicResponse = response.body();
                    assert basicResponse != null;
                    ErrorCode errorCode = basicResponse.getErrorCode();
                    if (!NetworkErrorHandlingUtils.ErrorCheck( errorCode )) {
                        //  update farmerMutableLiveData Details...
                        PaymentLogResponse paymentLogResponse = GsonUtils.fromGson( basicResponse.getResponse(), PaymentLogResponse.class );

                        //  for production environment...
                        PaytmPGService Service = PaytmPGService.getStagingService();
                        HashMap<String, String> paramMap = new HashMap<>();
                        paramMap.put( "MID", paymentLogResponse.getMerchantId() );
                        // Key in your staging and production MID available in your dashboard
                        paramMap.put( "ORDER_ID", paymentLogResponse.getOrderId() );
                        paramMap.put( "CUST_ID", paymentLogResponse.getCustomerId() );
                        paramMap.put( "CHANNEL_ID", paymentLogResponse.getChannelId().name() );
                        paramMap.put( "TXN_AMOUNT", paymentLogResponse.getAmountPaid() );
                        paramMap.put( "WEBSITE", paymentLogResponse.getWebsite().name() );
                        // This is the staging value. Production value is available in your dashboard
                        paramMap.put( "INDUSTRY_TYPE_ID", paymentLogResponse.getIndustry_type().name() );
                        // This is the staging value. Production value is available in your dashboard
                        paramMap.put( "CALLBACK_URL", "https://securegw-stage.paytm.in/theia/paytmCallback?ORDER_ID=" + paymentLogResponse.getOrderId() );
                        paramMap.put( "CHECKSUMHASH", paymentLogResponse.getChecksumHash() );
                        PaytmOrder Order = new PaytmOrder( paramMap );
                        Service.initialize( Order, null );
                        Service.startPaymentTransaction( context, true, true, new PaytmPaymentTransactionCallback() {
                            /*Call Backs*/
                            public void someUIErrorOccurred(String inErrorMessage) {
                            }

                            public void onTransactionResponse(Bundle inResponse) {
                            }

                            public void networkNotAvailable() {
                            }

                            public void clientAuthenticationFailed(String inErrorMessage) {
                            }

                            public void onErrorLoadingWebPage(int iniErrorCode, String inErrorMessage, String inFailingUrl) {
                            }

                            public void onBackPressedCancelTransaction() {
                            }

                            public void onTransactionCancel(String inErrorMessage, Bundle inResponse) {
                            }
                        } );
                    } else {
                        //  show error dialog here..., the error could be from one of the Error Code...

                    }
                }
            }

            @Override
            public void onFailure(@NonNull Call<BasicResponse> call, @NotNull Throwable t) {
                //  show UI for API Failure...
                if (t instanceof NoConnectivityException) {
                    //  This is where it throws No Internet connectivity error...
                    //  show some UI here, sefu...
                    IntentUtils.PassIntent( context, NetworkErrorActivity.class );
                }
                //  there's some other error, not network connectivity issue...
                else {

                }
            }
        } );
    }
public void paymentVerification(字符串authToken、字符串farmerId、上下文){
getPaymentDetails(authToken、farmerId、new Callback()){
@凌驾
public void onResponse(@NonNull调用,@NotNull响应){
if(response.issusccessful()){
BasicResponse BasicResponse=response.body();
assert basicResponse!=null;
ErrorCode ErrorCode=basicResponse.getErrorCode();
如果(!NetworkErrorHandlingUtils.ErrorCheck(errorCode)){
//更新farmerMutableLiveData详细信息。。。
PaymentLogResponse PaymentLogResponse=GsonUtils.fromGson(basicResponse.getResponse(),PaymentLogResponse.class);
//对于生产环境。。。
PaytmPGService=PaytmPGService.GetStaginService();
HashMap paramMap=新HashMap();
paramMap.put(“MID”,paymentLogResponse.getMerchantId());
//在仪表板中输入可用的登台和生产MID
put(“ORDER_ID”,paymentLogResponse.getOrderId());
put(“CUST_ID”,paymentLogResponse.getCustomerId());
put(“CHANNEL_ID”,paymentLogResponse.getChannelId().name());
paramMap.put(“TXN_AMOUNT”,paymentLogResponse.getAmountPaid());
paramMap.put(“网站”,paymentLogResponse.getWebsite().name());
//这是暂存值。生产值在仪表板中可用
put(“行业类型ID”,paymentLogResponse.getIndustry类型().name());
//这是暂存值。生产值在仪表板中可用
放置(“回调URL”https://securegw-stage.paytm.in/theia/paytmCallback?ORDER_ID=“+paymentLogResponse.getOrderId());
put(“CHECKSUMHASH”,paymentLogResponse.getChecksumHash());
PaytmOrder=新的PaytmOrder(paramMap);
服务初始化(订单,空);
Service.startPaymentTransaction(上下文,true,true,new PaytmPaymentTransactionCallback()){
/*回电*/
出现公共void someuierror(字符串inErrorMessage){
}
公共无效onTransactionResponse(响应中的Bundle){
}
public void networkNotAvailable(){
}
public void clientAuthenticationFailed(字符串inErrorMessage){
}
public void OneErrorLoadingWebpage(int-InErrorCode、String-inErrorMessage、String-InAlingUrl){
}
BackpressedCancelTransaction()上的公共无效{
}
public void onTransactionCancel(错误消息中的字符串,响应中的捆绑){
}
} );
}否则{
//此处显示错误对话框…,错误可能来自某个错误代码。。。
}
}
}
@凌驾
public void onFailure(@NonNull Call Call,@NotNull Throwable t){
//显示API失败的UI。。。
if(无连接异常的t实例){
//这就是它不会抛出Internet连接错误的地方。。。
//在这里显示一些UI,sefu。。。
IntentUtils.PassIntent(上下文,NetworkErrorActivity.class);
}
//还有其他错误,不是网络连接问题。。。
否则{
}
}
} );
}