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
Bluenoser
Posts: 267
Registered: ‎04-04-2012
My Device: BlackBerry Z30/Z10/Z10LE/Q10/PlayBook

Re: positionUpdated(const QGeoPositionInfo &info) never invoked

LocationDiagnostics works fine on my Alpha Device. Of course I need to be outside for it to get a signal. It doesn't work indoors. And the timeout signal not being emitted for startUpdates isn't an issue. It is designed that way.

 

http://doc.qt.digia.com/qtmobility/qgeopositioninfosource.html#requestUpdate

Please use plain text.
Regular Contributor
_NishantShah
Posts: 76
Registered: ‎07-31-2012
My Device: Blackberry

Re: positionUpdated(const QGeoPositionInfo &info) never invoked

[ Edited ]

Yeah, I did go outdoors for clear skyview to fetch location, but didn't work for both locationDiagnostics & my app.

& can you suggest any way to generate updateTimeout() signal?or do I have to use QTimer class to do so & achieve it manually?

I did try setting responseTime property to achieve this, didn't work though:


positionSource->setProperty("responseTime", 10000);

Regards,

Nishant Shah

Please use plain text.
Developer
Bluenoser
Posts: 267
Registered: ‎04-04-2012
My Device: BlackBerry Z30/Z10/Z10LE/Q10/PlayBook

Re: positionUpdated(const QGeoPositionInfo &info) never invoked

When you tested outdoors, did you turn off WiFi on the device. If you don't turn it off, it will continue to use that connection. Once you turn off WiFi, it should get a signal within a minute or two.

 

To clear up the confusion about timout. You get a position in two way. One is continous. That uses the requestUpdates and stopUpdates. Those work in tandum. The other way is a single get. You call the requestUpdate method and if it doesn't get a single in the time you set, it will fire a updateTimeout signal.

 

I don't know what you are trying to accomplish with the updateTimeout. Maybe you can clarify.

Please use plain text.
BlackBerry Development Advisor
jehrismann
Posts: 68
Registered: ‎10-15-2012
My Device: Z10

Re: positionUpdated(const QGeoPositionInfo &info) never invoked

Hi,

 

Just to be clear, location permission is one thing but you still need to have Location Services enabled. Launch Settings, go to the Location Services page, and make sure Location Services is on.

 

Jim

Please use plain text.
BlackBerry Development Advisor
jehrismann
Posts: 68
Registered: ‎10-15-2012
My Device: Z10

Re: positionUpdated(const QGeoPositionInfo &info) never invoked

Hi,

 

A clarification regarding updateTimeout(). When requestUpdate() is called you optionally pass a parameter indicating the timeout in msec. If the request cannot be satisfied within that time then updateTimeout() is emitted. If the timeout parameter is not specified then "the timeout defaults to a reasonable timeout period as appropriate for the source".

 

When startUpdates() is called the updateTimeout() signal will be emitted if the source "determines that it will not be able to provide regular updates". This determination may take a long time (a few minutes) and is not predictable.

 

Jim

Please use plain text.
Developer
Bluenoser
Posts: 267
Registered: ‎04-04-2012
My Device: BlackBerry Z30/Z10/Z10LE/Q10/PlayBook

Re: positionUpdated(const QGeoPositionInfo &info) never invoked

Thanks for the clarification. I thought I read the Qt docs but missed that point. That is why I posted to the link so someone could keep me honest. :smileywink:

 

In all my testing, I haven't seen a updateTimeout using startUpdates so yes, it cannot be predictable.

Please use plain text.
Regular Contributor
_NishantShah
Posts: 76
Registered: ‎07-31-2012
My Device: Blackberry

Re: positionUpdated(const QGeoPositionInfo &info) never invoked

Okay. Now that's somewhat clear to me. I would give another shot. It may start working for me. Thanks every one.

 

Regards,

Nishant Shah

Please use plain text.