Directly Access The GPS Location Sensor With The JNI In Delphi XE7 Firemonkey On Android

Delphi XE7 Firemonkey Android JNI GPS Location SensorDeveloper Jeff Overcash has a demo up on the Embarcadero Code Central which accesses the Android GPS functionality via the JNI in Delphi XE7 (and XE6) Firemonkey. If TLocationSensor does not quite work like you want you can go directly to the Android GPS data via the LocationManagerService. One goal of wanting to do this is you may be able to reduce the battery usage of accessing the GPS because your overhead may be less than the TLocationSensor component. The demo will give you longitude, latitude, and altitude. Additionally it will list the different GPS services available (on my device they were passive, GPS, and network). This demo is free and originally was for XE6 but I was able to update it to XE7 by simply adding Androidapi.Helpers to the uses clause. SharedActivityContext is now located in Androidapi.Helpers in Delphi XE7 Firemonkey. A tip for Firemonkey on IOS is that you can get location information directly from MKMapView using one of the DPF IOS or TMS Software wrapper components. This demo project and the IOS components should also work for Appmethod. Here is the main code from the demo:

Download our mirror of the Android GPS JNI project demo with Delphi XE7 Firemonkey support.

Or head over and get the original Android GPS demo source code for Delphi XE6 from the Embarcadero Code Central.

Have Delphi Firemonkey questions? Ask and get answers on StackOverflow.

Directly Access The GPS Location Sensor With The JNI In Delphi XE7 Firemonkey On Android by Delphi XE5 XE6 XE7 XE8 10 Seattle Berlin Firemonkey, Delphi Android, Delphi IOS is licensed under a Creative Commons Attribution 4.0 International License.

2 Responses to Directly Access The GPS Location Sensor With The JNI In Delphi XE7 Firemonkey On Android

  1. Pingback: Anonymous

  2. Luiz M. says:

    Thanks!

Leave a Reply

Show Buttons
Hide Buttons
Read previous post:
Delphi XE7 Firemonkey Android APK Auto Update
Build Your Own App Store Or MDM Solution With Delphi XE7 Firemonkey On Android

Developer Robert C. from the Brazilian Programador Mobile forum wrote in with a demo that shows how to auto update...

Close