Converted the ranging activity to a background service that runs
independently of the activity.