Huawei startResolutionForResult needs an update

50 views Asked by At

I have a huawei app with IAP so there is a code snippet

        if (status.hasResolution()) {
            try {
                status.startResolutionForResult(activity,REQ_CODE_BUY)
            } catch (exp: SendIntentException) {
                Log.e(TAG,exp.message!!)
            }
        } else {
            Log.e(TAG, "intent is null")
        }

With

override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
    super.onActivityResult(requestCode, resultCode, data)
    if (requestCode == REQ_CODE_BUY) {

And since onActivityResult is deprecated i need to know how can i replace it

0

There are 0 answers