Restart the location service

Restart the location service

Overview

NAOLocationHandle class provides the restart method that stops and stars the location service and therefore re-initializes the environment and variables are being used. However, we strongly recommend that you avoid calling this method restart just after the stop method. This means that call the restart method only while the location service is already running.

Example

  	
  	NAOLocationHandle locationHandleClient;
  	...
  	locationHandleClient = new NAOLocationHandle("your_apikey");
  	...
  	locationHandleClient.start();
  	...
  	locationHandleClient.restart();
  	
  

    • Related Articles

    • Restart the location service

      Overview NAOLocationHandle class provides the restart method that stops and stars the location service and therefore re-initializes the environment and variables are being used. However, we strongly recommend that you avoid calling this method ...
    • Quick Start: Location Service

      The integration principle is the same accross all SDK services, so only the integration of the Location Service is detailed hereafter. Please refer to the API Reference Guide for details about other services. Initialize Location Service Import the ...
    • Service Selection

      Whatever the services you are using, there are two mandatory delegates that your app must implement, since they’re used by all the services. Data Synchronisation Delegate (NAOSyncDelegate): Gives you the result of the data synchronisation requested ...
    • Get last known location

      GetLastKnownLocation Overview GetLastKownLocation API provides the last known location. On Android, the method returns a Location object. However, it requires at least one running service otherwise it will return a null object. Example On Android ...
    • Tracking Service

      This is a new service included in version 4.10.0. Tracking service allows once activated to track the position of people in a building. Warning: this service must be activated with the user’s consent. otherwise this service will not be started Setup ...