gps function

Discussions about creating CAPI applications to run on Android devices
Forum rules
New release: CSPro 8.0
Post Reply
AriSilva
Posts: 591
Joined: July 22nd, 2016, 3:55 pm

gps function

Post by AriSilva »

I do not know what is wrong with the gps function on my tablet (SAMSUNG TABA T280).
I´ve tried the simple example from the help , like

gps(open); // on Android
if gps(read,30) then // a successful attempt at a read, for up to five seconds
errmsg("Latitude is %f, longitude is %f",gps(latitude),gps(longitude));
else
errmsg("GPS signal could not be acquired");
endif;
gps(close);

And it did not capture the lat-long data.
The tablet has a gps, google map (and other apps) receives the signal very fast, but nothing happens with CSEntry.
Best
Ari
Best
Ari
AriSilva
Posts: 591
Joined: July 22nd, 2016, 3:55 pm

Re: gps function

Post by AriSilva »

I forgot to mention that I tried it also for 60 seconds, and it did not work.
Besides, and this might be the problem, the gps strength gauge shows nothing at all.
Best
Ari
aaronw
Posts: 561
Joined: June 9th, 2016, 9:38 am
Location: Washington, DC

Re: gps function

Post by aaronw »

Your device's ability to take a GPS reading will be affected by environmental factors. Since your GPS gauge shows nothing it might be necessary to move around and retake the reading. If you're inside a building, try moving outside.
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: gps function

Post by josh »

Just to add what Aaron said. Google Maps uses a combination of wifi, cell signal and GPS to get locations so it is able to get an approximate location very quickly even indoors. CSPro uses only the GPS signal from satellites which gives you a much more precise location but it takes longer and requires a direct of the sky. I have also found that the first reading can take especially long. Subsequent readings will be faster.
AriSilva
Posts: 591
Joined: July 22nd, 2016, 3:55 pm

Re: gps function

Post by AriSilva »

I´ve done all the tests outside, in a clear field, no buildings around.
As Josh said, Google uses wifi, whereas CSEntry does not. This might explain the difference in capturing the signal, but it does not help me much. I´ll try increasing the exposition time, but this also a problem, asking the interviewer to wait 1 or 2 minuts for the acceptance.
Besides that, I do not know what else I could do.
Ari
Best
Ari
AriSilva
Posts: 591
Joined: July 22nd, 2016, 3:55 pm

Re: gps function

Post by AriSilva »

Something that I forgot to mention is that the tablet I´m using (SAMSUNG TABA T280) does not have a telephone chip.
But Google works well around this limitation.
Best
Ari
blumski
Posts: 37
Joined: May 7th, 2018, 7:02 am

Re: gps function

Post by blumski »

You must also check that the location setting of your device is activated.
Post Reply