Welcome!

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

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

CellularBand Switch Types Error

I am trying to "switch" the CellularBand:

 

https://developer.blackberry.com/native/reference/cascades/bb__device__cellularband.html#enum-type

 

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

 But I get the error:

 

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

 

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

Thanks.

Please use plain text.
BlackBerry Development Advisor
jomurray
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;
...

etc.

 

---------------------------------------
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.