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

Posts: 1
Registered: ‎10-28-2012
My Device: Blackberry 10 Dev Alpha Simulator
My Carrier: WiFi

How do i use SimCardInfo in Cascades API with simulator?

I'm trying to use the SimCardInfo to get mcc & mnc of the sim card and here's what I have tried:


1. Added to main.cpp

#include <bb/device/SimCardInfo>
use namespace bb::device;



2. Added to *.pro file

LIBS += -lbbdevice


3. Add permission read_cellular_data in bar-descriptor.xml

    <!-- Request permission to execute native code.  Required for native applications. -->
    <permission system="true">run_native</permission>
    <env var="LD_LIBRARY_PATH" value="app/native/lib:/usr/lib/qt4/lib"/>

 4. A line of code to get MCC in the main method

QString mcc = SimCardInfo().mobileCountryCode();


Results: Application compiled and running. Value of mcc is "".


So am I missing something in the code or project setting?

Or is it the SIM card in the simulator always blank? If so how can i configure the simulator to give me a mock environment?



Posts: 52
Registered: ‎03-29-2012
My Device: Playbook, Dev Alpha
My Carrier: Telus

Re: How do i use SimCardInfo in Cascades API with simulator?

Any news on this?