Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Detect if StartGPSTracking() has already been started

Author
Message
David_L
6
Years of Service
User Offline
Joined: 22nd Jan 2018
Location:
Posted: 24th Jan 2018 18:51
Is there a way to detect if StartGPSTracking() has already been started to avoid calling StartGPSTracking() every time before getting a GPS point?
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 25th Jan 2018 10:29 Edited at: 25th Jan 2018 10:29
if seems it have no return value but you can use a flag
if gps=0
StartGPSTracking
gps=1
endif

if gps=1
StopGPSTracking()
gps=0
endif
AGK (Steam) V2017.12.12 : Windows 10 Pro 64 Bit : AMD (17.12.1) Radeon R7 265 : Mac mini OS High Sierra (10.13)
Jerry McGuire
7
Years of Service
User Offline
Joined: 25th Mar 2017
Location:
Posted: 26th Jan 2018 17:10
Interesting. Why not starting once and leave it going?
iMac Book Pro, MacOS 10.12.4, Xcode 9.0.1;
iPhone 6, iOS 9.35; iPhone 5s, iOS 9.35; iPad (3rd gen), iOS 9.35;

Dell Precision T7400, Windows 7 Professional 64bit, Visual Studio Community 2015;
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 26th Jan 2018 18:59 Edited at: 26th Jan 2018 18:59
Quote: " Why not starting once and leave it going?"

i guess to save battery

Quote: "This command will consume a lot of battery power, so use StopGPSTracking when you no longer need a location."
AGK (Steam) V2017.12.12 : Windows 10 Pro 64 Bit : AMD (17.12.1) Radeon R7 265 : Mac mini OS High Sierra (10.13)

Login to post a reply

Server time is: 2024-04-19 04:58:27
Your offset time is: 2024-04-19 04:58:27