[Background Location Plugin] Accessing entities in background

Forge Component
(4)
Published on 2017-11-27 by Alexandre Costa
4 votes
Published on 2017-11-27 by Alexandre Costa

Using the Background Location Plugin I have a piece of javascript that gets executed every time the phone produces a new GPS data point. The javascript kicks off an Outsystems action that writes this data into an entity and syncs it to our server.. This works well on iOS, but on Android as soon as the Outsystem action tries to write into an entity, execution is stalled until the app becomes active again. 

Is there any way to work around this?

Solution

Hilbrandt Baarsma wrote:

Using the Background Location Plugin I have a piece of javascript that gets executed every time the phone produces a new GPS data point. The javascript kicks off an Outsystems action that writes this data into an entity and syncs it to our server.. This works well on iOS, but on Android as soon as the Outsystem action tries to write into an entity, execution is stalled until the app becomes active again. 

Is there any way to work around this?

Hey Hilbrandt,

Is it possible to do a REST call and use a Service action instead a Outsystems action? Maybe it's a work around.

Cheers


Solution

Yeah this is how we ended up making it work. It's a little more tricky to get the plugin up to date with the right parameters but at least it keeps working.