-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Welcome to Naviglass Android Application wiki! Here, you can find documentation the app.
The app's main functions are to retrieve data such as map, origin, destination and route, and to send the data to the Pi via a Bluetooth connection. The data sent to the Pi are used by the Pi to display the view on the glasses. This app serves the purpose of providing functions, such as internet connection (from the 4G network of the device), and the interface to select the destination. On startup, the app displays a list of nearby Bluetooth enabled devices. If no device is discovered, the list is empty. When the user selects the Pi from the list of available devices, the app establishes a Bluetooth connection between the Android phone and the device (the Pi), the phone as the client and the pi as the server. Then, a Google Map is displayed, and the phone’s current location is automatically selected as the origin. The user must select a device from the list in order for the map to be displayed. The Google Map was brought on to be used on the app using Google Maps SDK for Android. The user selects a destination by either entering the address or by clicking the destination on the map. Once a destination is provided, the app retrieves information such as directions, various coordinates, and map images, from Google Maps API. It then draws the entire route on the map, and sends the information in bytes to the Pi, so that the glasses can display the view around the user when travelling.
It was assumed that the user is facing the same direction as the phone. The app sends the Pi the azimuth of the phone periodically. To send each data to the Pi separately so the Pi would be aware of which data it was receiving, the app splits data in chunks of 900 bytes, and send the chunks to the Pi one at a time. Some features added to the app in consideration for user-friendliness were refreshing the list of nearby Bluetooth devices when the list is swiped down in case of if the Pi is not discovered on the first time, being able to select the destination in more than one way, and periodically checking if GPS location and Bluetooth is still enabled on phone and their permissions allowed. In writing the code, various sites on the web were referenced, including Google Maps Platform Documentation.