onIabPurchaseFinished never called.

前端 未结 5 2137
野性不改
野性不改 2020-11-29 17:55

I\'ve been trying to set up in-app billing for my first app, and have been using the android.test.purchased sku. The purchase come through, and I manage to get the SKU into

5条回答
  •  庸人自扰
    2020-11-29 18:46

    I had the same issue and the onActivityResult was not called either.
    Inspired from @Ghulam's answer I realized that the activity onActivityResult doesn't call the fragment's onActivityResult automatically so I had to do it manually.

    @Override
        protected void onActivityResult(int requestCode, int resultCode, Intent data) {
            super.onActivityResult(requestCode, resultCode, data);
            if(mCurrentFragment!= null){
                mCurrentFragment.onActivityResult(requestCode, resultCode, data);
            }
        }
    

提交回复
热议问题