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 Contributor
JMWD
Posts: 2
Registered: ‎01-31-2014
My Device: blackberry z10
My Carrier: Verizon

QtMobilitySubset with screen off

I'm using the QML mobility location 'Position Source' class to pull gps location on the phone. It works perfectly for the most part except that it stops gps as soon as the screen shuts off. Setting 'run_in_background' on the bar description doesn't help, unfortunately. I notice that you can easily set 'canRunInBackground' with the C++ usage of QtMobility, however I'm not very well versed in C++. Is there a way to allow the QtMobility Location to run in the background too, or am I forced to rewrite the whole script just to include this property?
Please use plain text.
Developer
BBSJdev
Posts: 6,079
Registered: ‎07-05-2012
My Device: Playbook, Z10 LE, Dev Alpha C
My Carrier: Orange

Re: QtMobilitySubset with screen off

Welcome to the forums.

 

Is it because you are logging the results?

 

It does look like canRunInBackground has not been exposed on the QML side so you would need to use C++.

 


If you've been helped click on Like Button, if you've been saved buy the app. :smileyhappy:

Developer of stokLocker, Sympatico and Super Sentences.
Please use plain text.
New Contributor
JMWD
Posts: 2
Registered: ‎01-31-2014
My Device: blackberry z10
My Carrier: Verizon

Re: QtMobilitySubset with screen off

Yup, while the screen is on the results are logged, but as soon as the screen dims, the results stop. The QTimer functions seem to work just fine even with the screen off, so I was hoping there was a way for QtMobility. Guess I'll have to look into the C++ side. Thanks.
Please use plain text.