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
Contributor
Posts: 18
Registered: ‎07-24-2012
My Device: Bold 9650
My Carrier: Unicom

How to process the geolocation event in Cascade framework

In the Cascade framework, after the GUI is displayed, the main thread go to Applicaton::exec().

how can I process the geolocation event separately. I think there must be a event processor in Applicaton::exec(), but How can I interfere it?

 

Should I start a  new thread?

 

Thanks.

Retired
Posts: 329
Registered: ‎05-07-2012
My Device: BB Alpha
My Carrier: N/A

Re: How to process the geolocation event in Cascade framework

Hi there,

 

Geolocation event is part of the BPS service.

The typical procedure of receiving event notification from BPS is as follows:

1. register with BPS platform that you wish to receive certain event. in this case
   geolocation_request_events()

2. start a loop to receve event notification from BPS. when receive a event check the event type if you want to handle.
  in this case.: bps_event_get_domain(event) ==geolocation_get_domain()

3.if this is the event you want to handle, you can call "geolocation" related APIs to check the details.
https://developer.blackberry.com/native/beta/reference/com.qnx.doc.bps.lib_ref/com.qnx.doc.bps.lib_r...

There is a similar example app "FunWithSensors", which demonstrates similar tasks.
https://github.com/blackberry/Cascades-Samples

 

Let me know if this helps,

 

Martin

 

Contributor
Posts: 26
Registered: ‎07-23-2012
My Device: bb10 dev alpha
My Carrier: movistar

Re: How to process the geolocation event in Cascade framework

In September will be released Beta 3 with Geocoding API for geocoding and reverse geocoding.

 

https://developer.blackberry.com/cascades/download/roadmap/