1.1 Navigation App
- An application that helps you easily to find places around your location using GPS. Especially the app is integrated Augmented Reality, which allows places to be placed within the Augmented Reality world using real-world coordinates.
- Written for both iOS (use ARKit – Apple) and Android (use ARCore – Google).
1.2 How Navigation App Works
- Uses GPS to get your location.
- Uses AR to track your device’s motion sensors, combined with visual information from the camera, to track the real world.
- Then takes this tracking information, maps the features in the real 3D world to your 2D screen.
- Contrast is very important to detect the surface. The camera works well as if the surface is not too white or dark.
- iOS 11 or later.
- Device: A9 processor or later (iPhone SE, 6S and up, all iPads Pro models, iPad 2017 and up).
- Xcode 10.2.1 or higher.
- Android 7.0 (Nougat) and later.
- Device: A full list of all supported devices is available here.
- Android Studio 3.1 or higher.
3. Quickstart for iOS
3.1 Start Xcode.
3.2 Choose File ➤ New ➤ Project.
3.3 Click the Augmented Reality App icon and click the Next button. Xcode asks for a product name, organization name, organization identifiers.
3.4 Content technology ➤ SceneKit.
- Add “Privacy – Camera Usage Description”, “Privacy – Location When In Use Usage Description” keys and descriptions.
- In “Required device capabilities”: Type “arkit”.
4. Quickstart for Android
4.1 Start Android Studio.
4.2 Choose File ➤ New ➤ New Project.
4.3 Add JitPack in root build. gradle at the end of repositories:
4.4 Add the Sceneform library in app build.gradle.
4.5 Add permissions, enable ARCore in Manifest.
5. Main Features
5.1 Show places around your location, they’re arranged on the screen like real-world coordinates, distances between your position with places. You can also move places to other positions on the screen. Besides that when you move with the device, places’s distance is updated too.
5.2 Show and search categories and places list. You can also choose to show or hide places on the screen.
5.3 Support multiple languages.
5.4 Show a place’s information. You can see the information about the place that you chose.
6.1 The position taken from GPS has a gap compared with the actual position.
- To be honest, the compass on your phone is never absolutely accurate. For this reason, places that are placed on-screen are also not perfect sometimes, for instances they will appear very far away.
- Has a little difference between iOS with Android. Your locations have not the same value even when you put devices at the same place so that the places displayed on the screen are also different.
- Elevation of devices is different too, for example: on Android devices, sometimes they can’t get elevation in during time using the app.
6.2 Display places in AR world on the device.
- Development for mapping the real places into AR world in the device’s camera took a great amount of time. Because sometimes location SDK does not work properly so during that moment we can’t determine locations in AR. In simple terms, to display a place in AR world:
– Step 1: From ONE place’s information, calculate the distance between the device’s location with the place’s location. Next, we create a temporary view containing the title and distance of that place.
– Step 2: Convert distance from step 1 to AR world coordinate system(x, y, z).
– Step 3: Scale the view (step 1) proportional to the value (step 2) then add that view into AR screen.
– P/S: Update the place’s distance after a fixed period of time to guarantee UI is updated while you’re moving.
- Besides that, to sort all places by their distance to see them clearly, but when a place’s too near your position, its altitude’s effect to display.
- Finally, how to move a place without effecting on the others that still arranged on camera.
6.3 Battery should be noticed.
- We have two main things that quite drain battery, camera and GPS. They’re always turned on when using the app. Because of that, your device will become hot at that moment.
7. Improved things
To bring comfortable feeling to users while using the app, we’ve applied some solutions to improve the performance of the app
7.1 Places are arranged in order by their distance.
- Places with shorter distances are displayed in front of the others on both iOS and Android devices. To display all places on screen that you can see them clearly, you must scale them by their distances in real-world coordinates and arrange them suitable for with device coordinates.
7.2 Prevent to redraw all of the places on the screen.
After a fixed period of time, the app will re-render all places on the screen to guarantee that distances from your location to places are updated to new values. However,
- If your location doesn’t change in 10 meters radius, the app will not re-render all places’s UI.
- While moving a place on the screen, the app will not redraw UI.