{
    "componentChunkName": "component---src-design-system-templates-article-index-tsx",
    "path": "/blog/developers/features/contact-monitoring-mobile/",
    "result": {"data":{"contentfulComposePage":{"title":"Contact Monitoring Mobile SDK","seo":{"title":null,"description":"Learn all about our contact monitoring mobile SDK."},"content":{"author":"Sean Lin","publishDate":"Jul 27, 2020","updatedAt":"Jul 6, 2022","content":{"raw":"{\"data\":{},\"content\":[{\"data\":{\"target\":{\"sys\":{\"id\":\"6GR6c7RDo0k25R3UUAEj3n\",\"type\":\"Link\",\"linkType\":\"Asset\"}}},\"content\":[],\"nodeType\":\"embedded-asset-block\"},{\"data\":{},\"content\":[{\"data\":{},\"marks\":[],\"value\":\"We spent some time designing a mobile SDK that securely sends positioning data to our contact monitoring ingestion API. The SDK does it silently in the background, preserving battery, and sends indoor positioning data securely to our backend server. The following are the challenges we encountered when building out the SDK, specifically regarding user privacy.\",\"nodeType\":\"text\"}],\"nodeType\":\"paragraph\"},{\"data\":{},\"content\":[{\"data\":{},\"marks\":[],\"value\":\"Problem\",\"nodeType\":\"text\"}],\"nodeType\":\"heading-2\"},{\"data\":{},\"content\":[{\"data\":{},\"marks\":[{\"type\":\"bold\"}],\"value\":\"Protecting user privacy:\",\"nodeType\":\"text\"}],\"nodeType\":\"paragraph\"},{\"data\":{},\"content\":[{\"data\":{},\"marks\":[],\"value\":\"One of the main challenges of this SDK was ensuring user privacy. According to \",\"nodeType\":\"text\"},{\"data\":{\"uri\":\"https://developer.apple.com/documentation/uikit/protecting_the_user_s_privacy\"},\"content\":[{\"data\":{},\"marks\":[],\"value\":\"Apple's privacy guidelines\",\"nodeType\":\"text\"}],\"nodeType\":\"hyperlink\"},{\"data\":{},\"marks\":[],\"value\":\", an app should only request access only when the app needs the data. However, due to the nature of contact monitoring requiring constant background location updates to be actually useful, the user is required to allow permissions so that the app always provides location updates in the background.\",\"nodeType\":\"text\"}],\"nodeType\":\"paragraph\"},{\"data\":{},\"content\":[{\"data\":{},\"marks\":[],\"value\":\"To protect user privacy, we needed to use the minimum amount of data required which meant only storing and sending locations to the server when the user is actually at the venue. Fortunately for us at Mappedin we specialize in venue positioning data allowing us to accurately determine if the user is actually in the venue!\",\"nodeType\":\"text\"}],\"nodeType\":\"paragraph\"},{\"data\":{},\"content\":[{\"data\":{},\"marks\":[],\"value\":\"Approach\",\"nodeType\":\"text\"}],\"nodeType\":\"heading-2\"},{\"data\":{},\"content\":[{\"data\":{},\"marks\":[],\"value\":\"All venues generated by our mapping team in our Mappedin CMS are able to be exported in a specialized GeoJSON format called Mappedin Venue Format (MVF) which contains building and room coordinates from our CMS.\",\"nodeType\":\"text\"}],\"nodeType\":\"paragraph\"},{\"data\":{\"target\":{\"sys\":{\"id\":\"4RxfOr6fIUx1E3RRn3yoOq\",\"type\":\"Link\",\"linkType\":\"Asset\"}}},\"content\":[],\"nodeType\":\"embedded-asset-block\"},{\"data\":{},\"content\":[{\"data\":{},\"marks\":[],\"value\":\"Through our SDK, we request the venue's MVF and use the data to calculate the geometry of the venue as a polygon. Additionally, a geofence region is calculated using a \",\"nodeType\":\"text\"},{\"data\":{\"uri\":\"https://www.nayuki.io/page/smallest-enclosing-circle\"},\"content\":[{\"data\":{},\"marks\":[],\"value\":\"minimum bounding circle algorithm\",\"nodeType\":\"text\"}],\"nodeType\":\"hyperlink\"},{\"data\":{},\"marks\":[],\"value\":\". This geofence region is used to toggle locations updates, which prevents the SDK from receiving location updates in the background when the device is outside the geofence region and only turn it on when they are in the geofence region. This also helps minimize battery usage.\",\"nodeType\":\"text\"}],\"nodeType\":\"paragraph\"},{\"data\":{\"target\":{\"sys\":{\"id\":\"5yltme6MLjJALtypENJscT\",\"type\":\"Link\",\"linkType\":\"Asset\"}}},\"content\":[],\"nodeType\":\"embedded-asset-block\"},{\"data\":{},\"content\":[{\"data\":{},\"marks\":[],\"value\":\"Once location updates are turned on, the SDK will check each coordinate to determine if it is inside the venue. If it is in the venue, the location will be stored until a certain amount of time has elapsed (default is 5 minutes). It is then sent to the server in batches. This is done to prevent the number of requests sent to the server. Once the request succeeds, the locations will be \",\"nodeType\":\"text\"},{\"data\":{},\"marks\":[{\"type\":\"bold\"}],\"value\":\"deleted\",\"nodeType\":\"text\"},{\"data\":{},\"marks\":[],\"value\":\" from the device.\",\"nodeType\":\"text\"}],\"nodeType\":\"paragraph\"},{\"data\":{},\"content\":[{\"data\":{},\"marks\":[],\"value\":\"So what do we store?\",\"nodeType\":\"text\"}],\"nodeType\":\"heading-3\"},{\"data\":{},\"content\":[{\"data\":{},\"marks\":[],\"value\":\"There are two CoreData entities in our SDK, Device and Location.\",\"nodeType\":\"text\"}],\"nodeType\":\"paragraph\"},{\"data\":{},\"content\":[{\"data\":{},\"marks\":[{\"type\":\"bold\"}],\"value\":\"Device Attributes\",\"nodeType\":\"text\"}],\"nodeType\":\"paragraph\"},{\"data\":{\"target\":{\"sys\":{\"id\":\"2rXs96snYNWCuKfBgLmrOZ\",\"type\":\"Link\",\"linkType\":\"Entry\"}}},\"content\":[],\"nodeType\":\"embedded-entry-block\"},{\"data\":{},\"content\":[{\"data\":{},\"marks\":[{\"type\":\"bold\"}],\"value\":\"Location Attributes\",\"nodeType\":\"text\"}],\"nodeType\":\"paragraph\"},{\"data\":{\"target\":{\"sys\":{\"id\":\"6lOwnNAXRJARUvY1Ejd1lv\",\"type\":\"Link\",\"linkType\":\"Entry\"}}},\"content\":[],\"nodeType\":\"embedded-entry-block\"},{\"data\":{},\"content\":[{\"data\":{},\"marks\":[],\"value\":\"The device type attribute is the model of the phone and the id is a unique UUID generated the first time the SDK starts tracking the user's position. This identifier does not provide any way to determine who the user actually is and non-persistent when the app is uninstalled. The only meaningful data that may provide some identification of the user is the type attribute.\",\"nodeType\":\"text\"}],\"nodeType\":\"paragraph\"},{\"data\":{},\"content\":[{\"data\":{},\"marks\":[],\"value\":\"Conclusion\",\"nodeType\":\"text\"}],\"nodeType\":\"heading-2\"},{\"data\":{},\"content\":[{\"data\":{},\"marks\":[],\"value\":\"Maintaining user privacy is a difficult challenge when it comes to contact monitoring, however it is an essential problem to solve. If the user doesn't trust the app with their data then they're unlikely to want to install the app. Well you could enforce it on employees making it mandatory if they want to work but that level of distrust would probably only make things worse. At Mappedin we believe it is important to maintain full transparency into how your app will store and use their location data and we hope that you do the same if you're involved in the development of any of the numerous contact monitoring projects!\",\"nodeType\":\"text\"}],\"nodeType\":\"paragraph\"},{\"data\":{\"target\":{\"sys\":{\"id\":\"R7JJeEcRrTZHJroRgLZU7\",\"type\":\"Link\",\"linkType\":\"Asset\"}}},\"content\":[],\"nodeType\":\"embedded-asset-block\"},{\"data\":{},\"content\":[{\"data\":{},\"marks\":[],\"value\":\"\",\"nodeType\":\"text\"}],\"nodeType\":\"paragraph\"}],\"nodeType\":\"document\"}","references":[{"contentful_id":"6GR6c7RDo0k25R3UUAEj3n","__typename":"ContentfulAsset","description":"","file":{"url":"//images.ctfassets.net/wdjnw2prxlw8/6GR6c7RDo0k25R3UUAEj3n/6e23bec22f00c17afe6cd6c690a4e777/Screenshot_2022-06-29_at_11-11-35_https___developer.mappedin.com.png","contentType":"image/png"}},{"contentful_id":"4RxfOr6fIUx1E3RRn3yoOq","__typename":"ContentfulAsset","description":"","file":{"url":"//images.ctfassets.net/wdjnw2prxlw8/4RxfOr6fIUx1E3RRn3yoOq/0039291529865a72f13aafb479004360/image.png","contentType":"image/png"}},{"contentful_id":"5yltme6MLjJALtypENJscT","__typename":"ContentfulAsset","description":"","file":{"url":"//images.ctfassets.net/wdjnw2prxlw8/5yltme6MLjJALtypENJscT/8e47ed3ab22735ce5b8bdd414be5c231/image.png","contentType":"image/png"}},{"contentful_id":"2rXs96snYNWCuKfBgLmrOZ","__typename":"ContentfulCodeBlock","code":{"code":"extension Device {\n    @NSManaged public var authToken: String?\n    @NSManaged public var expiresAt: Date?\n    @NSManaged public var id: UUID\n    @NSManaged public var isActivated: NSNumber?\n    @NSManaged public var type: String?\n    @NSManaged public var venue: String?\n}"},"language":"Swift","settings":null},{"contentful_id":"6lOwnNAXRJARUvY1Ejd1lv","__typename":"ContentfulCodeBlock","code":{"code":"extension Location {\n    @NSManaged public var longitude: Double\n    @NSManaged public var latitude: Double\n    @NSManaged public var accuracy: Double\n    @NSManaged public var floor: Int32\n    @NSManaged public var deviceId: String\n    @NSManaged public var venueId: String\n    @NSManaged public var createdAt: Date\n    @NSManaged public var uploadStatus: Int16\n}"},"language":"Swift","settings":null},{"contentful_id":"R7JJeEcRrTZHJroRgLZU7","__typename":"ContentfulAsset","description":"","file":{"url":"//videos.ctfassets.net/wdjnw2prxlw8/R7JJeEcRrTZHJroRgLZU7/e9b4d1dc0f38180fc3e4f5bcdd21766a/SDK720.mov","contentType":"video/quicktime"}}]},"image":{"file":{"url":"//images.ctfassets.net/wdjnw2prxlw8/3NqbEg7NNUUTl8FzRyamW7/83f740a88d0e40f8ad898416da763739/image.png"}},"pdf":null,"relatedPosts":[{"title":"Open Source Contact Monitoring","slug":"contact-monitoring","content":{"__typename":"ContentfulBlogPost","author":"Ed Wei","publishDate":"Jul 28, 2020","updatedAt":"Jul 6, 2022","tags":{"category":{"name":"Developers","slug":"developers"},"topic":{"name":"Use Cases","slug":"use-cases"}},"content":{"raw":"{\"data\":{},\"content\":[{\"data\":{},\"content\":[{\"data\":{},\"marks\":[],\"value\":\"We are happy to share that we have open sourced our Contact Monitoring solution! To see how it all works under the hood and get your own system running, read on.\",\"nodeType\":\"text\"}],\"nodeType\":\"paragraph\"},{\"data\":{},\"content\":[{\"data\":{},\"marks\":[],\"value\":\"Why\",\"nodeType\":\"text\"}],\"nodeType\":\"heading-2\"},{\"data\":{},\"content\":[{\"data\":{},\"marks\":[],\"value\":\"\",\"nodeType\":\"text\"},{\"data\":{\"uri\":\"https://www.apple.com/covid19/contacttracing\"},\"content\":[{\"data\":{},\"marks\":[],\"value\":\"Apple and Google has teamed up together\",\"nodeType\":\"text\"}],\"nodeType\":\"hyperlink\"},{\"data\":{},\"marks\":[],\"value\":\" to offer a set of public contact tracing APIs that allows iOS and Android devices to be used to detect when an individual has been in contact with some who has been tested positive for COVID-19. While governments and health authorities around the world are benefiting from this technology, very little is available for the enterprise world, where employees are coming back to work, places are re-opening. With our contact monitoring solution, we can utilize indoor positioning technologies, such as \",\"nodeType\":\"text\"},{\"data\":{\"uri\":\"https://developer.apple.com/videos/play/wwdc2019/245/\"},\"content\":[{\"data\":{},\"marks\":[],\"value\":\"Apple's Indoor Maps Program\",\"nodeType\":\"text\"}],\"nodeType\":\"hyperlink\"},{\"data\":{},\"marks\":[],\"value\":\", and use that information to accurately determine contact events. We've been \",\"nodeType\":\"text\"},{\"data\":{\"uri\":\"https://info.mappedin.com/apple-maps\"},\"content\":[{\"data\":{},\"marks\":[],\"value\":\"working with Apple\",\"nodeType\":\"text\"}],\"nodeType\":\"hyperlink\"},{\"data\":{},\"marks\":[],\"value\":\" for many years, building on top this positioning technology. It would naturally be a fit here. A solution like this would benefit places like hospitals, corporate offices, manufacturing facilities, etc.\",\"nodeType\":\"text\"}],\"nodeType\":\"paragraph\"},{\"data\":{},\"content\":[{\"data\":{},\"marks\":[{\"type\":\"bold\"}],\"value\":\"Privacy\",\"nodeType\":\"text\"},{\"data\":{},\"marks\":[],\"value\":\" is an area where we feel full transparency is the ultimate solution. There's nothing better than showing all of the code that's involved in processing the data. This is why we have decided to \",\"nodeType\":\"text\"},{\"data\":{},\"marks\":[{\"type\":\"bold\"}],\"value\":\"open source\",\"nodeType\":\"text\"},{\"data\":{},\"marks\":[],\"value\":\" our solution. We've done our best to ensure there's no personal information being collected. We used generated IDs everywhere, only send data when you are on site at your venue, and you have the full power on deciding how long to retain the data in the database. You can read our documentation on \",\"nodeType\":\"text\"},{\"data\":{\"uri\":\"https://github.com/mappedin/contact-monitoring-ingest-api\"},\"content\":[{\"data\":{},\"marks\":[],\"value\":\"github\",\"nodeType\":\"text\"}],\"nodeType\":\"hyperlink\"},{\"data\":{},\"marks\":[],\"value\":\" for more information.\",\"nodeType\":\"text\"}],\"nodeType\":\"paragraph\"},{\"data\":{},\"content\":[{\"data\":{},\"marks\":[],\"value\":\"Overview\",\"nodeType\":\"text\"}],\"nodeType\":\"heading-2\"},{\"data\":{},\"content\":[{\"data\":{},\"marks\":[],\"value\":\"Below is a diagram that shows how the contact monitoring solution works.\",\"nodeType\":\"text\"}],\"nodeType\":\"paragraph\"},{\"data\":{\"target\":{\"sys\":{\"id\":\"CDwcDKa0753SBqmxlmjpn\",\"type\":\"Link\",\"linkType\":\"Asset\"}}},\"content\":[],\"nodeType\":\"embedded-asset-block\"},{\"data\":{},\"content\":[{\"data\":{},\"marks\":[],\"value\":\"We have created a \",\"nodeType\":\"text\"},{\"data\":{},\"marks\":[{\"type\":\"bold\"}],\"value\":\"mobile sdk\",\"nodeType\":\"text\"},{\"data\":{},\"marks\":[],\"value\":\" that anyone can integrate with their existing employee app. It continuously collects positioning data, but only when the device is located on site. The data is then sent to the server for processing. The server processes the events in near realtime and determines contact. And finally, we made a dashboard that can visualize the contact events.\",\"nodeType\":\"text\"}],\"nodeType\":\"paragraph\"},{\"data\":{},\"content\":[{\"data\":{},\"marks\":[],\"value\":\"There are mainly 3 components that we are open sourcing, \",\"nodeType\":\"text\"},{\"data\":{},\"marks\":[{\"type\":\"bold\"}],\"value\":\"Mobile SDK\",\"nodeType\":\"text\"},{\"data\":{},\"marks\":[],\"value\":\", \",\"nodeType\":\"text\"},{\"data\":{},\"marks\":[{\"type\":\"bold\"}],\"value\":\"Ingestion API\",\"nodeType\":\"text\"},{\"data\":{},\"marks\":[],\"value\":\", and \",\"nodeType\":\"text\"},{\"data\":{},\"marks\":[{\"type\":\"bold\"}],\"value\":\"Dashboard\",\"nodeType\":\"text\"}],\"nodeType\":\"paragraph\"},{\"data\":{},\"content\":[{\"data\":{},\"marks\":[],\"value\":\"Native Mobile SDK\",\"nodeType\":\"text\"}],\"nodeType\":\"heading-3\"},{\"data\":{},\"content\":[{\"data\":{},\"marks\":[],\"value\":\"This SDK is responsible for tapping into indoor positioning systems to get device's location data, and it does so in the background in a way that minimizes battery usage. It only collects position data \",\"nodeType\":\"text\"},{\"data\":{},\"marks\":[{\"type\":\"bold\"}],\"value\":\"while you are on site\",\"nodeType\":\"text\"},{\"data\":{},\"marks\":[],\"value\":\". Testing in our lab indicates that we consistently get accuracy of 2 meters (or 6 feet) when using Apple's Indoor Positioning System. \",\"nodeType\":\"text\"},{\"data\":{\"uri\":\"https://www.mappedin.com/contact-us/\"},\"content\":[{\"data\":{},\"marks\":[],\"value\":\"Contact us\",\"nodeType\":\"text\"}],\"nodeType\":\"hyperlink\"},{\"data\":{},\"marks\":[],\"value\":\" to get your venue indoor positioning ready.\",\"nodeType\":\"text\"}],\"nodeType\":\"paragraph\"},{\"data\":{},\"content\":[{\"data\":{},\"marks\":[],\"value\":\"To learn more about how our Contact Monitoring Mobile SDK works, \",\"nodeType\":\"text\"},{\"data\":{\"uri\":\"https://developer.mappedin.com/blog/2020-07-27-contact-monitoring-mobile/\"},\"content\":[{\"data\":{},\"marks\":[],\"value\":\"go here\",\"nodeType\":\"text\"}],\"nodeType\":\"hyperlink\"},{\"data\":{},\"marks\":[],\"value\":\".\",\"nodeType\":\"text\"}],\"nodeType\":\"paragraph\"},{\"data\":{},\"content\":[{\"data\":{},\"marks\":[],\"value\":\"Ingestion API\",\"nodeType\":\"text\"}],\"nodeType\":\"heading-3\"},{\"data\":{},\"content\":[{\"data\":{},\"marks\":[],\"value\":\"The Ingestion API is where the heart of the system is. It is responsible for collecting device location data, process it at high volume to determine contact, and store it optimally for querying by our dashboard. We went through several iterations of the design of the algorithm. You can \",\"nodeType\":\"text\"},{\"data\":{\"uri\":\"https://developer.mappedin.com/blog/2020-07-28-contact-monitoring-api/\"},\"content\":[{\"data\":{},\"marks\":[],\"value\":\"read about it here\",\"nodeType\":\"text\"}],\"nodeType\":\"hyperlink\"},{\"data\":{},\"marks\":[],\"value\":\".\",\"nodeType\":\"text\"}],\"nodeType\":\"paragraph\"},{\"data\":{},\"content\":[{\"data\":{},\"marks\":[],\"value\":\"Dashboard\",\"nodeType\":\"text\"}],\"nodeType\":\"heading-3\"},{\"data\":{},\"content\":[{\"data\":{},\"marks\":[],\"value\":\"The dashboard is where all the contact monitoring information is surfaced. It queries the processed data and provides visualizations that uses Mappedin's indoor maps. \",\"nodeType\":\"text\"},{\"data\":{\"uri\":\"https://www.mappedin.com/contact-us/\"},\"content\":[{\"data\":{},\"marks\":[],\"value\":\"Contact us\",\"nodeType\":\"text\"}],\"nodeType\":\"hyperlink\"},{\"data\":{},\"marks\":[],\"value\":\" to get a map created for you.\",\"nodeType\":\"text\"}],\"nodeType\":\"paragraph\"},{\"data\":{\"target\":{\"sys\":{\"id\":\"VAtrLwrNUbT1vB4g0ADSU\",\"type\":\"Link\",\"linkType\":\"Asset\"}}},\"content\":[],\"nodeType\":\"embedded-asset-block\"},{\"data\":{},\"content\":[{\"data\":{},\"marks\":[],\"value\":\"Some functionalities of the dashboard include:\",\"nodeType\":\"text\"}],\"nodeType\":\"paragraph\"},{\"data\":{},\"content\":[{\"data\":{},\"content\":[{\"data\":{},\"content\":[{\"data\":{},\"marks\":[],\"value\":\"List detail view & map detail view\",\"nodeType\":\"text\"}],\"nodeType\":\"paragraph\"}],\"nodeType\":\"list-item\"},{\"data\":{},\"content\":[{\"data\":{},\"content\":[{\"data\":{},\"marks\":[],\"value\":\"Contact events are aggregated as you zoom out of the map and disperse as you zoom in\",\"nodeType\":\"text\"}],\"nodeType\":\"paragraph\"}],\"nodeType\":\"list-item\"},{\"data\":{},\"content\":[{\"data\":{},\"content\":[{\"data\":{},\"marks\":[],\"value\":\"When an event is selected, a summary of that event displays\",\"nodeType\":\"text\"}],\"nodeType\":\"paragraph\"}],\"nodeType\":\"list-item\"},{\"data\":{},\"content\":[{\"data\":{},\"content\":[{\"data\":{},\"marks\":[],\"value\":\"An event is placed at the location where the interaction started\",\"nodeType\":\"text\"}],\"nodeType\":\"paragraph\"}],\"nodeType\":\"list-item\"}],\"nodeType\":\"unordered-list\"},{\"data\":{},\"content\":[{\"data\":{},\"marks\":[],\"value\":\"Get started on running your own Contact Monitoring system\",\"nodeType\":\"text\"}],\"nodeType\":\"heading-3\"},{\"data\":{},\"content\":[{\"data\":{},\"marks\":[],\"value\":\"Head on over to our github pages.\",\"nodeType\":\"text\"}],\"nodeType\":\"paragraph\"},{\"data\":{},\"content\":[{\"data\":{},\"marks\":[],\"value\":\"\",\"nodeType\":\"text\"},{\"data\":{\"uri\":\"https://github.com/mappedin/contact-monitoring-ios-sdk\"},\"content\":[{\"data\":{},\"marks\":[],\"value\":\"iOS Contact Monitoring SDK\",\"nodeType\":\"text\"}],\"nodeType\":\"hyperlink\"},{\"data\":{},\"marks\":[],\"value\":\"\\n\",\"nodeType\":\"text\"},{\"data\":{\"uri\":\"https://github.com/mappedin/contact-monitoring-ingest-api\"},\"content\":[{\"data\":{},\"marks\":[],\"value\":\"Contact Monitoring Ingest API\",\"nodeType\":\"text\"}],\"nodeType\":\"hyperlink\"},{\"data\":{},\"marks\":[],\"value\":\"\\n\",\"nodeType\":\"text\"},{\"data\":{\"uri\":\"https://github.com/mappedin/contact-monitoring-dashboard\"},\"content\":[{\"data\":{},\"marks\":[],\"value\":\"Contact Monitoring Dashboard\",\"nodeType\":\"text\"}],\"nodeType\":\"hyperlink\"},{\"data\":{},\"marks\":[],\"value\":\"\",\"nodeType\":\"text\"}],\"nodeType\":\"paragraph\"}],\"nodeType\":\"document\"}"},"articleType":"Dev Content","image":{"fluid":{"base64":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAOCAIAAACgpqunAAABPGlDQ1BpY2MAAHjarY6/SwJhGICfLy0tkRout+DAQQKNuhyKhjAHCRpEBH9MneelwWUf50EFtUV/QrS0NrU1SJv0FwRFRXO0RYPgknINV2lLU8/yPjy88L4wMqVLafmBnYZj5zJrarFUVgOvjDFDkCViutGUqWx2A+B7/qb7gAC4S+hSWuel25Pc1crb9GRo9V0mqvzNRNVsGkAPMAxpOyA2geieIx0Qx4BiF0tlEGeAUvP8ElAqnrcBxc7n0iDugSmjrldBvADxylCvDfnXXYBxLZnRCguZJP+MY+47AOldeWBv1+qOmpLSMtX1hjEXV7V5TYNiqax6250nBCAiwUE7jMLyEfjMQcu14DoC4eagxXoQtuAmL3Vb/3lAdP3NrUXN81ALRk9dt1OAwCz0H133o+W6/QvwPUO7+wmwI11jwHnLJwAAAAlwSFlzAAAXEQAAFxEByibzPwAAAAd0SU1FB+YJHRMcI/najgoAAALDSURBVBgZLcHNbhtVFADge8+5d+bOjMeOHedPlZJCSOQqZNFs+gRFLNjwCDwIW7Y8AjsWIBBrWCNVQk0jUkVNnJLUqR07jV2Pxx7P3L9DhPg+/tvPPzHG4jQlxr797vsFNrPJhMcpk+jyjJVzZpec3DdfPz980un1ej/+8mtVaeOd9x6CKAqUkoGK4vSo8wnFzVAgEaEKHYGXMQtSFjVP374n76y1CICIAvABEBcoAhAhSrWz27HjG4wbMQrtAh4lJEISISM6vezJuBYltSSJlQoFIgDgTf/24OAQhPz9z1d348V00NXJBhVZqGKspcwZQOaN8Z5troSb62sPVtttISVjhKsh5OP7nbuTH/74azgadXa37nRQzKZa67jRBO78g6pk3i/z6dHnHQ7w+s15t9s1VQmPW0kxvH47HO3Vqmd77S++/GrxoWedcU7bRWGlImNkoKJAdnvDj1l2enb28vjVbL4YZ7mYLG0SULY0SRztP+gcNLAarT7i40ExGQA54GSNseQ4Bi9enlx0L7Qx3nvGGNTraUMFl/dFAk4KNI4O93dRSCAbpC259yRuNUSiUIVciOOzi1k+5+x/wAEc0Woky7LM8/nJ+U1z61NY3HOV6OmtuTrXBMwTLwsyVV4sgRHnnP1HIACHAAUPOBv134+TEYbpip/PMPZ67mZ5OdLMWylQoADgSVrnWBjnnDHCGUORcuC9NdVsukKOQGyvNa+6Z6FSGkNHIYHQlWaMEDwRhUpFKAX3oh7JOIRWq72cz0pmTdZn1n+2/XizFtx9nFjrOOdRFAkhrLXaaADw1mljrLUi54qC5PjvS2JMG/vo+t3+1lrIHM6X//QntVZ7e3tnY329d311O+g3Go3B7VBKUZYVcM6Pnj6VUs6LpVKKMaa1cc467x15ZwxwDhyEwHZzJa3X1zc2sywbDAaV1t77fwFCDootIOUo1AAAABJ0RVh0ZXhpZjpFeGlmT2Zmc2V0ADI2UxuiZQAAABl0RVh0ZXhpZjpQaXhlbFhEaW1lbnNpb24ANTU3NXEcx3AAAAAZdEVYdGV4aWY6UGl4ZWxZRGltZW5zaW9uADM5MjNwgutQAAAAKHRFWHRpY2M6Y29weXJpZ2h0AENvcHlyaWdodCBBcHBsZSBJbmMuLCAyMDIy5LS/nAAAABh0RVh0aWNjOmRlc2NyaXB0aW9uADI0RzJXMUc0qa0vjAAAAABJRU5ErkJggg==","aspectRatio":1.4211062962018863,"src":"//images.ctfassets.net/wdjnw2prxlw8/46WIUSrjNwDxcBLgYdaXWL/6119e327ffa037fccc07d089b031ff8a/image.png?w=480&q=50","srcSet":"//images.ctfassets.net/wdjnw2prxlw8/46WIUSrjNwDxcBLgYdaXWL/6119e327ffa037fccc07d089b031ff8a/image.png?w=120&h=84&q=50 120w,\n//images.ctfassets.net/wdjnw2prxlw8/46WIUSrjNwDxcBLgYdaXWL/6119e327ffa037fccc07d089b031ff8a/image.png?w=240&h=169&q=50 240w,\n//images.ctfassets.net/wdjnw2prxlw8/46WIUSrjNwDxcBLgYdaXWL/6119e327ffa037fccc07d089b031ff8a/image.png?w=480&h=338&q=50 480w,\n//images.ctfassets.net/wdjnw2prxlw8/46WIUSrjNwDxcBLgYdaXWL/6119e327ffa037fccc07d089b031ff8a/image.png?w=720&h=507&q=50 720w,\n//images.ctfassets.net/wdjnw2prxlw8/46WIUSrjNwDxcBLgYdaXWL/6119e327ffa037fccc07d089b031ff8a/image.png?w=960&h=676&q=50 960w,\n//images.ctfassets.net/wdjnw2prxlw8/46WIUSrjNwDxcBLgYdaXWL/6119e327ffa037fccc07d089b031ff8a/image.png?w=1440&h=1013&q=50 1440w","sizes":"(max-width: 480px) 100vw, 480px"}}}},{"title":"Contact Monitoring Ingestion API","slug":"contact-monitoring-api","content":{"__typename":"ContentfulBlogPost","author":"Brad Harris","publishDate":"Jul 27, 2020","updatedAt":"Jul 6, 2022","tags":{"category":{"name":"Developers","slug":"developers"},"topic":{"name":"Features","slug":"features"}},"content":{"raw":"{\"nodeType\":\"document\",\"data\":{},\"content\":[{\"nodeType\":\"embedded-asset-block\",\"data\":{\"target\":{\"sys\":{\"id\":\"5wLc7oWRsgH6o8dSX0wv2d\",\"type\":\"Link\",\"linkType\":\"Asset\"}}},\"content\":[]},{\"nodeType\":\"paragraph\",\"data\":{},\"content\":[{\"nodeType\":\"text\",\"value\":\"We've spent several iterations figuring out how to solve the problem of determining two devices that are within 5 meters of each another for a minimum duration of 5 minutes. That's how we define a \\\"contact\\\" event. This is the thought process and the challenges we faced when designing the system.\",\"marks\":[],\"data\":{}}]},{\"nodeType\":\"heading-2\",\"data\":{},\"content\":[{\"nodeType\":\"text\",\"value\":\"Problem\",\"marks\":[],\"data\":{}}]},{\"nodeType\":\"paragraph\",\"data\":{},\"content\":[{\"nodeType\":\"text\",\"value\":\"Input into the system: \",\"marks\":[{\"type\":\"bold\"}],\"data\":{}},{\"nodeType\":\"text\",\"value\":\"Spatial and temporal data of devices that indicates the position of a device, accuracy radius of the position in meters, timestamp when the position was recorded.\",\"marks\":[],\"data\":{}}]},{\"nodeType\":\"paragraph\",\"data\":{},\"content\":[{\"nodeType\":\"text\",\"value\":\"For example:\",\"marks\":[],\"data\":{}}]},{\"nodeType\":\"embedded-entry-block\",\"data\":{\"target\":{\"sys\":{\"id\":\"3Z9c76XwLQtTcPWiMWC5gR\",\"type\":\"Link\",\"linkType\":\"Entry\"}}},\"content\":[]},{\"nodeType\":\"paragraph\",\"data\":{},\"content\":[{\"nodeType\":\"text\",\"value\":\"Query\",\"marks\":[{\"type\":\"bold\"}],\"data\":{}},{\"nodeType\":\"text\",\"value\":\": Given a device id, a timed window represented by a start and end date time, and a proximity in meters (5m in requirement).\",\"marks\":[],\"data\":{}}]},{\"nodeType\":\"paragraph\",\"data\":{},\"content\":[{\"nodeType\":\"text\",\"value\":\"Output\",\"marks\":[{\"type\":\"bold\"}],\"data\":{}},{\"nodeType\":\"text\",\"value\":\": A list of devices along with their spatial and temporal data that were \\ndeemed to have contacted, ie. come within the proximity of, while taking the accuracy radius into account, the queried device, for 5 minutes or more.\",\"marks\":[],\"data\":{}}]},{\"nodeType\":\"heading-2\",\"data\":{},\"content\":[{\"nodeType\":\"text\",\"value\":\"Problem Breakdown\",\"marks\":[],\"data\":{}}]},{\"nodeType\":\"paragraph\",\"data\":{},\"content\":[{\"nodeType\":\"text\",\"value\":\"Since we want to be able to show how many contacts each device/person has, this pretty much requires that the proximity relationships between everyone and everyone else be aggregated at run time.\",\"marks\":[],\"data\":{}}]},{\"nodeType\":\"paragraph\",\"data\":{},\"content\":[{\"nodeType\":\"text\",\"value\":\"The problem can then possibly be broken down into 2 parts.\",\"marks\":[],\"data\":{}}]},{\"nodeType\":\"ordered-list\",\"data\":{},\"content\":[{\"nodeType\":\"list-item\",\"data\":{},\"content\":[{\"nodeType\":\"paragraph\",\"data\":{},\"content\":[{\"nodeType\":\"text\",\"value\":\"Normalizing each piece of position by time and space, since\",\"marks\":[],\"data\":{}}]},{\"nodeType\":\"ordered-list\",\"data\":{},\"content\":[{\"nodeType\":\"list-item\",\"data\":{},\"content\":[{\"nodeType\":\"paragraph\",\"data\":{},\"content\":[{\"nodeType\":\"text\",\"value\":\"the location data is not collected at exactly the same time between all devices, we can only determine contact by loosely matching on fixed time window\",\"marks\":[],\"data\":{}}]}]},{\"nodeType\":\"list-item\",\"data\":{},\"content\":[{\"nodeType\":\"paragraph\",\"data\":{},\"content\":[{\"nodeType\":\"text\",\"value\":\"reported position is not guaranteed to be always accurate, some can be discard if they have too low of accuracy \",\"marks\":[],\"data\":{}}]}]}]},{\"nodeType\":\"paragraph\",\"data\":{},\"content\":[{\"nodeType\":\"text\",\"value\":\"The purpose is to return a list of contact relationships (who is in proximity of whom in a given time window) between two devices. \",\"marks\":[],\"data\":{}}]}]},{\"nodeType\":\"list-item\",\"data\":{},\"content\":[{\"nodeType\":\"paragraph\",\"data\":{},\"content\":[{\"nodeType\":\"text\",\"value\":\"Given the list of contact relationships between any two devices in each time window, track and aggregate them, while keeping track of the duration of the aggregation.\",\"marks\":[],\"data\":{}}]}]}]},{\"nodeType\":\"heading-2\",\"data\":{},\"content\":[{\"nodeType\":\"text\",\"value\":\"Approaches\",\"marks\":[],\"data\":{}}]},{\"nodeType\":\"paragraph\",\"data\":{},\"content\":[{\"nodeType\":\"text\",\"value\":\"Due to potentially significantly large number of position data being ingested (1000 employees at a venue each updating location once a minute = 1000 * 60 * 24 = 1.44 million position records a day), it is not realistic for the system to query such a large dataset directly. We’d have to aggregate this data first.\",\"marks\":[],\"data\":{}}]},{\"nodeType\":\"heading-3\",\"data\":{},\"content\":[{\"nodeType\":\"text\",\"value\":\"Universal Grid Approach\",\"marks\":[],\"data\":{}}]},{\"nodeType\":\"paragraph\",\"data\":{},\"content\":[{\"nodeType\":\"text\",\"value\":\"First from the spatial perspective, model the world as a large map and create a grid using WGS84 coordinates. At the equator, 0.00001 degrees is approximately 1.1m in length, so we can divide the world into approximately 1m^2 sections. \",\"marks\":[],\"data\":{}}]},{\"nodeType\":\"paragraph\",\"data\":{},\"content\":[{\"nodeType\":\"text\",\"value\":\"Then each position data’s coordinates are truncated to 5 decimal places, and stored under the corresponding “section”. When there are position data for multiple devices stored within the same section, we can loosely say that they are within 1 meter proximity of each other.\",\"marks\":[],\"data\":{}}]},{\"nodeType\":\"paragraph\",\"data\":{},\"content\":[{\"nodeType\":\"text\",\"value\":\"Taking the accuracy radius and the contact proximity parameter into account, the system can increase the contact zone around the original coordinates by expanding surrounding grid sections, 1 meter per section each direction, and when two contact zones overlap, by the same logic, the overlapping parts would be represented by having position data from two devices sharing the same grid sections.\",\"marks\":[],\"data\":{}}]},{\"nodeType\":\"paragraph\",\"data\":{},\"content\":[{\"nodeType\":\"text\",\"value\":\"Illustration showing how a device is within 5 meter proximity of another device, by marking their positions on a grid map, where the red dots represent the infected device’s position with a 2 meter accuracy, the yellow dots (should fill up the rest of the space within the red circle) represent a 5 meter radius proximity around the infected but are still duplicates of the red dots, and the blue dots represent the position a nearby device with a 3 meter accuracy that is potentially within the infected device’s exposure zone.\",\"marks\":[],\"data\":{}}]},{\"nodeType\":\"embedded-asset-block\",\"data\":{\"target\":{\"sys\":{\"id\":\"5KJZMO7rnMm6MQrurj5c4G\",\"type\":\"Link\",\"linkType\":\"Asset\"}}},\"content\":[]},{\"nodeType\":\"paragraph\",\"data\":{},\"content\":[{\"nodeType\":\"text\",\"value\":\"With this understanding, when position data for a device is ingested, the same position data can be duplicated to cover the whole accuracy and proximity radius and persisted in the data store indexed by the respective coordinates truncated to the 5th decimal place. And a “contact event” is derived when two position data occupy the same position. \",\"marks\":[],\"data\":{}}]},{\"nodeType\":\"paragraph\",\"data\":{},\"content\":[{\"nodeType\":\"text\",\"value\":\"While the above approach illustrates the idea, it will blindly apply the 5 meter proximity radius to all position data ingested and can create false positives when two devices are in fact 10 meters apart. Therefore the proximity value should be decreased to 2.5 meters (or 3m, since the grid unit is 1m) so that the max proximity is still 5 meters.\",\"marks\":[],\"data\":{}}]},{\"nodeType\":\"embedded-asset-block\",\"data\":{\"target\":{\"sys\":{\"id\":\"7ES8VZusPm4uN28ee7swPu\",\"type\":\"Link\",\"linkType\":\"Asset\"}}},\"content\":[]},{\"nodeType\":\"paragraph\",\"data\":{},\"content\":[{\"nodeType\":\"text\",\"value\":\"So far with this approach we are able to deduce the spatial side of the problem, ie. given the position of a device of someone reported as infected (the red and pink dots), what other devices are nearby in proximity (dots also shared by other devices).\",\"marks\":[],\"data\":{}}]},{\"nodeType\":\"paragraph\",\"data\":{},\"content\":[{\"nodeType\":\"text\",\"value\":\"Problem:\",\"marks\":[{\"type\":\"bold\"}],\"data\":{}}]},{\"nodeType\":\"ordered-list\",\"data\":{},\"content\":[{\"nodeType\":\"list-item\",\"data\":{},\"content\":[{\"nodeType\":\"paragraph\",\"data\":{},\"content\":[{\"nodeType\":\"text\",\"value\":\"Sheer number of dots to update for each position event.\",\"marks\":[],\"data\":{}}]}]},{\"nodeType\":\"list-item\",\"data\":{},\"content\":[{\"nodeType\":\"paragraph\",\"data\":{},\"content\":[{\"nodeType\":\"text\",\"value\":\"The distance of 0.00001 degrees decreases in latitude the further we're away from the equator (at 45 degrees N it is 0.78m), so accounting for that will add more complexity.\",\"marks\":[],\"data\":{}}]}]},{\"nodeType\":\"list-item\",\"data\":{},\"content\":[{\"nodeType\":\"paragraph\",\"data\":{},\"content\":[{\"nodeType\":\"text\",\"value\":\"Rounding 2.5m to 3m for proximity effectively makes it a 6m proximity.\",\"marks\":[],\"data\":{}}]}]}]},{\"nodeType\":\"heading-3\",\"data\":{},\"content\":[{\"nodeType\":\"text\",\"value\":\"MongoDB/Postgres (PostGIS) Geospatial Queries\",\"marks\":[],\"data\":{}}]},{\"nodeType\":\"paragraph\",\"data\":{},\"content\":[{\"nodeType\":\"text\",\"value\":\"Another potential way is to use MongoDB’s or Postgres with the PostGIS extension geospatial indexed queries. The position events could be stored as circles/polygons and then the DB could be queried to return other polygons that are within the proximity radius.\",\"marks\":[],\"data\":{}}]},{\"nodeType\":\"paragraph\",\"data\":{},\"content\":[{\"nodeType\":\"text\",\"value\":\"Problem:\",\"marks\":[{\"type\":\"bold\"}],\"data\":{}},{\"nodeType\":\"text\",\"value\":\" It is a lot of coordinates to store. For a multi tenant system with millions of events per tenant per day, long term scalability is a concern.\",\"marks\":[],\"data\":{}}]},{\"nodeType\":\"heading-3\",\"data\":{},\"content\":[{\"nodeType\":\"text\",\"value\":\"Pre-calculated Bounding Box and Filter\",\"marks\":[],\"data\":{}}]},{\"nodeType\":\"embedded-asset-block\",\"data\":{\"target\":{\"sys\":{\"id\":\"3g195amOQf2CXMyDZqT0Uc\",\"type\":\"Link\",\"linkType\":\"Asset\"}}},\"content\":[]},{\"nodeType\":\"blockquote\",\"data\":{},\"content\":[{\"nodeType\":\"paragraph\",\"data\":{},\"content\":[{\"nodeType\":\"text\",\"value\":\"Picture illustrating the approach described, where the red dot is the position event in question, orange dots are the position events within proximity and the green are ones queried but out of proximity.\",\"marks\":[],\"data\":{}}]}]},{\"nodeType\":\"paragraph\",\"data\":{},\"content\":[{\"nodeType\":\"text\",\"value\":\"We know that the maximum distance when two points can be considered “in proximity” is\",\"marks\":[],\"data\":{}}]},{\"nodeType\":\"paragraph\",\"data\":{},\"content\":[{\"nodeType\":\"text\",\"value\":\"Therefore if we can query for all the points within this (acc + 9m) radius it should guarantee to contain at least all the points in proximity. From there all we need to do is filter out the ones that are actually not in proximity, ie. after subtracting accuracy values from both points, the distance is greater than 5m (\",\"marks\":[],\"data\":{}},{\"nodeType\":\"text\",\"value\":\"distance - acc1 - acc2 > 5m\",\"marks\":[{\"type\":\"bold\"}],\"data\":{}},{\"nodeType\":\"text\",\"value\":\").\",\"marks\":[],\"data\":{}}]},{\"nodeType\":\"paragraph\",\"data\":{},\"content\":[{\"nodeType\":\"text\",\"value\":\"The advantage of this is that we only need to store points, and two options to query this data.\",\"marks\":[],\"data\":{}}]},{\"nodeType\":\"ordered-list\",\"data\":{},\"content\":[{\"nodeType\":\"list-item\",\"data\":{},\"content\":[{\"nodeType\":\"paragraph\",\"data\":{},\"content\":[{\"nodeType\":\"text\",\"value\":\"Mongo/Postgres geospatial queries: Less data, computation is done on DB side, we’re unsure about performance when data scales up in a multi-tenant centralized system. But for a system that contains only a single tenant this should be sufficient.\",\"marks\":[],\"data\":{}}]}]},{\"nodeType\":\"list-item\",\"data\":{},\"content\":[{\"nodeType\":\"paragraph\",\"data\":{},\"content\":[{\"nodeType\":\"text\",\"value\":\"Cassandra/Scylla: It doesn’t support geospatial queries, so we can’t really query for everything within a circular radius, but querying for a bounding box is a lot simpler, it would require us pre-calculating the min and max lat/lon values of the bounding box and then it’s simply a matter of querying for everything within a lat/lon range. There will likely be more points returned due to a larger search area, but the extra computation in calculating distance is likely going to be insignificant.\\nDue to the nature of the data (volume and throughput), Cassandra or Scylla DB makes a lot of sense since we’d only be inserting and reading, not updating.\",\"marks\":[],\"data\":{}}]}]}]},{\"nodeType\":\"heading-2\",\"data\":{},\"content\":[{\"nodeType\":\"text\",\"value\":\"Contact Event Aggregation\",\"marks\":[],\"data\":{}}]},{\"nodeType\":\"paragraph\",\"data\":{},\"content\":[{\"nodeType\":\"text\",\"value\":\"To factor in the temporal aspect, since it is unlikely that two position data will be created at the exact same time, there will also need to be a time threshold for contact. To simplify the problem, the timestamp of each position data can be truncated down to the minute and all data within the minute is then bucketed to the same minute bucket.\",\"marks\":[],\"data\":{}}]},{\"nodeType\":\"paragraph\",\"data\":{},\"content\":[{\"nodeType\":\"text\",\"value\":\"Combined with one of the above approaches to associate spatial relationships, we can identify a contact in a particular minute time slice. A naive algorithm to aggregate each one minute contact event is to store each contact event at time T, starting with duration of 1 minute, but before inserting, check if there’s a contact event that ends with T-1min as well as event starting at T+1min, and if so, merge the events, increment the duration and delete the obsolete events.\",\"marks\":[],\"data\":{}}]},{\"nodeType\":\"paragraph\",\"data\":{},\"content\":[{\"nodeType\":\"text\",\"value\":\"Risks and downsides:\",\"marks\":[],\"data\":{}}]},{\"nodeType\":\"ordered-list\",\"data\":{},\"content\":[{\"nodeType\":\"list-item\",\"data\":{},\"content\":[{\"nodeType\":\"paragraph\",\"data\":{},\"content\":[{\"nodeType\":\"text\",\"value\":\"To alter the proximity value from 5m would require all position data to be reprocessed.\",\"marks\":[],\"data\":{}}]}]},{\"nodeType\":\"list-item\",\"data\":{},\"content\":[{\"nodeType\":\"paragraph\",\"data\":{},\"content\":[{\"nodeType\":\"text\",\"value\":\"This assumes position data is updated at least once a minute.\",\"marks\":[],\"data\":{}}]}]},{\"nodeType\":\"list-item\",\"data\":{},\"content\":[{\"nodeType\":\"paragraph\",\"data\":{},\"content\":[{\"nodeType\":\"text\",\"value\":\"Accuracy of the position data - we will need to discard data with low accuracy (high accuracy radius), and this may result in data disjointed in time ( {\",\"marks\":[],\"data\":{}},{\"nodeType\":\"text\",\"value\":\"<\",\"marks\":[{\"type\":\"code\"},{\"type\":\"bold\"}],\"data\":{}},{\"nodeType\":\"text\",\"value\":\"}5 minute sequence)\",\"marks\":[],\"data\":{}}]}]},{\"nodeType\":\"list-item\",\"data\":{},\"content\":[{\"nodeType\":\"paragraph\",\"data\":{},\"content\":[{\"nodeType\":\"text\",\"value\":\"Proximity zones do not consider walls.\",\"marks\":[],\"data\":{}}]}]}]},{\"nodeType\":\"heading-2\",\"data\":{},\"content\":[{\"nodeType\":\"text\",\"value\":\"Architecture diagrams\",\"marks\":[],\"data\":{}}]},{\"nodeType\":\"heading-3\",\"data\":{},\"content\":[{\"nodeType\":\"text\",\"value\":\"Initial backend architecture\",\"marks\":[],\"data\":{}}]},{\"nodeType\":\"paragraph\",\"data\":{},\"content\":[{\"nodeType\":\"text\",\"value\":\"Initially for the backend, everything will be done within one service.\",\"marks\":[],\"data\":{}}]},{\"nodeType\":\"ordered-list\",\"data\":{},\"content\":[{\"nodeType\":\"list-item\",\"data\":{},\"content\":[{\"nodeType\":\"paragraph\",\"data\":{},\"content\":[{\"nodeType\":\"text\",\"value\":\"The device sends position updates to the ingestion API in batches by HTTP POST.\",\"marks\":[],\"data\":{}}]}]},{\"nodeType\":\"list-item\",\"data\":{},\"content\":[{\"nodeType\":\"paragraph\",\"data\":{},\"content\":[{\"nodeType\":\"text\",\"value\":\"Server discards position events with accuracy larger than 4 meters, inserts position events to the database. There can only be one position event per device per minute, anything more than one will also be discarded.\",\"marks\":[],\"data\":{}}]}]},{\"nodeType\":\"list-item\",\"data\":{},\"content\":[{\"nodeType\":\"paragraph\",\"data\":{},\"content\":[{\"nodeType\":\"text\",\"value\":\"The server queries the database for position events from other devices within that minute with latlon within a bounding box that surrounds a proximity radius (accuracy+5m proximity+4m max accuracy) defined by the bottom left (lower limit) and upper right (upper limit) coordinates.\",\"marks\":[],\"data\":{}}]}]},{\"nodeType\":\"list-item\",\"data\":{},\"content\":[{\"nodeType\":\"paragraph\",\"data\":{},\"content\":[{\"nodeType\":\"text\",\"value\":\"Filter the position events that are too far.\",\"marks\":[],\"data\":{}}]}]},{\"nodeType\":\"list-item\",\"data\":{},\"content\":[{\"nodeType\":\"paragraph\",\"data\":{},\"content\":[{\"nodeType\":\"text\",\"value\":\"For each “position event” to “position event within proximity” pair, create a minute aggregate, and create a contact event of one minute. Look up immediate contact events prior and after and merge and extend as necessary.\",\"marks\":[],\"data\":{}}]}]},{\"nodeType\":\"list-item\",\"data\":{},\"content\":[{\"nodeType\":\"paragraph\",\"data\":{},\"content\":[{\"nodeType\":\"text\",\"value\":\"The dashboard backend retrieves the contact events with duration at least 5 minutes.\",\"marks\":[],\"data\":{}}]}]}]},{\"nodeType\":\"embedded-asset-block\",\"data\":{\"target\":{\"sys\":{\"id\":\"4SulsjoBXYrVnNmaJiHP1o\",\"type\":\"Link\",\"linkType\":\"Asset\"}}},\"content\":[]},{\"nodeType\":\"heading-3\",\"data\":{},\"content\":[{\"nodeType\":\"text\",\"value\":\"Longer term\",\"marks\":[],\"data\":{}}]},{\"nodeType\":\"embedded-asset-block\",\"data\":{\"target\":{\"sys\":{\"id\":\"5XHpoIh8YzdjRq0hccudwT\",\"type\":\"Link\",\"linkType\":\"Asset\"}}},\"content\":[]},{\"nodeType\":\"unordered-list\",\"data\":{},\"content\":[{\"nodeType\":\"list-item\",\"data\":{},\"content\":[{\"nodeType\":\"paragraph\",\"data\":{},\"content\":[{\"nodeType\":\"text\",\"value\":\"gRPC is more efficient than traditional HTTP methods\",\"marks\":[],\"data\":{}}]},{\"nodeType\":\"unordered-list\",\"data\":{},\"content\":[{\"nodeType\":\"list-item\",\"data\":{},\"content\":[{\"nodeType\":\"paragraph\",\"data\":{},\"content\":[{\"nodeType\":\"text\",\"value\":\"HTTP/2: one long lived connection between client and server\",\"marks\":[],\"data\":{}}]}]},{\"nodeType\":\"list-item\",\"data\":{},\"content\":[{\"nodeType\":\"paragraph\",\"data\":{},\"content\":[{\"nodeType\":\"text\",\"value\":\"Protocol buffers (binary data) is lightweight compared to JSON\",\"marks\":[],\"data\":{}}]}]}]}]},{\"nodeType\":\"list-item\",\"data\":{},\"content\":[{\"nodeType\":\"paragraph\",\"data\":{},\"content\":[{\"nodeType\":\"text\",\"value\":\"Kafka for position events for asynchronous throughput.\",\"marks\":[],\"data\":{}}]}]},{\"nodeType\":\"list-item\",\"data\":{},\"content\":[{\"nodeType\":\"paragraph\",\"data\":{},\"content\":[{\"nodeType\":\"text\",\"value\":\"Kafka for minute aggregates. Concurrent inserts of contact events between two devices could lead to single minute events that are unmerged. This can be alleviated by making sure only the events for any two devices are handled by only one process with proper partitioning in kafka.\",\"marks\":[],\"data\":{}}]}]}]},{\"nodeType\":\"blockquote\",\"data\":{},\"content\":[{\"nodeType\":\"paragraph\",\"data\":{},\"content\":[{\"nodeType\":\"text\",\"value\":\"Due to time constraint we actually only used MongoDB for the short term solution due to ease of getting started. And due to imitation of data partitioning in the server code for proof of concept, this means the server code can only be run in a single instance.\",\"marks\":[],\"data\":{}}]}]},{\"nodeType\":\"heading-2\",\"data\":{},\"content\":[{\"nodeType\":\"text\",\"value\":\"Load testing\",\"marks\":[],\"data\":{}}]},{\"nodeType\":\"paragraph\",\"data\":{},\"content\":[{\"nodeType\":\"text\",\"value\":\"In order to test our architecture for performance and scale, we developed a fake data generator that can simulate devices continuously send data to the ingest api for processing. We simulated 1000 devices sending their position every 15 seconds to load test our initial architecture. We were able to process the data in realtime without any issues. We then built a simple visualizer that inspects the results of the processed data.\",\"marks\":[],\"data\":{}}]},{\"nodeType\":\"embedded-asset-block\",\"data\":{\"target\":{\"sys\":{\"id\":\"4t1sbIjYv1zPd6x716M5Cr\",\"type\":\"Link\",\"linkType\":\"Asset\"}}},\"content\":[]},{\"nodeType\":\"blockquote\",\"data\":{},\"content\":[{\"nodeType\":\"paragraph\",\"data\":{},\"content\":[{\"nodeType\":\"text\",\"value\":\"The circles represent a position sent by the device. The position is never a dot since every position data returned by mobile devices has an accuracy. The size of the circle represents the accuracy of the position. A red line between two circles indicates that the system has determined a contact event has happened.\",\"marks\":[],\"data\":{}}]}]},{\"nodeType\":\"paragraph\",\"data\":{},\"content\":[{\"nodeType\":\"text\",\"value\":\"\",\"marks\":[],\"data\":{}}]}]}"},"articleType":"Dev Content","image":{"fluid":{"base64":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAANCAMAAACejr5sAAABN2lDQ1BpY2MAAHjaY2BgEkgsKMhhYWBgyM0rKQpyd1KIiIxSYH/GwMYgy8DBYMGgnphcXOAYEOADVMIAo1HBt2sMjCD6si7IrLmRF9qCNlu/FeXntn9foJvCgB9wpaQWJwPpP0CcnFxQVMLAwJgAZCuXlxSA2C1AtkgR0FFA9gwQOx3CXgNiJ0HYB8BqQoKcgewrQLZAckYi0F7GJ0C2ThKSeDoSG2ovCHAambgbhRu6mzBQGZSkVpSAaOf8gsqizPSMEgVHYAilKnjmJevpKBgZGBkxMIDCG6L68w1wODKKcSDEapQZGCxrGRiYUxFiQdsZGHaKMTDwFiPE1IHhx5vDwHAopCCxKBHuAMZvLMVpxkYQNjdQH+u0//8/hzMwsGsyMPy9/v//7+3///9dBjT/FgPDgW8AsCNdY3Mb3eoAAAKgUExURQ4nOThHXXVwfaKSmbenqryjnsSspsOuqLKemo2DhlFaZxIlMxAnOAseLQ8hMAodLAkaKAgbKggbKQ4jMik4R09RXGddYY12T6OJT6KKUXpnX2BXWkVKUjU/OSEuJiAxOhIkMCQxPR0tORotOw4fLQsbJw4cJAsfLyI5Syo8TSg0PzA3LlZUJUBDKCgyMQ8lNwgnOwoeLAsiMA8fJxYpMRsrNhEhLQ0gLw0eKg8kMgsbKAshNgshMQwdKBwqJCIvJBooJR0qJAscKAcdLQceMAcdLw0eKRMmMRspNBIjLwwdLA0eKAwaJQoaKBIuQBIuPw8gJyo4KhopJggcKwYeMAobKCE2RhooKSUvHyQuJSErIBQhJAwdKg4gLg8dJQokNQkfLgkdLBgyRQ4mNgsfLRUkJSIvIxkoJhspJAkbKQkdKwcfMQ0gLiAqJCIrIBQgIwsaJggaKQkaJwYdLgggLgceLwgbKwobKRcsPBQqOSAsJR0rIyo1IyUvKykzKRYiJg4cJgsaJwsfKwofKw0eJhIjJwocKAYcLQYdLwcfMAocKg8fLBIkKxsrKyg1KyczNCQyNRUkKhMgJRMjKw4dJhYmJxMkJwkcKwccLAsfLg4lMxEnNRAlMhEkLh0uLCAuLhwrLx0nIRYjJAwbJwUeMAwdJw4fKBEhJhkpJxIkKRQpOBYsOxMjKBcnKBQjLg0cKQoZJgkZJwccLQocKRQjJRMiJQ0fKQsgLQwhLwoaKQkZLA0dKhwmJSAqIRolIxMhJhMgJA0cJQwgLg0mNg8hKgYfMRAhLyQ3Rig5RhYlMBIiLg4gLB0yQQ8iMAscKQweKxIiKA8mNBIsPREoOCA2RgsdKgsdKxMhJBwoIxYlJxcpNh0rNhsoJxclJxknKQwdK4BpIgwAAAAJcEhZcwAAFxEAABcRAcom8z8AAAAHdElNRQfmCR0THCUQuSs/AAAAg0lEQVQY02NkYEQH/5kYhRkxAYsIAcF/zDBBiPYPgntNBBDS8Vi1M1wwhGk8Zg2mdjI2QWWRncYi/EGQca8L0G1wMOsF00P5/XxB/IICQLCYn5+Pjy/ftIdx03avhkbGT/xIurtZWCIZ/wm0cxT5GjbDBJtZpIAkfycj414OqNBbkYkAGdkeRGJq4bgAAAASdEVYdGV4aWY6RXhpZk9mZnNldAAyNlMbomUAAAAZdEVYdGV4aWY6UGl4ZWxYRGltZW5zaW9uADU3NjAb6dbQAAAAGXRFWHRleGlmOlBpeGVsWURpbWVuc2lvbgAzODQwvhN3WwAAACh0RVh0aWNjOmNvcHlyaWdodABDb3B5cmlnaHQgQXBwbGUgSW5jLiwgMjAyMuS0v5wAAAAYdEVYdGljYzpkZXNjcmlwdGlvbgAyNEcyVzFHNKmtL4wAAAAASUVORK5CYII=","aspectRatio":1.5,"src":"//images.ctfassets.net/wdjnw2prxlw8/1giaUlq0r1Bd9jtYEz9u4I/6c422ad9fb1a15d2726f46fcf7090506/image.png?w=480&q=50","srcSet":"//images.ctfassets.net/wdjnw2prxlw8/1giaUlq0r1Bd9jtYEz9u4I/6c422ad9fb1a15d2726f46fcf7090506/image.png?w=120&h=80&q=50 120w,\n//images.ctfassets.net/wdjnw2prxlw8/1giaUlq0r1Bd9jtYEz9u4I/6c422ad9fb1a15d2726f46fcf7090506/image.png?w=240&h=160&q=50 240w,\n//images.ctfassets.net/wdjnw2prxlw8/1giaUlq0r1Bd9jtYEz9u4I/6c422ad9fb1a15d2726f46fcf7090506/image.png?w=480&h=320&q=50 480w,\n//images.ctfassets.net/wdjnw2prxlw8/1giaUlq0r1Bd9jtYEz9u4I/6c422ad9fb1a15d2726f46fcf7090506/image.png?w=720&h=480&q=50 720w,\n//images.ctfassets.net/wdjnw2prxlw8/1giaUlq0r1Bd9jtYEz9u4I/6c422ad9fb1a15d2726f46fcf7090506/image.png?w=960&h=640&q=50 960w,\n//images.ctfassets.net/wdjnw2prxlw8/1giaUlq0r1Bd9jtYEz9u4I/6c422ad9fb1a15d2726f46fcf7090506/image.png?w=1440&h=960&q=50 1440w","sizes":"(max-width: 480px) 100vw, 480px"}}}},{"title":"Integrating Indoor Positioning System with Mappedin SDKs","slug":"ips-integration","content":{"__typename":"ContentfulBlogPost","author":"Jere Suikkila","publishDate":"Feb 15, 2022","updatedAt":"Jul 6, 2022","tags":{"category":{"name":"Developers","slug":"developers"},"topic":{"name":"Use Cases","slug":"use-cases"}},"content":{"raw":"{\"data\":{},\"content\":[{\"data\":{\"target\":{\"sys\":{\"id\":\"yV1ZZQhfqbkAoBwXzD0Xn\",\"type\":\"Link\",\"linkType\":\"Asset\"}}},\"content\":[],\"nodeType\":\"embedded-asset-block\"},{\"data\":{},\"content\":[{\"data\":{},\"marks\":[{\"type\":\"bold\"}],\"value\":\"You are here\",\"nodeType\":\"text\"},{\"data\":{},\"marks\":[],\"value\":\" is one of the first things we expect to find on a map today. There is no need to manually triangulate our position based on stars because the device we hold in our hands can already tell us our location. That is if we are outdoors. The story gets more complicated if we move indoors.\",\"nodeType\":\"text\"}],\"nodeType\":\"paragraph\"},{\"data\":{},\"content\":[{\"data\":{},\"marks\":[],\"value\":\"With Indoor Positioning Systems (IPS) users can see their precise location represented by a blue dot within the context of an indoor map. Similar to outdoor GPS, users are not required to enter a \\\"start\\\" location and as they begin to follow along a route, the blue dot moves with them, providing an enhanced navigational experience.\",\"nodeType\":\"text\"}],\"nodeType\":\"paragraph\"},{\"data\":{},\"content\":[{\"data\":{},\"marks\":[],\"value\":\"Indoor Positioning Systems are valuable components of rich indoor mapping experiences. They ensure that the user does not need to know their location in a venue. This saves both time and confusion, making for a much more pleasant wayfinding experience.\",\"nodeType\":\"text\"}],\"nodeType\":\"paragraph\"},{\"data\":{},\"content\":[{\"data\":{},\"marks\":[],\"value\":\"GPS has about 3 meter accuracy when we are outside and have no obstructions such as skyscrapers around us. However, inside a building, GPS is nearly useless. That's why several technologies have been developed to provide indoor positioning in various scenarios such as \",\"nodeType\":\"text\"},{\"data\":{\"uri\":\"https://resources.mappedin.com/blog/what-is-blue-dot-wayfinding\"},\"content\":[{\"data\":{},\"marks\":[],\"value\":\"wayfinding\",\"nodeType\":\"text\"}],\"nodeType\":\"hyperlink\"},{\"data\":{},\"marks\":[],\"value\":\", \",\"nodeType\":\"text\"},{\"data\":{\"uri\":\"https://resources.mappedin.com/blog/indoor-mapping-use-case-asset-tracking\"},\"content\":[{\"data\":{},\"marks\":[],\"value\":\"asset tracking\",\"nodeType\":\"text\"}],\"nodeType\":\"hyperlink\"},{\"data\":{},\"marks\":[],\"value\":\", contact monitoring and smart building applications.\",\"nodeType\":\"text\"}],\"nodeType\":\"paragraph\"},{\"data\":{},\"content\":[{\"data\":{},\"marks\":[],\"value\":\"Positioning smarts for indoors\",\"nodeType\":\"text\"}],\"nodeType\":\"heading-2\"},{\"data\":{\"target\":{\"sys\":{\"id\":\"4aHfBcHMLcb5o2fmxayffP\",\"type\":\"Link\",\"linkType\":\"Asset\"}}},\"content\":[],\"nodeType\":\"embedded-asset-block\"},{\"data\":{},\"content\":[{\"data\":{},\"marks\":[],\"value\":\"The different indoor positioning systems have different tradeoffs. For example, using beacons requires installing Bluetooth Low Energy (BLE) devices in known positions around the venue. WiFi-based systems use existing infrastructure and requires a radio frequency mapping of the venue. Some systems blend multiple technologies in sensor fusion to further process the positioning data into a more accurate representation of the actual position.\",\"nodeType\":\"text\"}],\"nodeType\":\"paragraph\"},{\"data\":{},\"content\":[{\"data\":{},\"marks\":[],\"value\":\"To integrate with the Mappedin SDKs, it does not really matter what underlying technology is used to obtain the indoor position as long as it can provide information about the current floor and the \",\"nodeType\":\"text\"},{\"data\":{\"uri\":\"https://developer.mozilla.org/en-US/docs/Web/API/GeolocationCoordinates\"},\"content\":[{\"data\":{},\"marks\":[],\"value\":\"geocoordinates\",\"nodeType\":\"text\"}],\"nodeType\":\"hyperlink\"},{\"data\":{},\"marks\":[],\"value\":\" (latitude and longitude). Based on that the Mappedin SDK is able to \",\"nodeType\":\"text\"},{\"data\":{\"uri\":\"https://developer.mappedin.com/guides/webv4/bluedot\"},\"content\":[{\"data\":{},\"marks\":[],\"value\":\"place the Blue Dot on the map\",\"nodeType\":\"text\"}],\"nodeType\":\"hyperlink\"},{\"data\":{},\"marks\":[],\"value\":\" indicating the current position of the device.\",\"nodeType\":\"text\"}],\"nodeType\":\"paragraph\"},{\"data\":{\"target\":{\"sys\":{\"id\":\"7tbzSHUglPtWzsIa9kPuUD\",\"type\":\"Link\",\"linkType\":\"Entry\"}}},\"content\":[],\"nodeType\":\"embedded-entry-block\"},{\"data\":{},\"content\":[{\"data\":{},\"marks\":[],\"value\":\"One of the easiest ways to \",\"nodeType\":\"text\"},{\"data\":{\"uri\":\"https://resources.mappedin.com/blog/product-101-imdf-export\"},\"content\":[{\"data\":{},\"marks\":[],\"value\":\"setup Indoor Positioning System is Apple's infrastructure-free positioning\",\"nodeType\":\"text\"}],\"nodeType\":\"hyperlink\"},{\"data\":{},\"marks\":[],\"value\":\" combined with Mappedin map rendering and data management.\",\"nodeType\":\"text\"}],\"nodeType\":\"paragraph\"},{\"data\":{},\"content\":[{\"data\":{},\"marks\":[],\"value\":\"Integrating positioning data with Mappedin React Native SDKs\",\"nodeType\":\"text\"}],\"nodeType\":\"heading-2\"},{\"data\":{},\"content\":[{\"data\":{},\"marks\":[],\"value\":\"Below is the \",\"nodeType\":\"text\"},{\"data\":{\"uri\":\"https://developer.mappedin.com/guides/react-native/quickstart/\"},\"content\":[{\"data\":{},\"marks\":[],\"value\":\"minimal implementation of drawing a map\",\"nodeType\":\"text\"}],\"nodeType\":\"hyperlink\"},{\"data\":{},\"marks\":[],\"value\":\" with Mappedin React Native SDK. In 5 minutes, we will build on this code to display the Blue Dot and override the positions from a premade path of geocoordinates. After ensuring everything works as expected, you can easily connect the IPS to provide the position to Mappedin SDK instead\",\"nodeType\":\"text\"}],\"nodeType\":\"paragraph\"},{\"data\":{\"target\":{\"sys\":{\"id\":\"aRyiK6XjGEWNpHL0a2E4F\",\"type\":\"Link\",\"linkType\":\"Entry\"}}},\"content\":[],\"nodeType\":\"embedded-entry-block\"},{\"data\":{},\"content\":[{\"data\":{},\"marks\":[],\"value\":\"We have pregenerated a route in \",\"nodeType\":\"text\"},{\"data\":{\"uri\":\"https://developer.mappedin.com/code/sdks/react-native/positions.json\"},\"content\":[{\"data\":{},\"marks\":[{\"type\":\"code\"},{\"type\":\"bold\"}],\"value\":\"positions.json\",\"nodeType\":\"text\"}],\"nodeType\":\"hyperlink\"},{\"data\":{},\"marks\":[],\"value\":\" that can be used for debugging Blue Dot features in \",\"nodeType\":\"text\"},{\"data\":{},\"marks\":[{\"type\":\"code\"},{\"type\":\"bold\"}],\"value\":\"mappedin-demo-mall\",\"nodeType\":\"text\"},{\"data\":{},\"marks\":[],\"value\":\". Below is the first element of the list, which we will set as our starting coordinate for camera focus. It follows the \",\"nodeType\":\"text\"},{\"data\":{\"uri\":\"https://developer.mozilla.org/en-US/docs/Web/API/GeolocationPosition\"},\"content\":[{\"data\":{},\"marks\":[],\"value\":\"specification of Geolocation Position of Web APIs\",\"nodeType\":\"text\"}],\"nodeType\":\"hyperlink\"},{\"data\":{},\"marks\":[],\"value\":\".\",\"nodeType\":\"text\"}],\"nodeType\":\"paragraph\"},{\"data\":{\"target\":{\"sys\":{\"id\":\"WWftOy5W8uhstWiXOHYNk\",\"type\":\"Link\",\"linkType\":\"Entry\"}}},\"content\":[],\"nodeType\":\"embedded-entry-block\"},{\"data\":{},\"content\":[{\"data\":{},\"marks\":[],\"value\":\"First, we create a \",\"nodeType\":\"text\"},{\"data\":{},\"marks\":[{\"type\":\"code\"},{\"type\":\"bold\"}],\"value\":\"MappedinCoordinate\",\"nodeType\":\"text\"},{\"data\":{},\"marks\":[],\"value\":\" for our starting location and zoom in the camera to get a closer view of the Blue Dot.\",\"nodeType\":\"text\"}],\"nodeType\":\"paragraph\"},{\"data\":{\"target\":{\"sys\":{\"id\":\"4nDiMFiWYwIzJj2E7aOJsU\",\"type\":\"Link\",\"linkType\":\"Entry\"}}},\"content\":[],\"nodeType\":\"embedded-entry-block\"},{\"data\":{},\"content\":[{\"data\":{},\"marks\":[],\"value\":\"We set the \",\"nodeType\":\"text\"},{\"data\":{\"uri\":\"https://developer.mappedin.com/docs/react-native/latest/enums/state\"},\"content\":[{\"data\":{},\"marks\":[],\"value\":\"map state\",\"nodeType\":\"text\"}],\"nodeType\":\"hyperlink\"},{\"data\":{},\"marks\":[],\"value\":\" to \",\"nodeType\":\"text\"},{\"data\":{},\"marks\":[{\"type\":\"code\"},{\"type\":\"bold\"}],\"value\":\"follow\",\"nodeType\":\"text\"},{\"data\":{},\"marks\":[],\"value\":\", which keeps the Blue Dot in the middle of the view. Then we enable the Blue Dot and set the starting location.\",\"nodeType\":\"text\"}],\"nodeType\":\"paragraph\"},{\"data\":{\"target\":{\"sys\":{\"id\":\"3gV9owEJDn12XKswCpc1ko\",\"type\":\"Link\",\"linkType\":\"Entry\"}}},\"content\":[],\"nodeType\":\"embedded-entry-block\"},{\"data\":{},\"content\":[{\"data\":{},\"marks\":[],\"value\":\"To walk through the list of positions, we can create a simple interval outside of our \",\"nodeType\":\"text\"},{\"data\":{},\"marks\":[{\"type\":\"code\"},{\"type\":\"bold\"}],\"value\":\"render\",\"nodeType\":\"text\"},{\"data\":{},\"marks\":[],\"value\":\" method for overriding the position every few seconds. The position will jump to the start after the route is completed. This code is not optimized and should be replaced with the positioning updates coming from your IPS.\",\"nodeType\":\"text\"}],\"nodeType\":\"paragraph\"},{\"data\":{\"target\":{\"sys\":{\"id\":\"7D6MiKAE2X6B36mYYzcoK2\",\"type\":\"Link\",\"linkType\":\"Entry\"}}},\"content\":[],\"nodeType\":\"embedded-entry-block\"},{\"data\":{\"target\":{\"sys\":{\"id\":\"29dn1eaOYbx5f8K4w1D0Pf\",\"type\":\"Link\",\"linkType\":\"Asset\"}}},\"content\":[],\"nodeType\":\"embedded-asset-block\"},{\"data\":{},\"content\":[{\"data\":{},\"marks\":[],\"value\":\"Completed sample\",\"nodeType\":\"text\"}],\"nodeType\":\"heading-2\"},{\"data\":{},\"content\":[{\"data\":{},\"marks\":[],\"value\":\"Below code sample can be pasted into a fresh \",\"nodeType\":\"text\"},{\"data\":{\"uri\":\"https://developer.mappedin.com/guides/react-native/\"},\"content\":[{\"data\":{},\"marks\":[],\"value\":\"React Native starter project\",\"nodeType\":\"text\"}],\"nodeType\":\"hyperlink\"},{\"data\":{},\"marks\":[],\"value\":\" with the addition of \",\"nodeType\":\"text\"},{\"data\":{\"uri\":\"https://developer.mappedin.com/code/sdks/react-native/positions.json\"},\"content\":[{\"data\":{},\"marks\":[{\"type\":\"code\"},{\"type\":\"bold\"}],\"value\":\"positions.json\",\"nodeType\":\"text\"}],\"nodeType\":\"hyperlink\"},{\"data\":{},\"marks\":[],\"value\":\".\",\"nodeType\":\"text\"}],\"nodeType\":\"paragraph\"},{\"data\":{\"target\":{\"sys\":{\"id\":\"7hyVSBE6ShMkx2Qu837G2w\",\"type\":\"Link\",\"linkType\":\"Entry\"}}},\"content\":[],\"nodeType\":\"embedded-entry-block\"},{\"data\":{},\"content\":[{\"data\":{},\"marks\":[],\"value\":\"Summary\",\"nodeType\":\"text\"}],\"nodeType\":\"heading-2\"},{\"data\":{},\"content\":[{\"data\":{},\"marks\":[],\"value\":\"Mappedin SDKs are ready to work with any IPS provider that can be integrated with your app to provide geolocation and floor to Mappedin within minutes. The Blue Dot can be enabled and then connected to the position updates in just a few lines of code, delivering accurate indoor positioning and enhanced wayfinding experiences.\",\"nodeType\":\"text\"}],\"nodeType\":\"paragraph\"},{\"data\":{},\"content\":[{\"data\":{},\"content\":[{\"data\":{},\"marks\":[],\"value\":\"If you want to discuss indoor positioning as it relates to your venue, \",\"nodeType\":\"text\"},{\"data\":{\"uri\":\"https://www.mappedin.com/contact-us/\"},\"content\":[{\"data\":{},\"marks\":[],\"value\":\"contact us now\",\"nodeType\":\"text\"}],\"nodeType\":\"hyperlink\"},{\"data\":{},\"marks\":[],\"value\":\".\",\"nodeType\":\"text\"}],\"nodeType\":\"paragraph\"}],\"nodeType\":\"blockquote\"},{\"data\":{},\"content\":[{\"data\":{},\"marks\":[],\"value\":\"\",\"nodeType\":\"text\"}],\"nodeType\":\"paragraph\"}],\"nodeType\":\"document\"}"},"articleType":"Dev Content","image":{"fluid":{"base64":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAALCAMAAABI111xAAABoVBMVEXR3N/x8fHS0tKQkJCSkpLq6urT0tIOXXXM1djT1NTm5ubCwsK1tbXv7+9Yjp67yc2sr7TQ0dTo6OjE1Nnj4+OqqqrIyMgkbIG5ys/a2tvw8PDr6+uko6Nei5mlu8K8vsLu7u62y9Ht7e07eo2pwcnq6uvm5+jT3N+4y9GcucFGgZNAfI5SiZo6eYwian8MXHSrxMzh5ueJrLYhaoAja4EdZ30ZanoWe4wGXnY/UWVGV2sDV3BmS1wsVGqevMXM1tkdZ3xMWm4MVW4HYXgSbIAXZXsydYlBf5FTippjlaNzn6x/pK+StL5JgZFZY3W0f4kKWHCjvcW+zuTM1+nW1tacnJzl5eXR0NDs7OyFrLjt7u7b4OESXnU5Wm8UVW2MrrioqKje3t63t7d9fX3Ozc1qnKtwn61om6pll6YLWnJXh5bU1NS6urrf39/Pz8+Tk5Pp6enAv79omqkuWW1kTF2Wtr9ZWVnBwMCdvcaQtb/g6u1pm6ocY3gEV3B1nqrFxMTNzMzn5+dlZWXAvr9tnq0laX5HSVxklqTh4eHV1dVVVVWFZ6dkAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH5gkTDjAgrcPzDgAAALpJREFUCNdjZGDEAL8Zhd8JMzK+52VlZPzJARZ6JMnGqPhG9IXEv4dKyEpZ+B98UbxvIAQXABr3j4WPgeGHHZDzkwGo+5I+WIIJKPicDwjExAXu8NvtvszHt52XhZchEqJvVfhbPkYGhqOeDAxMPKm8vLz3eHh4GICQJ5/hPy/DKRYmBgYuRkvGGaIcXxg+i/5geM7G8I9FEKK5iJGxk3lJbTdIAxMTz7vXbziBYAoHF98fjnZh+bfhZgDvBy0LpeAB/AAAAABJRU5ErkJggg==","aspectRatio":1.7768817204301075,"src":"//images.ctfassets.net/wdjnw2prxlw8/yV1ZZQhfqbkAoBwXzD0Xn/e605b6b14ed11811c0cb5f995cdd75a0/bluedot-accurate.png?w=480&q=50","srcSet":"//images.ctfassets.net/wdjnw2prxlw8/yV1ZZQhfqbkAoBwXzD0Xn/e605b6b14ed11811c0cb5f995cdd75a0/bluedot-accurate.png?w=120&h=68&q=50 120w,\n//images.ctfassets.net/wdjnw2prxlw8/yV1ZZQhfqbkAoBwXzD0Xn/e605b6b14ed11811c0cb5f995cdd75a0/bluedot-accurate.png?w=240&h=135&q=50 240w,\n//images.ctfassets.net/wdjnw2prxlw8/yV1ZZQhfqbkAoBwXzD0Xn/e605b6b14ed11811c0cb5f995cdd75a0/bluedot-accurate.png?w=480&h=270&q=50 480w,\n//images.ctfassets.net/wdjnw2prxlw8/yV1ZZQhfqbkAoBwXzD0Xn/e605b6b14ed11811c0cb5f995cdd75a0/bluedot-accurate.png?w=720&h=405&q=50 720w,\n//images.ctfassets.net/wdjnw2prxlw8/yV1ZZQhfqbkAoBwXzD0Xn/e605b6b14ed11811c0cb5f995cdd75a0/bluedot-accurate.png?w=960&h=540&q=50 960w,\n//images.ctfassets.net/wdjnw2prxlw8/yV1ZZQhfqbkAoBwXzD0Xn/e605b6b14ed11811c0cb5f995cdd75a0/bluedot-accurate.png?w=1322&h=744&q=50 1322w","sizes":"(max-width: 480px) 100vw, 480px"}}}}],"tags":{"category":{"slug":"developers","name":"Developers"},"topic":{"slug":"features","name":"Features"}}}}},"pageContext":{"slug":"contact-monitoring-mobile"}},
    "staticQueryHashes": ["1252674921","3226752585","3508205345","764694655"]}