Android Question in-app purchase subscription error

tufanv

Expert
Licensed User
Longtime User
Hello,

I am using in app subscriptions. It is working fine but the problem is in puchasecompleted method, i call manager.getownedproducts in puchase completed. With in app there is no problem but with subscriptions i get an error ( by the way if i close and re open the app there is no problem but just after the purchase i cant get owned products and activate account ) i get this error:

B4X:
** Activity (main) Pause, UserClosed = false **
sending message to waiting queue (OnActivityResult)
running waiting messages (1)
Arrived: 1, 1
Ending async operation: launchPurchaseFlow
Successful resultcode from purchase activity.
Purchase data: null
Data signature: null
Extras: Bundle[{RESPONSE_CODE=0}]
Expected item type: inapp
BUG: either purchaseData or dataSignature is null.
Extras: Bundle[{RESPONSE_CODE=0}]
IAB returned null purchaseData or dataSignature (response: -1008:Unknown error)
** Activity (main) Resume **

I checked stackoverflow found a topic http://stackoverflow.com/questions/...ns-error-code-1008-null-puchasedata-or-datasi

according tho them the problem is :
"If you call mHelper.launchPurchaseFlow(...) with an SKU that is registered as a subscription on Google Developer Console it will result in the error: IAB returned null purchaseData or dataSignature (response -1008:Unknown error).

If you have a SKU that is registered as an subscription you have to use the method:mHelper.launchSubscriptionPurchaseFlow(...) instead."


How can i fix this bacause it is impossibe to activate a feature upon purchase. Alotugh the charge is made to customers credit card , event not firing until relaunch?

TY
 
Last edited:

tufanv

Expert
Licensed User
Longtime User
launchPurchaseFlow is not related to GetOwnedProducts. It is called by RequestPayment, and based on the documentation it does support subscriptions.
If I send you the project by mail and add you to testers can you check it ? or what do you suggest for this i cant fix it :/

btw i use
B4X:
manager.RequestPayment("hepsi","inapp","ct.iddaa")

does second entry of "inapp" make any difference if i change it to stg else maybe or is it not important ?
 
Upvote 0
Top