Android Question App Subscription

Cleidson

Member
Hello everyone,

I've been working for the past few days configuring an application so that users can purchase subscriptions for its use. The attached example shows what I've been able to program so far. It works in debug mode. However, in release mode, it returns the error "billing_PurchasesUpdated was not found". I've tried numerous ways to work around this error, but without success.
Therefore, I'm asking for your help.
Thank you in advance for your attention.
 

Attachments

  • Signature Test.zip
    18.2 KB · Views: 6

DonManfred

Expert
Licensed User
Longtime User
Therefore, I'm asking for your help.
You forgot to add the billing_PurchasesUpdated event?

Add

B4X:
Private Sub billing_PurchasesUpdated (Result As BillingResult, Purchases As List)
    
End Sub
 
Last edited:
Upvote 0

Cleidson

Member
Don Manfred,

No. The event is declared in the code. I researched some possible situations regarding the issue. Some suggestions referred to the code obfuscating and the return not finding the function due to the obfuscation.

Other suggestions referred to the activity.

There was one suggestion to inform the compiler not to obfuscate the event.

I tried many measures to solve it, but, as I said: it works very well in debugging, but in Release it gives the error.
 
Upvote 0

zed

Well-Known Member
Licensed User
The problem likely stems from obfuscation.
The event is renamed. As a result, the library can no longer find it, causing an error only in Release.
Uncommenting `#RaisesSynchronousEvents` and making the method public should resolve the issue.
 
Upvote 0

Cleidson

Member
Zed,
This is a situation I don't understand why it didn't resolve. I left `#RaisesSynchronousEvents` commented out on purpose when I put together the example. But I've already used it in tests with it active. The same error occurred.

I studied activity destruction, moved the code to activities that wouldn't be destroyed during the app's active lifecycle. In short, as I said, I've been researching the reason for this error for a few days.
 
Upvote 0
Top