Emulate User Position

Emulate User Position

If you want to test your integration of the NAO SDK without the need to be on site, we provide an emulated mode. That emulated mode is only available for the Location Service and Geofencing Service.

  • Warning: The emulator mode bypasses the sensors, so the integration of the sensor activation part of your application cannot be tested in that mode.

All the files needed for emulation are available at your NAO Cloud page under Developer > Resources tab.

 

These files must be copied to your project files.

 

You can test your integration of the NAO SDK with the emulator API Key.
This key can be used only for Location Service and Geofencing Service.
For the location service, it will emulate a user position. Just create an instance of NAOLocationHandle as usual:

NAOLocationHandle* locationHandle = [[NAOLocationHandle alloc] initWithKey:@"emulator" 
                                                                  delegate:/* your (id<NAOLocationHandleDelegate>) */
                                                           sensorsDelegate:/* your (id<NAOSensorsDelegate>) */];

Warning: This API Key does not use the sensors: the integration of the sensor activation delegate can’t be tested with it.

You will also need to add a position emulation file (nao.kml). Drag and drop the nao.kml in your Xcode project navigator, check the box “Copy items if needed” and verify the presence of the file added in Build Phases -> Copy Bundle Resources.
You can download this file from NAO Cloud, from your site’s dashboard (under Developer > Resources tab)

For the Geofencing Service you need to add the geofencing emulation file (alerts_emulator.json) the same away as above for the nao.kml. and to create an instance of NAOGeofencingHandle as usual:

NAOGeofencingHandle* geofencingHandle = [[NAOGeofencingHandle alloc] initWithKey:@"emulator" 
                                                                  delegate:/* your (id<NAOGeofencingHandleDelegate>) */
                                                           sensorsDelegate:/* your (id<NAOSensorsDeleg

    • Related Articles

    • Release 25.06 (NAOSDK 4.12.1)

      Versions Component Version NAO® Cloud 25.06 NAO® Viewer 25.06 NAO® SDK iOS 25.06 - V4.12.1 NAO® SDK Android 25.06 - V4.12.1 NAO® Logger iOS 25.06 - V4.12.1 NAO® Logger Android 25.06 - V4.12.1 NAO Cloud Improvements / New features Tooling to support ...
    • App publication

      If your application needs to use the service in background mode, you must follow a few rules to avoid a rejection of your application on AppStore. Basic rule Apple only accepts applications that use background modes when it is justified. Example use ...
    • 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 ...
    • 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 ...
    • Location API

      Overview Location API can be used to receive location information about all tags of a given site. Once subscribed to a topic, your application will receive MQTT messages. Each message contains a topic and a payload. Refer ot the “Connection and ...