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

Web and WebWorks Development

Reply
Developer
Posts: 1,229
Registered: ‎03-20-2011
My Device: Playbook, Z10 LE, Dev Alpha B, 2x Dev Alpha C
My Carrier: 3, Orange, Vodafone

Re: How accurate is HTML5 Geolocation? Compared to native geolocation.h?

Bb alpha is a bit wonky cos we got the dev 9 months before release Personally I just wanna fix PB while also waiting for the 10 release



Click the like button if you find my posts useful!
Contributor
Posts: 34
Registered: ‎08-01-2012
My Device: Playbook
My Carrier: None

Re: How accurate is HTML5 Geolocation? Compared to native geolocation.h?

Is there a way to get a location update every few seconds? iOS does this and works extremely well.

I see the navigator.geolocation.watchPosition method, so will test and see.
Developer
Developer
Posts: 607
Registered: ‎04-29-2011
My Device: PlayBook 16GB, BB10 LE Z10 (red)
My Carrier: none

Re: How accurate is HTML5 Geolocation? Compared to native geolocation.h?


zedsaid wrote:
Is there a way to get a location update every few seconds? iOS does this and works extremely well.

I see the navigator.geolocation.watchPosition method, so will test and see.

That's the function you are looking for. It will throw back a watchId value to remove the event if neccessary using the navigator.geolocation.clearWatch(watchId), so eg. if you change the screen and your elements you add values to aren't available anymore the event can be stoped.


"Like" if you liked the post.
"Accept as Solution" if the post solves your question.
Developer
Posts: 1,229
Registered: ‎03-20-2011
My Device: Playbook, Z10 LE, Dev Alpha B, 2x Dev Alpha C
My Carrier: 3, Orange, Vodafone

Re: How accurate is HTML5 Geolocation? Compared to native geolocation.h?

This is what I wanna avoid Use of the GPS drains the battery Adam - comments would help



Click the like button if you find my posts useful!
Developer
Posts: 1,229
Registered: ‎03-20-2011
My Device: Playbook, Z10 LE, Dev Alpha B, 2x Dev Alpha C
My Carrier: 3, Orange, Vodafone

Re: How accurate is HTML5 Geolocation? Compared to native geolocation.h?

I'll play tomow, a bit tired now Hopefully we can sort this out quickly



Click the like button if you find my posts useful!
Contributor
Posts: 34
Registered: ‎08-01-2012
My Device: Playbook
My Carrier: None

Re: How accurate is HTML5 Geolocation? Compared to native geolocation.h?

What are you wanting to sort out? Battery life? I think it is a given that extended use of GPS drains the battery.
Developer
Developer
Posts: 607
Registered: ‎04-29-2011
My Device: PlayBook 16GB, BB10 LE Z10 (red)
My Carrier: none

Re: How accurate is HTML5 Geolocation? Compared to native geolocation.h?

Can only agree. Most times I use GPS navigation I need to connect my device to power supply directly (eg. in car) since drain of battery is really hard on almost all devices including Apple, Android, PlayBook (haven't any other BB at this time) + WindowsPhone.

 


"Like" if you liked the post.
"Accept as Solution" if the post solves your question.
Contributor
Posts: 34
Registered: ‎08-01-2012
My Device: Playbook
My Carrier: None

Re: How accurate is HTML5 Geolocation? Compared to native geolocation.h?

Are there any posted specs for battery time while using GPS at different accuracies? My iPhone 4 can last about 5 hours using continual GPS.
Developer
Developer
Posts: 607
Registered: ‎04-29-2011
My Device: PlayBook 16GB, BB10 LE Z10 (red)
My Carrier: none

Re: How accurate is HTML5 Geolocation? Compared to native geolocation.h?


zedsaid wrote:
Are there any posted specs for battery time while using GPS at different accuracies? My iPhone 4 can last about 5 hours using continual GPS.

Do not know. Only my personl thoughts when using different devices for testing here.


"Like" if you liked the post.
"Accept as Solution" if the post solves your question.