qtsymbiancellular-network

How to get cellid in Symbian


I'm new to Symbian, currently I done the same with j2me with the following code for getting the cellid, like that. Is there any way to get the device id that will excute in Qt SDK?

if(out== null ||out.equals("null")|| out.equals(""))
                out = System.getProperty("com.nokia.mid.cellid");

Solution

  • You can use the QtMobility APIs to get the cell ID:

    #include <QSystemNetworkInfo>
    
    QtMobility::QSystemNetworkInfo netInfo;
    int cellId = netInfo.cellId();
    

    Remember to add Qt Mobility to your .pro file:

    CONFIG += mobility
    MOBILITY += systeminfo
    

    Hope this helps!

    Best regards