It's sometimes useful to be able to get a blue dot to a remote venue for smoke testing purposes, e.g. when integrating IndoorAtlas SDK to your app. 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.
In order to remotely simulate positioning, venue where you want to remotely simulate location needs to fulfill either of the conditions:
- Is deployed using normal fingerprinting workflow (at least partially)
- Is deployed using no-fingerprinting workflow (at least partially)
Once you have one venue fingerprinted or deployed with no-fingerprinting, you can fake the blue dot into the venue remotely. To do this, you can use two different approaches:
Recommended: Remote testing using Faking GPS and Beacon simulation
This method can work with any apps, including IndoorAtlas Positioning (App Store and Play) and your own apps.
In this method, you need to :
On your test phone (the one which runs your app or IndoorAtlas Positioning)
- Android: Install a fake GPS (e.g. this). Configure the fake GPS app to transmit GPS coordinates of your target venue.
- iOS: run your app with Simulated location from XCode.
- Obtain UUID,major,minor of one of the beacons in your target venue. Check this guide. Note that you can use IndoorAtlas Beacon Planner to set up beacon IDs in the venue for your location simulation.
On another Android phone
- Install a beacon simulator app (e.g. this) and configure one or a few of the beacons in your venue UUID,major,minor. Transmit one of the beacons at a time.
- Note: you can simulate floor changes by first simulating beacon from Floor 1, then stop transmitting the beacon in floor 1, and start transmitting another beacon from Floor 2.
- (You can alternatively 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 somewhere nearby that beacon in the venue.
Alternative : 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);