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


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
Developer
Posts: 27
Registered: ‎03-27-2011
My Device: Z10,Q10,Z30
My Carrier: Verizon and ATT
Accepted Solution

Invoking Calendar on work perimeter

I am using the following code, to invoke calendar from an app in Work Container, but calling the following is invoking the home calendar, not the work perimeter calendar. When I used similar code for invoking email client, it invoked email client in work perimeter. Can someone check the code and see what I am doing wrong?

 

    QVariantList participants = QVariantList();
    participants.append("a@abc.com");
    QVariantMap data = QVariantMap();
    data.insert(QString("participants"),QVariant(participants));

     InvokeRequest request;
     request.setTarget(tr("sys.pim.calendar.viewer.eventcreate"));
     request.setAction(tr("bb.action.CREATE"));
     request.setMimeType(tr("text/calendar"));
    QByteArray encData = bb:Smiley TonguepsObject::encode(data);
    request.setData(encData);
     bb::system::InvokeManager* m_invokeManager = new InvokeManager(this);
     m_invokeManager->invoke(request);

Highlighted
Retired
Posts: 249
Registered: ‎07-14-2008
My Device: Not Specified

Re: Invoking Calendar on work perimeter

We will look in to this issue. But for now, you can at least specify the accountID of the calendar account you want to use to create the event. That should invoke the event create card with the specified account preselected.

 

Shadid

Developer
Posts: 27
Registered: ‎03-27-2011
My Device: Z10,Q10,Z30
My Carrier: Verizon and ATT

Re: Invoking Calendar on work perimeter

Thank you very much for the response. I forgot to add an update to this. As you mentioned, I was able to call defaultcalendar and its supposed to return the calendar in the parameter and I used the accountid and folder id. i tried in 2 phones, in one phone it invoked the work perimeter and the other one still called the hybrid/home calendar. I will know only when I am able to test in mutliple devices..

 

Developer
Posts: 27
Registered: ‎03-27-2011
My Device: Z10,Q10,Z30
My Carrier: Verizon and ATT

Re: Invoking Calendar on work perimeter

I was able to make it work by setting the accountId and folderId for the default calendar in work container(expecting there will be only one calendar in work container.