Show/Hide Toolbars

Android Applications

Navigation: » No topics above this level «

Introduction

Scroll Prev Top Next More

Documentation For Mobile Navigation App on Android.

 

A smart phone is potentially packed with sensors and Delphi claims to provide cross platform access to those sensors.

 

This project was aimed at discovering this capability and what can be achieved.

 

First an about page shows which sensors are available on the device. This was later expanded to enable all sensors to be turned off and then activated separately enable examination of the battery impact of individual sensors.

 

A major learning curve was how the user interface needs to be adapted for the very small screens.  I chose a Multi Layer Tab control template "Tabbed with Navigation" offered with Tokyo as a basis for my trail app. I had to add the functionality to support the hardware back button and was not very successful with gesture use opting in the end for Forward and Back Speed buttons so more to learn there.  The Templates were not offered with my Rio install.

 

The "Progress" Tab tracks GPS sensor information showing the current speed, bearing, Longitude and Latitude reading.  It also shows the "Start" Location and the distance to the current location while trying to estimate the distance of the actual path traveled.  If the mobile is actually stationary it provides an indication of the navigational accuracy. The GPS sensor on an Android generally incorporates information calculated from Mobile transmissions towers in the GPS readings. A second sub-tab presents the location readings graphically by default after the software has attempt to rationalize them but also allowing "All" location readings. The last sub-tab on "Progress" shows recent samples and has a save button which copies all samples to a comma separated text file on the phone for offline analysis.

 

The intention of a "Measure" Tab was to allow the mobile to be left in a single location achieving a more accurate  location by averaging a number of GPS readings. This was not successful. The first "Measure" tab starts and stops the averaging and shows the progressive results - Number of samples,  Jitter and Average. The next sub tab adds average speed and altitude. A third tab plots all average samples.  If the mobile is stationary this gives a visual plot of the accuracy of the readings but if the mobile is moving it give a smoothed plot of the track taken. Not the intent but useful. A final sub-tab on "Measure" shows all average samples and allows you to save a CSV file of the data on the mobile. An "Average Location" is logged if more than 5 samples are within a prescribed distance of the previous sample (ie the mobile has not "moved"). A sample session will be terminated is the Motion Sensor is on and Triggered, the stop button is pressed, the prescribed distance exceeded or the number in the average exceeds 10. Turning on the Motion Sensor greatly increase the prescribed distance but allows the action of "picking up the mobile and physically moving it to stop the sampling.

 

The "Map" tab passes the current location to Google Maps.

 

The Android application can be download here. You will have to allow non Play Store install in this instance and manually enable "Location" permissions for the app. This application is compiled in Rio or Sydney and so requires Android 5.1 or higher to run. If you have an older version of Android try the Tokyo compile here.