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
Posts: 88
Registered: ‎06-16-2012
My Device: N950/E7/N808/N9/X7/BB10 Alpha
My Carrier: Kievstar

how to get battery level, network signal strength and type?

in native code for BB10 platform?

thanks

Qt/Symbian/Meego/BB10/Cascades developer
BlackBerry Development Advisor
Posts: 15,724
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
My Carrier: Bell

Re: how to get battery level, network signal strength and type?

Some information on getting the status of the WiFi network is available here:  https://developer.blackberry.com/native/documentation/recipe_netstatus_1935309_11.html

 

APIs for battery level and querying cellular radio status are not currently available.

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
New Developer
Posts: 88
Registered: ‎06-16-2012
My Device: N950/E7/N808/N9/X7/BB10 Alpha
My Carrier: Kievstar

Re: how to get battery level, network signal strength and type?

hi

 

thanks for your answer

this means that I cant use cascades api for non cascade application?

Qt/Symbian/Meego/BB10/Cascades developer
Developer
Posts: 1,068
Registered: ‎11-24-2011
My Device: PlayBook
My Carrier: x

Re: how to get battery level, network signal strength and type?

>this means that I cant use cascades api for non cascade application?

can you define 'non cascade application' please? Native API is fully available for Cascades apps.

New Developer
Posts: 88
Registered: ‎06-16-2012
My Device: N950/E7/N808/N9/X7/BB10 Alpha
My Carrier: Kievstar

Re: how to get battery level, network signal strength and type?

hi

 

i'm working on extending qt components. which is qt c++ + qml plugin

first thing I've tried is to implement battery level, but when i'm trying to add bb::device::BatteryInfo bi; to the plugin and trying to load the plugin from app, I've got: Unknown symbol _ZTV19SBatteryInfoPrivate

SBatteryInfoPrivate is the class, where bb::device::BatteryInfo defined

Qt/Symbian/Meego/BB10/Cascades developer
Developer
Posts: 1,068
Registered: ‎11-24-2011
My Device: PlayBook
My Carrier: x

Re: how to get battery level, network signal strength and type?

Ccan you please post exact error, do you get it at Linking stage?

New Developer
Posts: 88
Registered: ‎06-16-2012
My Device: N950/E7/N808/N9/X7/BB10 Alpha
My Carrier: Kievstar

Re: how to get battery level, network signal strength and type?

[ Edited ]

no, at runtime, since the plugin is .so

error string is: Unknown symbol _ZTV19SBatteryInfoPrivate

that is all I can see from QtCreator

is there is another way to see what happens there?

Qt/Symbian/Meego/BB10/Cascades developer
Developer
Posts: 1,068
Registered: ‎11-24-2011
My Device: PlayBook
My Carrier: x

Re: how to get battery level, network signal strength and type?

I haven't used QtCreator but take a look at logs/log file genereate by the app at your device. Probably it can't finde proper .so at run time.

New Developer
Posts: 88
Registered: ‎06-16-2012
My Device: N950/E7/N808/N9/X7/BB10 Alpha
My Carrier: Kievstar

Re: how to get battery level, network signal strength and type?

can you please gimme a hint how to get the log?

thanks

Qt/Symbian/Meego/BB10/Cascades developer
Highlighted
Developer
Posts: 1,068
Registered: ‎11-24-2011
My Device: PlayBook
My Carrier: x

Re: how to get battery level, network signal strength and type?