Blackberry Cascades recurrencerule does not register

19 Views Asked by At

I am trying on BB10 OS to register a recurrence rule with InvokeRecurrenceRuleFrequency=Weekly. But the InvokeManager->registerTimer call always ends with Error=2

(InvokeManager->registerTimer call for InvokeRecurrenceRuleFrequency=Daily/Hourly/Monthly works fine without errors)

i am validating the recurrence rule by calling isValid function.

I havent specified further details like daysOfWeek, hoursOfDay, etc.

    QDate trigdate;
    QTime trigtime;

    m_invokeManager = new InvokeManager(this);
    m_invokeReply = new InvokeReply(this);

    InvokeDateTime startDateTime(trigdate.currentDate(), trigtime.currentTime().addSecs(40), "");
    InvokeRecurrenceRule recurrenceRule(bb::system::InvokeRecurrenceRuleFrequency::Weekly,
          startDateTime);    

if(recurrenceRule.isValid())
  {
      // Create the timer request
      InvokeTimerRequest timer_request("somelabel",
              recurrenceRule,
                                  "com.uname.apptarget");
      qDebug()<<"register recurrence rule";
      m_invokeReply =
            m_invokeManager->registerTimer(timer_request);

      if(m_invokeReply != NULL)
      {
          connect(m_invokeReply, SIGNAL(finished()), this, SLOT(onRegisterReply()));
      }
  }
  else
  {
      qDebug()<<"Error recurrence rule";
  }

Is there something i am missing?

Thanks in advance

-AR

0

There are 0 best solutions below