Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development


Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.


Reply
Contributor
Posts: 45
Registered: ‎09-06-2011
My Device: 9800
My Carrier: Vodafone

Handle purchase cancel

Hi,

 

I get a NullPointerExeption if I cancel a purchase request on my app. 

What I do is hit the back button when the purchasing... pop-up is on screen. This gets me to the place  where I am asked my BlackberryID. If I cancel this again I am returned to my app and I catch a NPE from: 

PurchaseResult purchase = engine.purchase(arguments.build());

 

Is there any doc on how I am supposed to handle this situation?

 

Thanks.

 

Cheers, Alex

Contributor
Posts: 45
Registered: ‎09-06-2011
My Device: 9800
My Carrier: Vodafone

Re: Handle purchase cancel

Hi,

 

Here are some more details about what happens:

If is cancel while the "Purchasing" popup is on (the one with the green spinner on Torch 9860) nothing visible happens and I am taken to a screen where a description should be. There is no text in this screen. App and products are  in draft state. After this screen I am taken to a screen where I am asked for BlackberryID. If I cancel here I get the NPE.

 

If I let it go its way to the BlackberryID confirmation screen and cancel there, I get the user cancelled exception, and things are fine.

 

Note that after the NPE scenario, retrying a engine.getPrice will lead to a PaymentEception with the unknown_reason code.

Restart of the app does NOT fix this.

Restart of the device does.

 

Any suggestions on how to at least work around this?

 

Thank you.

 

Highlighted
Contributor
Posts: 45
Registered: ‎09-06-2011
My Device: 9800
My Carrier: Vodafone

Re: Handle purchase cancel

anyone, please?

Contributor
Posts: 45
Registered: ‎09-06-2011
My Device: 9800
My Carrier: Vodafone

Re: Handle purchase cancel

problem still persist if i use paymentapi 1.8

 

anyone has a hint?