Remember, the LocationChanged event of the extension only fires if the app is NOT in the background...
also the setup (for example setup of the RequestText) needs to be done before starting the service...
but you could use the formula from Steve and calculate the distance in the spreadsheet after passing the current lat and long... the destination lat and long could be provided for example as variable in the Google Apps Script
Taifun