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

Web and WebWorks Development

Reply
New Contributor
initialize
Posts: 8
Registered: ‎03-07-2013
My Device: BB10
My Carrier: Bell

blackberry.pim.calendar not working for me

Hi, I just started writing a app for BB10, and playing around with the calendarEvent object.

 

function createEvents(location, summary, startTime, endTime, frequency, dayInWeek, expires) {

var testing = blackberry.pim.calendar;
document.write("<p>My First app</p>");

var evt,
calendar = blackberry.pim.calendar,
CalendarRepeatRule = calendar.CalendarRepeatRule;
var start = new Date(startTime);
var end = new Date(endTime);
var location = location;
var summary = summary;

.

.

.

}

I am running this in ripple, but it wont even print out "My First app" when I run this function.
In my config.xml I have
<feature id="blackberry.pim.calendar" />

 

 

Any help would be appreciated!

Please use plain text.
BlackBerry Development Advisor (Retired)
astanley
Posts: 1,382
Registered: ‎07-02-2009
My Device: BlackBerry Bold 9900
My Carrier: Bell

Re: blackberry.pim.calendar not working for me

The blackberry.pim.calendar API is not supported by Ripple:

https://developer.blackberry.com/html5/apis/blackberry.pim.calendar.html

 

I suspect a runtime error is occuring when you set the testing variable inside of createEvents. Open Web inspector to confirm.

 

Recommend doing feature detection to ensure the object you are about to use is available.

 

function createEvents(location, summary, startTime, endTime, frequency, dayInWeek, expires) {

   if (window.blackberry && blackberry.pim) {
      var testing = blackberry.pim.calendar;
      document.write("<p>My First app</p>");

      var evt,
         calendar = blackberry.pim.calendar,
         CalendarRepeatRule = calendar.CalendarRepeatRule;
      var start = new Date(startTime);
      var end = new Date(endTime);
      var location = location;
      var summary = summary;
   } else {
      alert("blackberry.pim is not supported");
   }
.
.
.
}

 

 

Follow me on Twitter: @n_adam_stanley
-------------------------------------------------------------------------------------------------------------------------
Your app doesn't work? Use BlackBerry remote web inspector to find out why.
Please use plain text.
New Contributor
initialize
Posts: 8
Registered: ‎03-07-2013
My Device: BB10
My Carrier: Bell

Re: blackberry.pim.calendar not working for me

yea it's not supported, can you suggest a way for me to test my functions to muliplate the calendar? I tried to package it and test it on the BB10 simulator, but I keep getting a error from packaging " Build request failed with message: CreateProcessW: The system cannot find the file specified."

Window 8
SDK path: C:\Program Files\Research In Motion\BlackBerry 10 WebWorks SDK 1.0.4.11

I changed the ripple to bb z10 already

Please use plain text.
New Contributor
stock42
Posts: 3
Registered: ‎03-18-2009
My Device: Not Specified

Re: blackberry.pim.calendar not working for me

I'm using blackberry.pim.calendar in a simple calendar app on my BBZ10 and also finding blackberry.pim.calendar does NOT work for me

 

I used a simple code snippit to test if the device supports blackberry.pim

 

       if (window.blackberry && blackberry.pim) {
            alert("blackberry.pim is supported");
       } else {
            alert("blackberry.pim is NOT supported");
       }   

 

and this is the result:

  blackberry.pim is NOT supported

 

I also included in my config.xml the following:

<feature id="blackberry.pim.calendar" />

 

and also:

    <rim:smileytongue:ermit>access_pimdomain_contacts</rim:smileytongue:ermit>
    <rim:smileytongue:ermit>access_pimdomain_calendars</rim:smileytongue:ermit>

 

Why is it still failing?

Any ideas?

 

Thanks in advance

 

 

 

 

 

 

Please use plain text.