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

Native Development

Reply
Developer
Posts: 296
Registered: ‎02-14-2012
My Device: Nokia N950 / BB Playbook
My Carrier: -

Invokation - Previewer Card and sendCardDone()

 

Hi!

 

I've created a application which can get invoked as a previewer card. (menu bar at the button and the user can get back to the previous app using peeking or by using the button in the lower left corner)

https://developer.blackberry.com/native/documentation/cascades/device_platform/invocation/card_style...

 

It works so far so good, but I need ot set a CardDoneMessage which only works if I close the card programmically: https://developer.blackberry.com/native/documentation/cascades/device_platform/invocation/creating_c...

 

So, the big question is now, how do I know when and if the user is closing my card to sent here the CardDoneMessage. The "pooled" signal of the InvokationManager is just after this moment and the CardDoneMessage over there is already write protected. So I would need a Signal just before.

 

Setting my own backButton via the paneProperties at my Page also doesn't work. It breaks the whole invokation and the user gets unable to go back.

 

Any ideas?

BlackBerry Development Advisor
Posts: 249
Registered: ‎07-14-2008
My Device: Not Specified

Re: Invokation - Previewer Card and sendCardDone()

Hi you can only send a carddonemessage if you are closing the card when you work has finished normally so that you can send meaningful result data back to the parent. If the user is terminating the card forcefully, it is assumed that your card has not finished and do not have data to return to the parent. The only way you can send CardDoneMessage is via sendCardDone().
Developer
Posts: 296
Registered: ‎02-14-2012
My Device: Nokia N950 / BB Playbook
My Carrier: -

Re: Invokation - Previewer Card and sendCardDone()

Yes, and I would like to let the user chose when the work is finished by going back to the previous app.

But I have no idea how to detect this since there is no Signal for this event. Only after the CardDoneMessage is already set.