05-26-2012 12:08 PM
I am building an application with WebWorks.
Documentation says onsharecontent is "Invoked when shared content arrives at the recipient." However it is not the case, when the application is running, nothing is received not even if you close the app and run it again. On ther other hand, if the app was initialy not running and the content was sent, then the icon shows the red star (icon splat) and the content is recieved.
blackberry.bbm.platform.users.onsharecontent is being called on intialization.
Should I set a timer to keep calling this function repeatedly? I thought it would automatically be invoked when content is shared.
Any help is greatly appreciated.
05-29-2012 08:22 AM
I just implemented that this morning, and it works really well, so easier than Java's implementation of BBM!
- If my application is running, the onsharecontent is fired
- If it is not running, the icon automatically get a red star and when BBM is initialized, it fires the onsharecontent.
Sometimes it takes a long time to receive the bbm message (1-2 min)
Juste make sure you have the latest Webworks SDK.
Can you tell on which device / Os version you test?
05-29-2012 08:25 AM
I've tested on a Bold 9900, Torch 9860 and Curve 9300.
I didn't wait a long time, I will try testing again and waiting. it's just that when the app was closed, the app quickly got the star icon so I figured it should take the same time when the app was running.
Where are you calling the onsharecontent function?
05-29-2012 08:45 AM
I initialize my onsharecontent within a setTimeout that I call after my first screen has been pushed with BBUI.js
I'll test on 9300 and 9860 to see what happens. I did the work on a 9790 and a 9320