10-29-2012 12:05 AM
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> <permission>read_cellular_data</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?