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

New Developer
Posts: 13
Registered: ‎02-17-2010
My Device: Z10
Accepted Solution

CellularBand Switch Types Error

I am trying to "switch" the CellularBand:




	switch (CellularBand()){
	case CellularBand.Gsm900: //do something;
	case CellularBand.Gsm1800: //do something;

 But I get the error:


error: 'bb::device::CellularBand::~CellularBand()' is private


Can someone give an example of how to use this correctly?


Please use plain text.
BlackBerry Development Advisor
Posts: 133
Registered: ‎09-06-2010
My Device: Z30

Re: CellularBand Switch Types Error

Hm, not really sure what you're trying to do with your code snippet since the "Bands" information is a bitmap field that you need to test, ...  but anyway, here's what I do:



CellularRadioInfo *_cellularRadioInfo = new CellularRadioInfo(this);


if (_cellularRadioInfo->bands() & CellularBand::Cdma0)
    qDebug() << "Cellular Band Cdma0 Supported" << endl;
if (_cellularRadioInfo->bands() & CellularBand::CdmaI)
    qDebug() << "Cellular Band CdmaI Supported" << endl;



Please refrain from posting new questions in solved threads.
Feel free to press the like button on the right side if you liked my attempts to help :-)
And please mark posts as solved if you think I found the solution or set you on its path. Thanks!
Found a bug? Report it here
Follow me on Twitter @jcmrim
Please use plain text.