Scottish-Tech-Army / Soundscape-Android

This is the source for an Android version of the original iOS Soundscape app
https://scottish-tech-army.github.io/Soundscape-Android/
Other
3 stars 2 forks source link

Initial integration of MapCompose map #66

Closed davecraig closed 2 months ago

davecraig commented 2 months ago

This code is the initial integration of the MapCompose open street map UI. The soundscape service connection has been moved out into a separate class and then a MapCompose based UI has been added to the Home screen. The service now uses lastLocation to give a much quicker 'lock' on the current position.

The local map is displayed with a marker displaying the current location. The marker is moved whenever the Soundscape service updates the device location. The map can be zoomed in/out and repositioned independently of the marker location. The map centers on the current location when the location is first updated. The heading is constantly updated so that the location icon rotates to point in the direcion of the phone. A long press on the map will create an audio beacon at that location. A long press on the marker that appears will destroy that beacon, or a long press elsewhere will move the beacon to the new location. There's obviously a lot more UI that can be done, this is just the very start.

An HTTP cache has been initiated - this likely affects all HTTP and not just the Tiles for open street map. As a result it may be required to mark Tile HTTP requests with a cache-control header if we don't want them to go through the cache?

The API key for thunderforest is stored in local.properties as tileProviderApiKey so must be configured for each developer i.e.

tileProviderApiKey=xxXXxxXXxxXXxxXXxxXXxxXXxxXXxxXX

with an appropriate key. For builds, there's a new GitHub secret TILE_PROVIDER_API_KEY that needs setup.