does gps work even when application is closed

251
2
02-12-2021 01:57 AM
rsharma
Occasional Contributor III

hi,

i have created an application where i am storing current lat long through position source element, i want to know does this element work and save my coordinate even when the application is closed whole time  until some condition meet.

0 Kudos
2 Replies
ErwinSoekianto
Esri Regular Contributor

@rsharma 

 

It sounds like you are describing "Background Location" functionality, is it correct? https://doc.arcgis.com/en/appstudio/extend-apps/capabilities.htm (see Background Location section.)

 

Erwin

0 Kudos
rsharma
Occasional Contributor III

hi @ErwinSoekianto 

i am trying to get state of application in qml 

console.log(Qt.application.state);

but how to make gps work on 2 states active and hidden. when  it is active it return 4 and when i close the app with middle button. it return 0, and i have to make gps  working in both state.

How to do it.

Thanks in advance

 i have enabled the location in capabilities in background modes.

Screenshot 2021-02-19 at 1.26.46 PM.png

 

0 Kudos