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

Payment Service


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
Regular Contributor
Posts: 51
Registered: ‎06-29-2011
My Device: Z10 Limited Edition
My Carrier: Ukraine GSM
Accepted Solution

Payment window grayed out

[ Edited ]

Hello,

 

I have a problem with payment service in my OpenGL Qt game. When payment dialog appears, it is grayed out, and you can not select anything. Have a look on the screenshots:

IMG_00000001.png

 

IMG_00000002.png

 

The code I am using for purchase creation

 

    QPlatformNativeInterface * const nativeInterface = QApplication::platformNativeInterface();
    const QString windowGroupId = static_cast<const char *>(nativeInterface->nativeResourceForWidget("windowGroup", parent));
    m_manager.setWindowGroupId(windowGroupId);
    m_manager.setApplicationName("App Name");

 

Here is a very tricky part: I want to check for existing purchase (for example if the user reinstalled my app). I do so automatically after 5 seconds from time when application started. If I trigger the purchase before 5 seconds, the window is not grayed out. If I wait until this automatic check passes, and then initiate a new purchase, the window gets grayed out. 

 

EDIT: It doesn't depend on automatic check, it is random. If I disable this automatic check, the window is still grayed out. But sometimes I get lucky and it is active. Btw, I am testing on Dev Alpha C and Z10, both devices have the problem.

 

Is it a bug?

Retired
Posts: 2,559
Registered: ‎10-16-2009
My Device: BlackBerry Z10
My Carrier: Bell

Re: Payment window grayed out

It may be an issue with the window group being used. Does your app ever draw on top of this group? What are the differences to what is displayed/drawn to screen when this does or does not work?

Garett
@garettBeuk
--
Goodbye everybody!
Regular Contributor
Posts: 51
Registered: ‎06-29-2011
My Device: Z10 Limited Edition
My Carrier: Ukraine GSM

Re: Payment window grayed out

I noticed that I always have no issue, if I use payment in test mode. When I upload my app to App World and test with sandboxed account, I have this issue almost all the time.

Highlighted
Retired
Posts: 2,559
Registered: ‎10-16-2009
My Device: BlackBerry Z10
My Carrier: Bell

Re: Payment window grayed out


beemaster wrote:

I noticed that I always have no issue, if I use payment in test mode. When I upload my app to App World and test with sandboxed account, I have this issue almost all the time.


The modes are a bit different with how the dialogs are drawn. Do you use more than one window group?

Garett
@garettBeuk
--
Goodbye everybody!
Regular Contributor
Posts: 51
Registered: ‎06-29-2011
My Device: Z10 Limited Edition
My Carrier: Ukraine GSM

Re: Payment window grayed out

I use QApplication with single QGLWidget

Retired
Posts: 2,559
Registered: ‎10-16-2009
My Device: BlackBerry Z10
My Carrier: Bell

Re: Payment window grayed out

Could you try using the payment calls without the QGLWidget present? This would at least narrow down the potential scope of the issue.

Garett
@garettBeuk
--
Goodbye everybody!
Regular Contributor
Posts: 51
Registered: ‎06-29-2011
My Device: Z10 Limited Edition
My Carrier: Ukraine GSM

Re: Payment window grayed out

I don't understand how it is possible. My whole application is a single QGLWidget. If I remove it, nothing is left. No window at all. Maybe your suggestion was to replace my QGLWidget with something else? I will try with empty QGLWidget as well as with QWidget and see what I get.

Retired
Posts: 2,559
Registered: ‎10-16-2009
My Device: BlackBerry Z10
My Carrier: Bell

Re: Payment window grayed out


beemaster wrote:

I don't understand how it is possible. My whole application is a single QGLWidget. If I remove it, nothing is left. No window at all. Maybe your suggestion was to replace my QGLWidget with something else? I will try with empty QGLWidget as well as with QWidget and see what I get.


Sorry, my lack of native Qt knowledge is causing confusion. Yep, basically let's remove another layer of GL and see if it starts working again. I know other apps have had no issues implementing payment services in Qt apps but I have not heard of a QGLWidget being used yet...

Garett
@garettBeuk
--
Goodbye everybody!
Regular Contributor
Posts: 51
Registered: ‎06-29-2011
My Device: Z10 Limited Edition
My Carrier: Ukraine GSM

Re: Payment window grayed out

Just checked with empty QWidget and QGLWidget in test mode, it works fine. But to test in real mode, I have to upload to App World. And it doesn't appear immediately for sandboxed account, you have to wait like half a day...
Regular Contributor
Posts: 51
Registered: ‎06-29-2011
My Device: Z10 Limited Edition
My Carrier: Ukraine GSM

Re: Payment window grayed out

[ Edited ]

I tested more with QGLWidget and there are other issues, like app hangs and unable to run/delete until you restart the phone. I created a test project and filed a bug in developer tracker https://www.blackberry.com/jira/browse/BBTEN-1227