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

Reply
Regular Contributor
beemaster
Posts: 51
Registered: ‎06-29-2011
My Device: Z10 Limited Edition
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
gbeukeboom
Posts: 2,559
Registered: ‎10-16-2009
My Device: BlackBerry Z10

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
beemaster
Posts: 51
Registered: ‎06-29-2011
My Device: Z10 Limited Edition

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.

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

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
beemaster
Posts: 51
Registered: ‎06-29-2011
My Device: Z10 Limited Edition

Re: Payment window grayed out

I use QApplication with single QGLWidget

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

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
beemaster
Posts: 51
Registered: ‎06-29-2011
My Device: Z10 Limited Edition

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
gbeukeboom
Posts: 2,559
Registered: ‎10-16-2009
My Device: BlackBerry Z10

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
beemaster
Posts: 51
Registered: ‎06-29-2011
My Device: Z10 Limited Edition

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
beemaster
Posts: 51
Registered: ‎06-29-2011
My Device: Z10 Limited Edition

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