Re: CSentry Android Smartphone; GPS function and button
Posted: August 26th, 2015, 4:01 pm
Hi, I got the example found in the forum and it is working well. I would like to put a button to get or not get coordinates. How can I do it and in which place in the code I should put it? I am so glad for any information.
Code: Select all
PROC GPS
gps(open,3,4800); // on a laptop or tablet; COM3, 4800 baud
gps(open); // on Android or the Pocket PC
if gps(read,10,"Aguarde...") then // 10 segundos buscando sinal,
errmsg("Latitude is %f, longitude is %f",gps(latitude),gps(longitude));
latitude = gps(latitude);
longitude = gps(longitude);
else
errmsg("Ative o GPS");
endif;
gps(close);