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

Scoreloop

Reply
Contributor
eggshapedfred
Posts: 16
Registered: ‎01-08-2013
My Device: Developer

App launch stalled when creating/logging into Blackberry ID

Hello,

 

I am working on an app that supports Scoreloop, which requires the user to have a BlackBerry id set up on their device. As a result, when the app launches, if the user does not have a BlackBerry ID the app is interrupted by the OS and the user is prompted to create or sign in with their BlackBerry ID.

 

If they cancel this process, the app launches as usual. If, however, the user creates or signs in to a BlackBerry id, then when they return to my app, it has frozen and never resumes. The IDE reports no problems (i.e. the app does not appear to have crashed or hung due to some internal problem).

 

I am wondering if anyone else has encountered this problem and whether anyone knows of a solution?  The app does run correctly if you terminate and relaunch it, but obviously I'm trying to avoid the user having to do this. I'm wondering if it might be a problem with the OS pausing the game thread and not allowing it to resume but I don't really know of a way to verify this.  Any suggestions welcome!

Retired
whoang
Posts: 71
Registered: ‎11-08-2012
My Device: Blackberry 10 - Dev Alpha B | Blackberry Playbook | Blackberry Torch 9810

Re: App launch stalled when creating/logging into Blackberry ID

Hello @eggshapedfred,

Scoreloop's servers are able to return status values once a successful login has been achieved.

There are various ways to re-enter the thread, one solution is to embed the return value within a callback function so user may resume the game.

Regarding issues with OS on the problem indicated, I have tested the scenario and it does not seem to be OS-related.

Hope that helps -- and please update us on your progress!

Thanks,
William Hoang

Application Developer Advocate | Developer Relations
BlackBerry


Retired
whoang
Posts: 71
Registered: ‎11-08-2012
My Device: Blackberry 10 - Dev Alpha B | Blackberry Playbook | Blackberry Torch 9810

Re: App launch stalled when creating/logging into Blackberry ID

Hello @eggshapedfred,

 

Are you able to retrieve the user by accessing and displaying the content after the user creates/signs-in with BBID?

 
You may call:  SC_UserController_GetUser()

 

Thanks,

William Hoang

Application Developer Advocate | Developer Relations
BlackBerry


Contributor
eggshapedfred
Posts: 16
Registered: ‎01-08-2013
My Device: Developer

Re: App launch stalled when creating/logging into Blackberry ID

[ Edited ]

Hello, thanks for the response.

 

Can you clarify what you mean by 'ways to re-enter the thread'?  I have followed the example BB10 Scoreloop setup code and am calling SC_Client_New, which appears to be triggering the login process (this is the first step of the Scoreloop setup in my app and is called from my app's initialisation function).  However I can't see a way of specifying a callback with SC_Client_New?  Or is there a BPS event that I can listen for to be able to re-enter the app thread?

 

Regarding your other question,  I'm not using SC_UserController_GetUser() and we don't use a UserController, but I am using SC_Session_GetUser (although not within the initialisation method), and this works fine.  Should I be using a UserController?

 

Edit: One other thing, can you suggest of any quicker way to test the problem than having to wipe the device back to factory settings every single time?

Developer
BGmot
Posts: 1,068
Registered: ‎11-24-2011
My Device: PlayBook

Re: App launch stalled when creating/logging into Blackberry ID

1) Which sample exactly are you following? can you post a link please?

2) What do you mean by BBID? you can't have BB10 functioning without BBID as your device's PIN has to be initiated with valid BBID (you do it when you first turn on device).