[SOLVED] LAMW : GPS : number of satellite lazarus / 43-Android ---------------------------------------------------------------------- majid.ebru · 2017-02-22 09:39 in some GPS apk ,like " Maverick", show number of satellite how can i show like this ??? ---------------------------------------------------------------------- DonAlfredo · 2017-02-22 10:23 With LAMW, you can't at the moment. There is no implementation yet of "android.location.GpsStatus". But you can ask the author for this feature ! In most cases, he is very willing to implement feature requests like this. ---------------------------------------------------------------------- jmpessoa · 2017-02-22 16:38 QuoteBut you can ask the author for this feature ! In most cases, he is very willing to implement feature requests like this. Ok. I'll try to implement this feature! Thank you! ---------------------------------------------------------------------- jmpessoa · 2017-02-25 04:02 Done! Please,  update from github ref. https://github.com/jmpessoa/lazandroidmodulewizard code example: [from "AppLocationDemo1"] Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i procedure TAndroidModule1.jLocation1GpsStatusChanged(Sender: TObject;  countSatellites: integer; gpsStatusEvent: TGpsStatusEvent);var  i: integer;begin   case gpsStatusEvent of      gpsStarted: ShowMessage('gpsStarted');     gpsStopped: ShowMessage('gpsStopped');     gpsFirstFix: ShowMessage( FloatToStr( jLocation1.GetTimeToFirstFix() ) );      gpsSatelliteStatus:     begin       ShowMessage(IntToStr(countSatellites));       for i:= 0 to countSatellites-1 do       begin         ShowMessage(jLocation1.GetSatelliteInfo(i));       end;     end;   end; end;  Thank you! ---------------------------------------------------------------------- jmpessoa · 2017-02-26 04:43 try: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i  if  myLoc.IsGPSProvider() then .....  or Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i  if  not myLoc.IsGPSProvider() then ..... ---------------------------------------------------------------------- majid.ebru · 2017-02-26 04:45 sorry i want to Enable or Disable the GPS and i (think that) write mistake code i mistake ---------------------------------------------------------------------- majid.ebru · 2017-02-26 12:19 Quote from: jmpessoa on February 25, 2017, 05:02:23 am Done! Please,  update from github ref. https://github.com/jmpessoa/lazandroidmodulewizard code example: [from "AppLocationDemo1"] Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i procedure TAndroidModule1.jLocation1GpsStatusChanged(Sender: TObject;  countSatellites: integer; gpsStatusEvent: TGpsStatusEvent);var  i: integer;begin   case gpsStatusEvent of      gpsStarted: ShowMessage('gpsStarted');     gpsStopped: ShowMessage('gpsStopped');     gpsFirstFix: ShowMessage( FloatToStr( jLocation1.GetTimeToFirstFix() ) );      gpsSatelliteStatus:     begin       ShowMessage(IntToStr(countSatellites));       for i:= 0 to countSatellites-1 do       begin         ShowMessage(jLocation1.GetSatelliteInfo(i));       end;     end;   end; end;  Thank you! Hi this code dose not work ?!? i change that to : Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i procedure TamMain.myLocGpsStatusChanged(Sender: TObject;  countSatellites: integer; gpsStatusEvent: TGpsStatusEvent);var  i: integer;begin  case gpsStatusEvent of     gpsStarted: begin       jTextView2.Text:='gpsStarted'+#10+#13+       'countSatellites = '+IntToStr(countSatellites);     end;     gpsStopped: begin       jTextView2.Text:='gpsStopped'+#10+#13+       'countSatellites = '+IntToStr(countSatellites);     end;     gpsFirstFix: begin        jTextView2.Text:=FloatToStr(myLoc.GetTimeToFirstFix())+#10+#13+      'gpsFirstFix';     end;     gpsSatelliteStatus: begin       jTextView2.Text:='gpsStopped'+#10+#13+       'countSatellites = '+IntToStr(countSatellites);       for i:= 0 to countSatellites-1 do     begin         jTextView1.Text:= (myLoc.GetSatelliteInfo(i));       end;     end;  end;end; but all time countSatellites = 0 ?!? ---------------------------------------------------------------------- jmpessoa · 2017-02-26 15:53 You may have to wait a lot more ... or even move to an open area ... [I tested the code and it works!] to better info fix here... Code: [Select]gpsSatelliteStatus: begin        jTextView2.Text:='gpsSatelliteStatus'+#10+#13+     //FIX HERE!        'countSatellites = '+IntToStr(countSatellites);        for i:= 0 to countSatellites-1 do        begin          jTextView1.Text:= (myLoc.GetSatelliteInfo(i));        end;      end; ---------------------------------------------------------------------- majid.ebru · 2017-02-28 03:40 Hi the program find my position but no show number satellite ?!? jTextView2.Text alternative show 'gpsStarted' and  'gpsStoped' but no show show number satellite ? ---------------------------------------------------------------------- jmpessoa · 2017-02-28 04:31 Please, first try demo "AppLocationDemo1" You need: 1. Enable Wifi in your smartphone 2. Enable  gps in your smartphone 3. Run app 4. Click the first button "Try StartTracker" and wait.... wait.... wait.... [here, in my house, I need go to an open area...] ---------------------------------------------------------------------- majid.ebru · 2017-02-28 09:40 i completely understand what you say. i find my position whit my app. . . also my WiFi is OFF. but see attach please ---------------------------------------------------------------------- jmpessoa · 2017-02-28 17:01 Yes, when "gpsStarted"  we get countSatellites = 0 ! [that is right!] wait until  "gpsSatelliteStatus",  so we will get  the real countSatellites <> 0 !!! [You need WIFI = ON!   Enable it!] ---------------------------------------------------------------------- majid.ebru · 2017-03-04 05:14 don't work again !! i enable WiFi and google find my position but , don't show satellite number?? value of gpsStatusEvent is only :  gpsStarted and gpsStopped and never gpsFirstFix and gpsSatelliteStatus Event( or show) ?!?! ---------------------------------------------------------------------- jmpessoa · 2017-03-05 14:39 Quotevalue of gpsStatusEvent is only :  gpsStarted and gpsStopped and never gpsFirstFix and gpsSatelliteStatus Event( or show) ?!?! Well, You need wait until value of gpsStatusEvent = gpsSatelliteStatus [or gpsFirstFix ] but In your area this does not seem easy... here in my house I always need to go to an open area [backyard... or  street ...]