WFO 2 Posted Monday at 10:51 AM I'm developing an app for use on Android and want to parse the nmea strings. I'm using the class like this ---------------------------------------------- TLocationListener = class(TJavaLocal, JLocationListener) private [weak] FParent : TForm1; public constructor Create(AParent : TForm1); procedure onFlushComplete(requestCode: Integer); cdecl; procedure onLocationChanged(location: JLocation); overload; cdecl; procedure onLocationChanged(locations: JList); overload; cdecl; procedure onProviderDisabled(provider: JString); cdecl; procedure onProviderEnabled(provider: JString); cdecl; procedure onStatusChanged(provider: JString; status: Integer; extras: JBundle); cdecl; end; ------------------------------------------------- It works well is solid and reliable, but i cant find one single example on how to use / add the ' addNmeaListener' function. Can anyone advise on how to use it ? Share this post Link to post
Dave Nottage 627 Posted Monday at 09:10 PM 10 hours ago, WFO said: It works well is solid and reliable, but i cant find one single example on how to use / add the ' addNmeaListener' function. Implementation for an OnNmeaListener here: https://github.com/DelphiWorlds/Kastri/blob/6d21cdb8000c43e7bcc7a0dc44bcbad1058106e1/Features/Location/DW.Location.FusedLocation.Android.pas#L44 ..adding it to LocationManager here: https://github.com/DelphiWorlds/Kastri/blob/6d21cdb8000c43e7bcc7a0dc44bcbad1058106e1/Features/Location/DW.Location.FusedLocation.Android.pas#L212 I have no idea how to use what is actually in the message - someone else asked for the implementation I came up with. Share this post Link to post
WFO 2 Posted Tuesday at 05:45 AM Thank you so much, it took a lot of extra work, but i finally managed to get the nmea messages. 2 Share this post Link to post
Rollo62 602 Posted Tuesday at 02:50 PM Interesting, do you have a small sample how you get this running? Its quite a messy protocol https://gpsd.gitlab.io/gpsd/NMEA.html#_talker_ids I wonder, what subset of the data will be available over Android phones, I think the phones will miss out a lot of data, right? Share this post Link to post