0

我从两天开始就面临问题,我得到响应 RESULT_OK 但我怎样才能将它检查到活动中。在此之后我必须去下载窗口功能,它没有显示对话框。请帮助我提前谢谢...:(

ResponseHandler rep = new ResponseHandler();      
String ecase=rep.responsecheck;   
rep.register(mDungeonsPurchaseObserver);
   System.out.println(ecase);
   if(ecase!=null){
   if(ecase.matches("RESULT_OK")){/        
   Toast.makeText(this,ecase, Toast.LENGTH_LONG).show();
   }
   else{
       Toast.makeText(this,ecase, Toast.LENGTH_LONG).show();
   }
   }else{
   Toast.makeText(this,ecase, Toast.LENGTH_LONG).show();
   }`

但这项工作是在 oncreate 并获得空值。

4

1 回答 1

0

尝试这个

     public void onActivityResult(int requestCode, int resultCode, Intent data) {

    switch (requestCode) 
       {
    case REQUEST_CONNECT_DEVICE:
        //Body what ever u want to do....
       }}
于 2013-04-30T07:30:20.223 回答