It's sometimes useful to be able to get a blue dot to a remote venue for smoke testing purposes. For remote/home office work, it's also good when starting development with IndoorAtlas SDK, so you can smoke test your own code. Here's how.


To be able to get blue dot, the venue always needs to be fingerprinted. Thus, when testing code based on the IndoorAtlas SDK, the choices are : 

  • Fingerprint your company's office (most common choice)
  • Fingerprint a venue close to your home or office (mall, library, outdoor street)
  • Fingerprint your home office
  • Fingerprint your customer's target venue (usually much later in the project)


Once you have one venue fingerprinted, you can fake the blue dot into the venue remotely. To do this, you can use two different approaches:


Remote testing using Faking GPS and Beacon simulation


In this method, you need to :

  • Install a fake GPS app and take it into use (Android). Or run your iOS app with Simulated location from XCode. Configure the fake GPS app to transmit GPS coordinates of your target venue.
  • Obtain UUID,major,minor of one of the beacons in your target venue. Check this guide.

  • Install a beacon simulator app on your second phone (you need two phones) and configure it to transmit your beacon UUID,major,minor
  • OR: configure a battery beacon to transmit your beacon UUID,major,minor.


Now, when you start IndoorAtlas positioning on the phone where you run Fake GPS, it will load the venue signal map and start monitoring the beacons in the map. It will then detect the "fake" beacon signal and you should receive a blue dot some where nearby that beacon in the venue.


Remote testing using IndoorAtlas setLocation API method


  • The Waypoints tab in IA Web app to get the lat,lon of the center of your fingerprinted area
  • The IndoorAtlas SDK's setLocation-API. 
  • Obtain UUID,major,minor of one of the beacons in your target venue. Check this guide.
  • Install a beacon simulator app on your second phone (you need two phones) and configure it to transmit your beacon UUID,major,minor


Copy Lat,Lon like this and enter it to the setLocation-code examples below.



Code Examples

iOS


let clLoc = CLLocation.init(coordinate: CLLocationCoordinate2D(latitude: LAT, longitude: LON), altitude: 0, horizontalAccuracy: 1.0, verticalAccuracy: -1, timestamp: Date.init())
let iaLoc = IALocation.init(clLocation: clLoc, andFloor: IAFloor.init(level: FLOOR))
iaLoc.soft = false
locationManager.location = iaLoc




Android


        mIALocationManager.requestLocationUpdates(locReq, mLocationListener);
        mIALocationManager.registerRegionListener(mRegionListener);

        new Handler().postDelayed(new Runnable() {
            @Override
            public void run() {
                mIALocationManager.setLocation(new IALocation.Builder()
                        .withLatitude(LAT_HERE) 
                        .withLongitude(LON_HERE)
                        .withAccuracy(10)
                        .withFloorLevel(1) // set floor level 
                        .build());
                
                // lock indoors to make the fake blue dot stay indoors
                mIALocationManager.lockIndoors(true);
            }
        }, 5000);