Tracking Service

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

Activate service on NAO Cloud (Admins only)

 

NAO SDK

  1. First add a tracking identifier
    1. NAOServicesConfig.setIdentifier

      Android signature

      /**
       * @exclude
       * set the identifier to take as instanceId in naoServiceManager
       * @param context the Context used in the application
       * @param id the new identifier used in the NAOSDK
       * @param consent the boolean used to confirm the terms of usage of this api
       * @return true if identifier has been changed, false otherwise
       * @throws NAOException if NaoContext is not created yet
       */
      public static boolean setIdentifier(final Context context, final String id, final Boolean consent) throws NAOException
      

      iOS signature

      /**
       *@brief Function for setting the user tracking identifier with his consent
       *@param[in]    identifier      String word used as the used identifier
       *@param[in]    consent             YES if the user is consent otherwise NO
       *@return       YES if the identifier has been successful set otherwise NO
       */
      + (BOOL)setIdentifier:(NSString*)identifier witUserConsent: (BOOL)consent;
      

      Passing consent = TRUE provides the NAO SDK with the assurance that the application has requested authorization from the user. User content should always be explicitly obtained before starting the tracking service.

  2. Start tracking service
    1. Creates service Handle with your API Key
      void createHandle()
      {
          serviceHandle = new NAOTrackingHandle(this, MyNaoService.class, apiKeyUsed, this, this);
          try {
              NAOServicesConfig.setIdentifier(this,"people identifier",true);
          } catch (NAOException e) {
              e.printStackTrace();
          }
      }
      
      
    2. Synchronize data
      void synchronizeData() {
      
          if(null == serviceHandle){
              createHandle();
          }
      
          serviceHandle.synchronizeData(naoSyncListener);
      }
      
      
    3. Start service Handle
      void startService() {
      
          if(checkPermissions()){
              // init service
              if (serviceHandle == null) {
                  createHandle();
              } serviceHandle.start();
          }
      }

    • Related Articles

    • 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 ...
    • 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 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 ...
    • Release 21.09 (NAO SDK 4.11)

      Versions Component Version Hotfix Hotfix 21.09.01 NAO® Cloud 21.09.0 21.09.01 NAO® SDK iOS 4.11.3 4.11.4 4.11.5 NAO® SDK Android 4.11.3 4.11.4 4.11.5 NAO® Logger iOS 4.11.3 4.11.4 4.11.5 NAO® Logger Android 4.11.3 4.11.4 4.11.5 New Features NAO® SDK ...