If you are using Internet Explorer, please remove blackberry.com from your compatibility view settings.

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
Developer
marcossit
Posts: 173
Registered: ‎07-19-2012
My Device: Z10 Limited Edition and Dev Alpha C
My Carrier: Movistar-Venezuela

Hello friends, I have some doubts with QML

I want to add my application, new features, and seen other applications that have.

1) A reading of the time remaining to discharge the battery.
2) mAh battery as I can read, since there are other batteries.
3) how I can have a read Dev Mode is, if active, name and expiry date, and is displayed in my application as if it were the one Hardware ID
4) Is there any example of basic calculator in cascades? and read a lot but can not find (Addition, subtraction, multiplication, division, square root and percent).
5) there is a possibility to create a graph to measure the time consumption of the battery or RAM?


Follow me in Twitter:

@Marcossit

BBM Channel:

MarcossitDev: C0002C366  

DeviceSuite For BlackBerry 10:

Link to Download DeviceSuite:

Support was successful? Accept as Solution and click on:


Please use plain text.
Developer
slashkyle
Posts: 813
Registered: ‎10-16-2012
My Device: Red Z10, Dev Alpha C
My Carrier: Telus

Re: Hello friends, I have some doubts with QML

1 & 2 you'll want the battery life api

https://developer.blackberry.com/native/reference/cascades/bb__device__batteryinfo.html

 

3. i don't belive you can tell what state a setting is at, not sure about getting the debug token info.

 

4. try some learn java or learn c++ courses they all teach you how to code better and mostly revolve around math because it's simple, also look into stack overflow or google for some examples

 

5. you could create a graph but you would need to use c++ (openGL etc)

Please use plain text.
Developer
marcossit
Posts: 173
Registered: ‎07-19-2012
My Device: Z10 Limited Edition and Dev Alpha C
My Carrier: Movistar-Venezuela

Re: Hello friends, I have some doubts with QML

For the battery is not the api to measure the remaining time, the only thing I can think of is to use a mathematical equation that through the level, and duration measured standard battery time remaining, but not accurate or effective. No other way?

Follow me in Twitter:

@Marcossit

BBM Channel:

MarcossitDev: C0002C366  

DeviceSuite For BlackBerry 10:

Link to Download DeviceSuite:

Support was successful? Accept as Solution and click on:


Please use plain text.
Developer
slashkyle
Posts: 813
Registered: ‎10-16-2012
My Device: Red Z10, Dev Alpha C
My Carrier: Telus

Re: Hello friends, I have some doubts with QML

yeah something like time can't really be predicted because you have no idea what's going on in the background on the device.

 

Your mathmatical equation is the best bet, figure out a ratio of the battery level vs how long the phone should last and just break that down into a fractional time amount just be sure to set the expectation that the results may not be accurate

Please use plain text.