0

I'am new to blackberry cascades and was trying my hands on call functionality. However after running my sample program, the following error is occuring:

import bb.cascades 1.4
import bb.system.phone 1.0

Page {
Container {
    layout: StackLayout {
    }

    Button {
        id: callButton
        text: "Call me"
        verticalAlignment: VerticalAlignment.Center
        horizontalAlignment: HorizontalAlignment.Center

        onClicked: {
            phone.requestDialpad("(519) 555-0100")

        }
    }
}
attachedObjects: [
    Phone {
        id: phone
    }
  ]
}

and in my .pro file

LIBS += -lbbsystem

the error I'am facing is: module "bb.system.phone" is not installed

My program is loading but a black screen is displayed. Any help will be appreciated. Thanks in advance.

Qwerty
  • 67
  • 1
  • 1
  • 6
  • Solution: http://supportforums.blackberry.com/t5/Native-Development/Error-module-quot-bb-system-phone-quot-is-not-installed/td-p/3078209 – Bojan Kogoj Mar 31 '15 at 13:39

1 Answers1

0

Since the Phone class is a C++ class, the first thing we must do is to register the Phone class as qmlRegisterType for QML access. See this for help

Add this line to main.cpp

qmlRegisterType("bb.system.phone", 1, 0, "Phone");

For more help

Ankur
  • 1,385
  • 11
  • 21