Calling startIntentSenderForResult from Fragment (Android Billing v3)

前端 未结 11 1154
广开言路
广开言路 2020-11-29 02:46

The new Android Billing v3 documentation and helper code uses startIntentSenderForResult() when launching a purchase flow. I want to start a purchase flow (and

11条回答
  •  温柔的废话
    2020-11-29 03:22

    if (requestCode == RC_REQUEST) 
    {
        Intent intent = new Intent(ContainerAvtivity.this,ContainerAvtivity.class);
        startActivity(intent);
        finish();
    }
    

    RC_REQUEST is same as you used to launch purchase flow

    Add this in the onActivityResult of your Activity.The inventory listener will produce the desired result for you.(I know its a temp fix but worked for me)).

提交回复
热议问题